Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mappings editor] Add support for point field type #77543

Conversation

alisonelizabeth
Copy link
Contributor

@alisonelizabeth alisonelizabeth commented Sep 15, 2020

Fixes #76809

Release note

The mappings editor in the Index Templates UI now supports configuring the point field type.

Screen Shot 2020-09-17 at 3 13 29 PM

@alisonelizabeth alisonelizabeth added release_note:enhancement Feature:Index Management Index and index templates UI v8.0.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more Feature:Mappings Editor Index mappings editor UI v7.10.0 labels Sep 15, 2020
@alisonelizabeth alisonelizabeth marked this pull request as ready for review September 17, 2020 19:14
@alisonelizabeth alisonelizabeth requested a review from a team as a code owner September 17, 2020 19:14
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

Copy link
Contributor

@yuliacech yuliacech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @alisonelizabeth, great work on this field type!
Tested locally and the editor worked for the point type.
But I noticed that metadata parameter is throwing an error for all field types, if the switch is enabled, but no json was provided in the input field. The form will not save and the console shows following:

parameters_definition.tsx:428 Uncaught (in promise) SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at serializer (parameters_definition.tsx:428)
    at Object.__serializeValue (use_field.ts:71)
    at use_form.ts:127
    at utils.ts:42
    at Array.reduce (<anonymous>)
    at mapFormFields (utils.ts:41)
    at use_form.ts:127
    at Object.submit (use_form.ts:282)
    at async submitForm (edit_field.tsx:42)

Screenshot 2020-09-18 at 18 57 34

Is this a known bug or should I open an issue for that?

@alisonelizabeth
Copy link
Contributor Author

Thanks for the review @yuliacech!

But I noticed that metadata parameter is throwing an error for all field types, if the switch is enabled, but no json was provided in the input field. The form will not save and the console shows following:

Great catch! This was a regression that was introduced when doing some refactoring via #76671. I fixed it as part of this PR. Would you mind taking another look?

@yuliacech
Copy link
Contributor

Hi @alisonelizabeth, thank you for addressing this!
I tested locally and noticed that now there is an error on Request tab, it seems like meta field is currently an empty string and this is not allowed in backend, I guess?
Screenshot 2020-09-21 at 13 54 46
Screenshot 2020-09-21 at 13 54 34

Copy link
Contributor

@yuliacech yuliacech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @alisonelizabeth,
tested locally and all works, great work on these fixes!

@cjcenizal
Copy link
Contributor

@alisonelizabeth Do you think it'd be possible to add a test (in either this PR or a separate one) that would have caught the metadata regression?

@alisonelizabeth
Copy link
Contributor Author

@cjcenizal 👍 Good call. I've added a few tests for the point field type via 5dd47fc.

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the tests!

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
advancedSettings - -53 53
alerts - -26 26
apm - -1257 1257
apmOss - -6 6
beatsManagement - -304 304
bfetch - -20 20
canvas - -1194 1194
charts - -269 269
cloud - -6 6
console - -163 163
core - -562 562
crossClusterReplication - -160 160
dashboard - -171 171
dashboardEnhanced - -29 29
dashboardMode - -7 7
data - -567 567
dataEnhanced - -20 20
devTools - -20 20
discover - -254 254
discoverEnhanced - -11 11
embeddable - -95 95
embeddableEnhanced - -15 15
enterpriseSearch - -272 272
esUiShared - -229 229
expressions - -109 109
features - -11 11
fileUpload - -27 27
globalSearch - -22 22
globalSearchBar - -13 13
globalSearchProviders - -8 8
graph - -181 181
grokdebugger - -76 76
home - -213 213
indexLifecycleManagement - -207 207
indexManagement - -503 503
indexPatternManagement - -214 214
infra - -1096 1096
ingestManager - -548 548
ingestPipelines - -447 447
inputControlVis - -44 44
inspector - -65 65
kibanaLegacy - -124 124
kibanaReact - -290 290
kibanaUtils - -190 190
lens - -447 447
licenseManagement - -145 145
licensing - -25 25
lists - -128 128
logstash - -195 195
management - -45 45
maps - -694 694
mapsLegacy - -140 140
mapsLegacyLicensing - -4 4
ml - -1408 1408
monitoring - -619 619
navigation - -26 26
newsfeed - -10 10
observability - -90 90
painlessLab - -43 43
regionMap - -252 252
remoteClusters - -142 142
reporting - -46 46
rollup - -180 180
savedObjects - -46 46
savedObjectsManagement - -137 137
searchprofiler - -76 76
security - -455 455
securitySolution - -2006 2006
share - -38 38
snapshotRestore - -171 171
spaces - -227 227
telemetry - -23 23
telemetryManagementSection - -8 8
tileMap - -258 258
timelion - -105 105
transform - -460 460
triggers_actions_ui - -251 251
uiActions - -170 170
uiActionsEnhanced - -278 278
upgradeAssistant - -119 119
uptime - -513 513
urlForwarding - -11 11
usageCollection - -17 17
visTypeMarkdown - -259 259
visTypeMetric - -261 261
visTypeTable - -278 278
visTypeTagcloud - -262 262
visTypeTimelion - -281 281
visTypeTimeseries - -466 466
visTypeVega - -312 312
visTypeVislib - -508 508
visTypeXy - -4 4
visualizations - -135 135
visualize - -317 317
watcher - -227 227
total -23416

