Commit dcd90e8
# Backport
This will backport the following commits from `main` to `8.x`:
- [[Streams π] Schema editor UI
(#202372)](#202372)
<!--- Backport version: 9.4.3 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Kerry
Gallagher","email":"kerry.gallagher@elastic.co"},"sourceCommit":{"committedDate":"2024-12-13T00:39:52Z","message":"[Streams
π] Schema editor UI (#202372)\n\n## Summary\r\n\r\nImplements
https://github.com/elastic/observability-dev/issues/4133.\r\n\r\nOpening
this up for a first pass as the PR is getting quite big. I've\r\nlisted
below some things that can be improved in further iterations.\r\n\r\n##
High level notes \r\n\r\n- Support for `format` has been added to the
field definition\r\n- UI: \r\n - View inherited, mapped, unmapped
fields.\r\n - Edit mapped and unmapped fields.\r\n - Map unmapped and
unmap mapped fields\r\n - Simulation / preview results\r\n -
Filtering\r\n\r\n## Followups\r\n\r\n- Filter dropdowns (on the
right):\r\n\r\n\r\n\r\n-
We could potentially use a separate API for the mapping edits,
rather\r\nthan the core edit route, to be more performant, but for now
this is\r\nused to create less surface area / deviation.\r\n\r\n- State
management is rudimentary right now. It could be improved with
a\r\n`useReducer` approach to avoid potential `useState` race
conditions, and\r\nthen even something like xstate when things are more
concrete. No state\r\nsyncs with the URL currently.\r\n- Due to the lack
of URL state syncing the \"Edit in parent stream\"\r\nbutton doesn't
navigate with things like a pre-selected field. We could\r\npotentially
co-ordinate this between the hooks in the schema editor and\r\ndetail
view parent, but it's unneeded complexity at the moment.\r\n\r\n- We
could provide a lot more assistance with `format`. We could provide\r\na
dropdown with options, and then a toggle to do custom. (Actually,
it\r\nlooks like in the refined designs this is a dropdown, so I'll
probably\r\nswitch this to a select with predefined
options)\r\n\r\n\r\n## Issues\r\n\r\n- There seems to be a bug in the
Elasticsearch JS library we use, calls\r\nto `simulate.ingest` don't
work as `body` is just set to `undefined`\r\n(chasing this up). You can
do the following patch in node_modules just\r\nto get things going (run
`yarn start` again):\r\n\r\n\r\n\r\n-
Runtime mappings don't seem to work with
`match_only_text`:\r\n`mapper_parsing_exception: No handler for type
[match_only_text]`\r\n\r\n## Open questions\r\n\r\n- We might freeze
changes to the root stream\r\n- A failure on simulation doesn't do a
hard block on saving changes. I\r\ndon't think it should, but open to
other opinions.\r\n\r\n## Screenshots\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n---------\r\n\r\nCo-authored-by:
Joe Reuter <johannes.reuter@elastic.co>\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"82f9da1a8e734eb24375a281a09de9adfba65d9a","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
UI","number":202372,"url":"https://github.com/elastic/kibana/pull/202372","mergeCommit":{"message":"[Streams
π] Schema editor UI (#202372)\n\n## Summary\r\n\r\nImplements
https://github.com/elastic/observability-dev/issues/4133.\r\n\r\nOpening
this up for a first pass as the PR is getting quite big. I've\r\nlisted
below some things that can be improved in further iterations.\r\n\r\n##
High level notes \r\n\r\n- Support for `format` has been added to the
field definition\r\n- UI: \r\n - View inherited, mapped, unmapped
fields.\r\n - Edit mapped and unmapped fields.\r\n - Map unmapped and
unmap mapped fields\r\n - Simulation / preview results\r\n -
Filtering\r\n\r\n## Followups\r\n\r\n- Filter dropdowns (on the
right):\r\n\r\n\r\n\r\n-
We could potentially use a separate API for the mapping edits,
rather\r\nthan the core edit route, to be more performant, but for now
this is\r\nused to create less surface area / deviation.\r\n\r\n- State
management is rudimentary right now. It could be improved with
a\r\n`useReducer` approach to avoid potential `useState` race
conditions, and\r\nthen even something like xstate when things are more
concrete. No state\r\nsyncs with the URL currently.\r\n- Due to the lack
of URL state syncing the \"Edit in parent stream\"\r\nbutton doesn't
navigate with things like a pre-selected field. We could\r\npotentially
co-ordinate this between the hooks in the schema editor and\r\ndetail
view parent, but it's unneeded complexity at the moment.\r\n\r\n- We
could provide a lot more assistance with `format`. We could provide\r\na
dropdown with options, and then a toggle to do custom. (Actually,
it\r\nlooks like in the refined designs this is a dropdown, so I'll
probably\r\nswitch this to a select with predefined
options)\r\n\r\n\r\n## Issues\r\n\r\n- There seems to be a bug in the
Elasticsearch JS library we use, calls\r\nto `simulate.ingest` don't
work as `body` is just set to `undefined`\r\n(chasing this up). You can
do the following patch in node_modules just\r\nto get things going (run
`yarn start` again):\r\n\r\n\r\n\r\n-
Runtime mappings don't seem to work with
`match_only_text`:\r\n`mapper_parsing_exception: No handler for type
[match_only_text]`\r\n\r\n## Open questions\r\n\r\n- We might freeze
changes to the root stream\r\n- A failure on simulation doesn't do a
hard block on saving changes. I\r\ndon't think it should, but open to
other opinions.\r\n\r\n## Screenshots\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n---------\r\n\r\nCo-authored-by:
Joe Reuter <johannes.reuter@elastic.co>\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"82f9da1a8e734eb24375a281a09de9adfba65d9a"}},"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/202372","number":202372,"mergeCommit":{"message":"[Streams
π] Schema editor UI (#202372)\n\n## Summary\r\n\r\nImplements
https://github.com/elastic/observability-dev/issues/4133.\r\n\r\nOpening
this up for a first pass as the PR is getting quite big. I've\r\nlisted
below some things that can be improved in further iterations.\r\n\r\n##
High level notes \r\n\r\n- Support for `format` has been added to the
field definition\r\n- UI: \r\n - View inherited, mapped, unmapped
fields.\r\n - Edit mapped and unmapped fields.\r\n - Map unmapped and
unmap mapped fields\r\n - Simulation / preview results\r\n -
Filtering\r\n\r\n## Followups\r\n\r\n- Filter dropdowns (on the
right):\r\n\r\n\r\n\r\n-
We could potentially use a separate API for the mapping edits,
rather\r\nthan the core edit route, to be more performant, but for now
this is\r\nused to create less surface area / deviation.\r\n\r\n- State
management is rudimentary right now. It could be improved with
a\r\n`useReducer` approach to avoid potential `useState` race
conditions, and\r\nthen even something like xstate when things are more
concrete. No state\r\nsyncs with the URL currently.\r\n- Due to the lack
of URL state syncing the \"Edit in parent stream\"\r\nbutton doesn't
navigate with things like a pre-selected field. We could\r\npotentially
co-ordinate this between the hooks in the schema editor and\r\ndetail
view parent, but it's unneeded complexity at the moment.\r\n\r\n- We
could provide a lot more assistance with `format`. We could provide\r\na
dropdown with options, and then a toggle to do custom. (Actually,
it\r\nlooks like in the refined designs this is a dropdown, so I'll
probably\r\nswitch this to a select with predefined
options)\r\n\r\n\r\n## Issues\r\n\r\n- There seems to be a bug in the
Elasticsearch JS library we use, calls\r\nto `simulate.ingest` don't
work as `body` is just set to `undefined`\r\n(chasing this up). You can
do the following patch in node_modules just\r\nto get things going (run
`yarn start` again):\r\n\r\n\r\n\r\n-
Runtime mappings don't seem to work with
`match_only_text`:\r\n`mapper_parsing_exception: No handler for type
[match_only_text]`\r\n\r\n## Open questions\r\n\r\n- We might freeze
changes to the root stream\r\n- A failure on simulation doesn't do a
hard block on saving changes. I\r\ndon't think it should, but open to
other opinions.\r\n\r\n## Screenshots\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n---------\r\n\r\nCo-authored-by:
Joe Reuter <johannes.reuter@elastic.co>\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"82f9da1a8e734eb24375a281a09de9adfba65d9a"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Co-authored-by: Kerry Gallagher <kerry.gallagher@elastic.co>
1 parent efdca2d commit dcd90e8
29 files changed
Lines changed: 1929 additions & 20 deletions
File tree
- x-pack/solutions/observability/plugins
- streams_app
- public
- components
- preview_table
- stream_detail_management
- stream_detail_overview
- stream_detail_routing
- stream_detail_schema_editor
- flyout
- hooks
- stream_detail_view
- util
- streams
- common
- server
- lib/streams/component_templates
- routes
- streams/schema
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| 34 | + | |
| 35 | + | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
Lines changed: 207 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
βx-pack/solutions/observability/plugins/streams/server/routes/streams/schema/unmapped_fields.tsβ
Lines changed: 103 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
12 | 18 | | |
13 | 19 | | |
14 | 20 | | |
| |||
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
| 28 | + | |
| 29 | + | |
22 | 30 | | |
23 | 31 | | |
24 | 32 | | |
| |||
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
32 | | - | |
| 40 | + | |
33 | 41 | | |
34 | 42 | | |
35 | 43 | | |
| |||
0 commit comments