forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Streams] Schema Editor UX improvements (elastic#207066)
## Summary Closes elastic/streams-program#53 ## Overview of changes Enhanced filters for status / type. I omitted field parent (in designs) as this feels superfluous (can likely be facilitated via the inherited status). ![Screenshot 2025-01-21 at 14 39 53](https://github.com/user-attachments/assets/4ea43477-0fb7-4f29-9522-d2fabfd653a3) Children in the children affected callout are now linked ![Screenshot 2025-01-21 at 14 40 23](https://github.com/user-attachments/assets/0ce040c0-f6fc-479c-8941-25a493f1349a) ECS recommendations are given for type if available ![Screenshot 2025-01-21 at 14 40 41](https://github.com/user-attachments/assets/ab47f839-8a59-47af-898d-f7eb93de3107) For format (with date type) some popular options are now provided in a select. It's not exhaustive as there are **a lot** of format options. A toggle to switch to a freeform mode is provided. ![Screenshot 2025-01-21 at 14 41 10](https://github.com/user-attachments/assets/f89a9c14-d711-495d-a6df-54288d12592b) ![Screenshot 2025-01-21 at 14 41 20](https://github.com/user-attachments/assets/078733bd-dc19-435f-a10a-271723ab2c9f) Data Grid toolbar is added ![Screenshot 2025-01-21 at 14 41 42](https://github.com/user-attachments/assets/f234b965-9d90-452c-b0e5-8f918bc85756) Field parent link in badges is now more obvious ![Screenshot 2025-01-21 at 14 41 56](https://github.com/user-attachments/assets/001ed451-7930-48da-beba-95865b79a0bd) The only thing I haven't added from the nice to haves was the refresh button, I think we should wait to see if we actually need this (as it's technically a refresh of two entities - the definition and the unmapped fields). --------- Co-authored-by: kibanamachine <[email protected]>
- Loading branch information
Showing
21 changed files
with
630 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
...y/plugins/streams_app/public/components/stream_detail_schema_editor/configuration_maps.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
|
||
export const FIELD_TYPE_MAP = { | ||
boolean: { | ||
label: i18n.translate('xpack.streams.streamDetailSchemaEditorFieldsTableBooleanType', { | ||
defaultMessage: 'Boolean', | ||
}), | ||
}, | ||
date: { | ||
label: i18n.translate('xpack.streams.streamDetailSchemaEditorFieldsTableDateType', { | ||
defaultMessage: 'Date', | ||
}), | ||
}, | ||
keyword: { | ||
label: i18n.translate('xpack.streams.streamDetailSchemaEditorFieldsTableKeywordType', { | ||
defaultMessage: 'Keyword', | ||
}), | ||
}, | ||
match_only_text: { | ||
label: i18n.translate('xpack.streams.streamDetailSchemaEditorFieldsTableTextType', { | ||
defaultMessage: 'Text', | ||
}), | ||
}, | ||
long: { | ||
label: i18n.translate('xpack.streams.streamDetailSchemaEditorFieldsTableNumberType', { | ||
defaultMessage: 'Number (long)', | ||
}), | ||
}, | ||
double: { | ||
label: i18n.translate('xpack.streams.streamDetailSchemaEditorFieldsTableNumberType', { | ||
defaultMessage: 'Number (double)', | ||
}), | ||
}, | ||
ip: { | ||
label: i18n.translate('xpack.streams.streamDetailSchemaEditorFieldsTableIpType', { | ||
defaultMessage: 'IP', | ||
}), | ||
}, | ||
}; | ||
|
||
export const FIELD_STATUS_MAP = { | ||
inherited: { | ||
color: 'hollow', | ||
label: i18n.translate('xpack.streams.streamDetailSchemaEditorInheritedStatusLabel', { | ||
defaultMessage: 'Inherited', | ||
}), | ||
}, | ||
mapped: { | ||
color: 'success', | ||
label: i18n.translate('xpack.streams.streamDetailSchemaEditorMappedStatusLabel', { | ||
defaultMessage: 'Mapped', | ||
}), | ||
}, | ||
unmapped: { | ||
color: 'default', | ||
label: i18n.translate('xpack.streams.streamDetailSchemaEditorUnmappedStatusLabel', { | ||
defaultMessage: 'Unmapped', | ||
}), | ||
}, | ||
}; | ||
|
||
export type FieldStatus = keyof typeof FIELD_STATUS_MAP; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.