Skip to content

Commit

Permalink
[8.x] [Streams] Schema Editor isWiredStream > isWiredReadStream (#…
Browse files Browse the repository at this point in the history
…205251) (#205266)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Streams] Schema Editor isWiredStream > isWiredReadStream
(#205251)](#205251)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kerry
Gallagher","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-30T14:24:19Z","message":"[Streams]
Schema Editor isWiredStream > isWiredReadStream (#205251)\n\n##
Summary\r\n\r\nSmall fix to the Schema Editor page after the changes
in\r\nhttps://github.com//pull/204671.\r\n\r\n(Without
this mapped fields won't be displayed as we use a read
stream\r\ndefinition).","sha":"8cc2f2b9c8c463feaa87f77a05e46a3f75f10fb7","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","v8.18.0","Feature:Streams"],"title":"[Streams]
Schema Editor isWiredStream >
isWiredReadStream","number":205251,"url":"https://github.com/elastic/kibana/pull/205251","mergeCommit":{"message":"[Streams]
Schema Editor isWiredStream > isWiredReadStream (#205251)\n\n##
Summary\r\n\r\nSmall fix to the Schema Editor page after the changes
in\r\nhttps://github.com//pull/204671.\r\n\r\n(Without
this mapped fields won't be displayed as we use a read
stream\r\ndefinition).","sha":"8cc2f2b9c8c463feaa87f77a05e46a3f75f10fb7"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205251","number":205251,"mergeCommit":{"message":"[Streams]
Schema Editor isWiredStream > isWiredReadStream (#205251)\n\n##
Summary\r\n\r\nSmall fix to the Schema Editor page after the changes
in\r\nhttps://github.com//pull/204671.\r\n\r\n(Without
this mapped fields won't be displayed as we use a read
stream\r\ndefinition).","sha":"8cc2f2b9c8c463feaa87f77a05e46a3f75f10fb7"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Kerry Gallagher <[email protected]>
  • Loading branch information
kibanamachine and Kerry350 authored Dec 30, 2024
1 parent f14e250 commit 63b1181
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import type {
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import useToggle from 'react-use/lib/useToggle';
import { isWiredStream, ReadStreamDefinition } from '@kbn/streams-schema';
import { isWiredReadStream, ReadStreamDefinition } from '@kbn/streams-schema';
import { FieldType } from './field_type';
import { FieldStatus } from './field_status';
import { FieldEntry, SchemaEditorEditingState } from './hooks/use_editing_state';
Expand Down Expand Up @@ -93,7 +93,7 @@ export const FieldsTableContainer = ({
}, [inheritedFields, query]);

const mappedFields = useMemo(() => {
if (isWiredStream(definition)) {
if (isWiredReadStream(definition)) {
return Object.entries(definition.stream.ingest.wired.fields).map(([name, field]) => ({
name,
type: field.type,
Expand Down

0 comments on commit 63b1181

Please sign in to comment.