async chunks size

id value diff baseline
advancedSettings - -63.8KB 63.8KB
apm - -5.0MB 5.0MB
beatsManagement - -408.0KB 408.0KB
canvas - -1.4MB 1.4MB
charts - -44.8KB 44.8KB
console - -1.1MB 1.1MB
crossClusterReplication - -461.1KB 461.1KB
devTools - -6.5KB 6.5KB
discover - -437.3KB 437.3KB
enterpriseSearch - -439.4KB 439.4KB
fileUpload - -720.7KB 720.7KB
graph - -1.4MB 1.4MB
grokdebugger - -711.0KB 711.0KB
home - -568.1KB 568.1KB
indexLifecycleManagement - -242.4KB 242.4KB
indexManagement - -1.6MB 1.6MB
indexPatternManagement - -806.2KB 806.2KB
infra - -3.8MB 3.8MB
ingestManager - -1.1MB 1.1MB
ingestPipelines - -765.6KB 765.6KB
kibanaLegacy - -147.1KB 147.1KB
lens - -26.2KB 26.2KB
licenseManagement - -167.5KB 167.5KB
logstash - -216.9KB 216.9KB
management - -176.8KB 176.8KB
maps - -3.3MB 3.3MB
ml - -8.1MB 8.1MB
monitoring - -1.1MB 1.1MB
observability - -296.5KB 296.5KB
painlessLab - -182.0KB 182.0KB
regionMap - -44.8KB 44.8KB
remoteClusters - -374.0KB 374.0KB
rollup - -329.2KB 329.2KB
savedObjectsManagement - -204.2KB 204.2KB
searchprofiler - -714.8KB 714.8KB
security - -1.0MB 1.0MB
securitySolution - -10.1MB 10.1MB
snapshotRestore - -763.5KB 763.5KB
spaces - -45.9KB 45.9KB
tileMap - -44.8KB 44.8KB
timelion - -597.3KB 597.3KB
transform - -768.6KB 768.6KB
triggers_actions_ui - -961.5KB 961.5KB
upgradeAssistant - -322.3KB 322.3KB
uptime - -1.6MB 1.6MB
visTypeMarkdown - -40.7KB 40.7KB
visTypeMetric - -38.8KB 38.8KB
visTypeTable - -45.4KB 45.4KB
visTypeTagcloud - -38.8KB 38.8KB
visTypeTimelion - -38.8KB 38.8KB
visTypeTimeseries - -1.8MB 1.8MB
visTypeVega - -1.4MB 1.4MB
visTypeVislib - -38.8KB 38.8KB
visualize - -697.8KB 697.8KB
watcher - -602.5KB 602.5KB
total -57.2MB

miscellaneous assets size

id value diff baseline
apm - -49.0KB 49.0KB
enterpriseSearch - -644.9KB 644.9KB
kibanaLegacy - -928.6KB 928.6KB
maps - -978.6KB 978.6KB
securitySolution - -326.0KB 326.0KB
triggers_actions_ui - -27.7KB 27.7KB
total -2.9MB

page load bundle size

id value diff baseline
advancedSettings - -981.4KB 981.4KB
alerts - -89.3KB 89.3KB
apm - -44.0KB 44.0KB
apmOss - -3.9KB 3.9KB
beatsManagement - -581.6KB 581.6KB
bfetch - -26.2KB 26.2KB
canvas - -1.3MB 1.3MB
charts - -877.5KB 877.5KB
cloud - -5.9KB 5.9KB
console - -30.3KB 30.3KB
core - -1.2MB 1.2MB
crossClusterReplication - -192.1KB 192.1KB
dashboard - -708.3KB 708.3KB
dashboardEnhanced - -185.7KB 185.7KB
dashboardMode - -150.4KB 150.4KB
data - -1.5MB 1.5MB
dataEnhanced - -177.1KB 177.1KB
devTools - -166.1KB 166.1KB
discover - -230.0KB 230.0KB
discoverEnhanced - -29.2KB 29.2KB
embeddable - -435.1KB 435.1KB
embeddableEnhanced - -40.1KB 40.1KB
enterpriseSearch - -22.7KB 22.7KB
esUiShared - -994.2KB 994.2KB
expressions - -346.6KB 346.6KB
features - -15.8KB 15.8KB
fileUpload - -9.4KB 9.4KB
globalSearch - -27.9KB 27.9KB
globalSearchBar - -27.5KB 27.5KB
globalSearchProviders - -10.3KB 10.3KB
graph - -15.8KB 15.8KB
grokdebugger - -11.4KB 11.4KB
home - -26.7KB 26.7KB
indexLifecycleManagement - -232.5KB 232.5KB
indexManagement - -263.2KB 263.2KB
indexPatternManagement - -136.0KB 136.0KB
infra - -277.4KB 277.4KB
ingestManager - -514.3KB 514.3KB
ingestPipelines - -32.7KB 32.7KB
inputControlVis - -296.2KB 296.2KB
inspector - -277.4KB 277.4KB
kibanaLegacy - -232.6KB 232.6KB
kibanaReact - -646.0KB 646.0KB
kibanaUtils - -471.7KB 471.7KB
lens - -1.1MB 1.1MB
licenseManagement - -26.3KB 26.3KB
licensing - -26.8KB 26.8KB
lists - -164.1KB 164.1KB
logstash - -180.1KB 180.1KB
management - -30.2KB 30.2KB
maps - -301.1KB 301.1KB
mapsLegacy - -957.9KB 957.9KB
mapsLegacyLicensing - -4.1KB 4.1KB
ml - -873.5KB 873.5KB
monitoring - -302.6KB 302.6KB
navigation - -164.7KB 164.7KB
newsfeed - -21.9KB 21.9KB
observability - -52.3KB 52.3KB
painlessLab - -161.0KB 161.0KB
regionMap - -836.3KB 836.3KB
remoteClusters - -35.4KB 35.4KB
reporting - -304.2KB 304.2KB
rollup - -223.1KB 223.1KB
savedObjects - -235.7KB 235.7KB
savedObjectsManagement - -225.9KB 225.9KB
searchprofiler - -50.8KB 50.8KB
security - -305.7KB 305.7KB
securitySolution - -793.3KB 793.3KB
share - -80.0KB 80.0KB
snapshotRestore - -62.6KB 62.6KB
spaces - -489.6KB 489.6KB
telemetry - -75.0KB 75.0KB
telemetryManagementSection - -26.9KB 26.9KB
tileMap - -847.9KB 847.9KB
timelion - -14.4KB 14.4KB
transform - -25.5KB 25.5KB
triggers_actions_ui - -287.4KB 287.4KB
uiActions - -268.1KB 268.1KB
uiActionsEnhanced - -380.1KB 380.1KB
upgradeAssistant - -64.5KB 64.5KB
uptime - -25.1KB 25.1KB
urlForwarding - -17.1KB 17.1KB
usageCollection - -24.2KB 24.2KB
visTypeMarkdown - -560.0KB 560.0KB
visTypeMetric - -584.7KB 584.7KB
visTypeTable - -608.8KB 608.8KB
visTypeTagcloud - -841.2KB 841.2KB
visTypeTimelion - -715.9KB 715.9KB
visTypeTimeseries - -279.7KB 279.7KB
visTypeVega - -665.4KB 665.4KB
visTypeVislib - -1.3MB 1.3MB
visTypeXy - -5.1KB 5.1KB
visualizations - -412.5KB 412.5KB
visualize - -41.2KB 41.2KB
watcher - -28.8KB 28.8KB
total -29.4MB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@alisonelizabeth alisonelizabeth merged commit 05df9ef into elastic:master Sep 22, 2020
@alisonelizabeth alisonelizabeth deleted the feature/mappings_editor/point_field branch September 22, 2020 00:45
alisonelizabeth added a commit to alisonelizabeth/kibana that referenced this pull request Sep 22, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Sep 22, 2020
* master: (45 commits)
  [CSM] Use stacked chart for page views (elastic#78042)
  [Enterprise Search] Fix various plugin states when app has error connecting to Enterprise Search (elastic#78091)
  Remove service map beta badge (elastic#78039)
  [Enterprise Search] Rename "telemetry" to "stats" (elastic#78124)
  [Alerting] optimize calculation of unmuted alert instances (elastic#78021)
  call .destroy on ace when react component unmounts (elastic#78132)
  [Ingest Manager] Fix agent action acknowledgement (elastic#78089)
  [Upgrade Assistant] Rename "telemetry" to "stats" (elastic#78127)
  [Security Solution] Refactor Hosts Kpi to use Search Strategy (elastic#77606)
  Bump backport to 5.6.0 (elastic#78097)
  [Actions] adds a Test Connector tab in the Connectors list (elastic#77365)
  [Uptime] Improve ping chart axis (elastic#77992)
  [TSVB] Fields dropdowns are not populated if one of the indices is missing (elastic#77363)
  [UiActions] Remove duplicate apply filter action  (elastic#77485)
  [APM] Use transaction metrics for transaction error rate (elastic#78009)
  [ES-ARCHIVER] Fix bug when query flag is empty (elastic#77983)
  Edit UI text strings in Integrations and Fleet tabs (elastic#75837)
  [baseline capture] switch to large workers (elastic#78109)
  [SECURITY_SOLUTION] list UI is backwards compatible (elastic#77956)
  [Mappings editor] Add support for point field type (elastic#77543)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Index Management Index and index templates UI Feature:Mappings Editor Index mappings editor UI release_note:enhancement Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Mappings editor] Add UI form for point field type
5 participants