-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[ML] Redesign file-based Data Visualizer #87598
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
Merged
Merged
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
092ce21
[ML] Move to grid
qn895 c36c288
[ML] Update types for fields, remove old stats section
qn895 8dccac2
[ML] Move files out to stats datagrid, move common types to stats_dat…
qn895 0e13d1e
[ML] Move files out to stats datagrid, move common types to stats_dat…
qn895 9504dcb
[ML] Update mappings
qn895 5dda4db
[ML] Update tests for file based
qn895 5b65e84
[ML] Update filters for the file based data viz
qn895 659005a
[ML] Remove long
qn895 5c16ced
[ML] Update tests to assert field counts
qn895 b5d3b32
[ML] Update translations
qn895 bcb9005
Merge remote-tracking branch 'upstream/master' into ml-file-based-dat…
qn895 bb92c47
[ML] Remove 'long' and 'double' since we don't need it anymore
qn895 77176ee
[ML] Remove expanded row files into its own folder
qn895 fcf0d25
[ML] Update border styling
qn895 47dcf86
[ML] Fix field names
qn895 ed99b6c
[ML] Update for boolean content
qn895 09f2b31
[ML] Move createFields, filterFields
qn895 12055fd
[ML] Update boolean & number perview fields
qn895 aaed023
[ML] Update logic to show file based content preview
qn895 ea57967
[ML] Rename DataVisualizerDataGrid
qn895 68fa57f
[ML] Rename DataVisualizerTable types
qn895 898b686
[ML] Rename folder to stats_table
qn895 a2c8f30
[ML] Fix top values padding/margin inconsistent for long values
qn895 eaaf4b5
[ML] Fix types for stats number
qn895 0a51062
[ML] Update background color of expanded row to not change upon hover
qn895 a1004b9
Merge upstream/master into branch
qn895 8b99e8d
[ML] Delete redundant index file
qn895 eb5543f
[ML] Update boolean content
qn895 fb0677e
[ML] Update to common theme
qn895 be9bbc6
[ML] Update metric distribution chart to stats_table
qn895 f413c57
[ML] Add ip field support
qn895 9815f7a
[ML] Update translations
qn895 514f4a9
[ML] Remove duplicate es mapping
qn895 4d40cd5
Merge remote-tracking branch 'upstream/master' into ml-file-based-dat…
qn895 955932d
[ML] Add stats to boolean and count
qn895 bc29f19
[ML] Rename MetaTable to DocumentStatsTable
qn895 bccd4e7
[ML] Update IS_DARK_THEME and move ot use theme
qn895 18fad5d
[ML] Extend ListingPageUrlState
qn895 b70f474
[ML] Refactor field count stats to use same component and classname, …
qn895 93d64cc
[ML] Add FileBasedUnknownFieldVisConfig
qn895 5ae610d
[ML] Fix omit to exclude for mapping.properties.type
qn895 e6f1c5f
[ML] Update updatePageState type and isIndexBasedFieldVisConfig
qn895 3a0435f
[ML] Update translations
qn895 4c3047f
[ML] add document stats to all field
qn895 a640650
[ML] Remove redundant flexitem
qn895 d71e562
[ML] Update translations
qn895 16c7b4b
[ML] Update max width for doc stats column and guttersize for keyword
qn895 418f7ed
Merge remote-tracking branch 'upstream/master' into ml-file-based-dat…
qn895 e296ac0
[ML] Update guttersize for ip
qn895 5773aec
Merge upstream/master into branch
qn895 655fdeb
[ML] update geopoint
qn895 e69af6a
Update scss
qn895 f926679
Merge remote-tracking branch 'upstream/master' into ml-file-based-dat…
qn895 e09dc6f
[ML] Update chart theme
qn895 f46544e
Merge remote-tracking branch 'upstream/master' into ml-file-based-dat…
qn895 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
2 changes: 1 addition & 1 deletion
2
x-pack/plugins/ml/public/application/datavisualizer/_index.scss
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| @import 'file_based/index'; | ||
| @import 'index_based/index'; | ||
| @import 'stats_datagrid/index'; | ||
| @import 'stats_table/index'; |
1 change: 0 additions & 1 deletion
1
x-pack/plugins/ml/public/application/datavisualizer/file_based/components/_index.scss
This file contains hidden or 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 |
|---|---|---|
| @@ -1,7 +1,6 @@ | ||
| @import 'file_datavisualizer_view/index'; | ||
| @import 'results_view/index'; | ||
| @import 'analysis_summary/index'; | ||
| @import 'fields_stats/index'; | ||
| @import 'about_panel/index'; | ||
| @import 'import_summary/index'; | ||
| @import 'experimental_badge/index'; |
This file contains hidden or 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
7 changes: 7 additions & 0 deletions
7
.../plugins/ml/public/application/datavisualizer/file_based/components/expanded_row/index.ts
This file contains hidden or 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,7 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License; | ||
| * you may not use this file except in compliance with the Elastic License. | ||
| */ | ||
|
|
||
| export { FileBasedDataVisualizerExpandedRow } from './file_based_expanded_row'; |
7 changes: 7 additions & 0 deletions
7
...lugins/ml/public/application/datavisualizer/file_based/components/field_data_row/index.ts
This file contains hidden or 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,7 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License; | ||
| * you may not use this file except in compliance with the Elastic License. | ||
| */ | ||
|
|
||
| export { FileBasedNumberContentPreview } from './number_content_preview'; |
55 changes: 55 additions & 0 deletions
55
...pplication/datavisualizer/file_based/components/field_data_row/number_content_preview.tsx
This file contains hidden or 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,55 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License; | ||
| * you may not use this file except in compliance with the Elastic License. | ||
| */ | ||
| import React from 'react'; | ||
| import { FormattedMessage } from '@kbn/i18n/react'; | ||
| import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; | ||
| import { FileBasedFieldVisConfig } from '../../../stats_table/types'; | ||
|
|
||
| export const FileBasedNumberContentPreview = ({ config }: { config: FileBasedFieldVisConfig }) => { | ||
| const stats = config.stats; | ||
| if ( | ||
| stats === undefined || | ||
| stats.min === undefined || | ||
| stats.median === undefined || | ||
| stats.max === undefined | ||
| ) | ||
| return null; | ||
| return ( | ||
| <EuiFlexGroup direction={'column'} gutterSize={'xs'}> | ||
| <EuiFlexGroup gutterSize="xs"> | ||
| <EuiFlexItem> | ||
| <b> | ||
| <FormattedMessage | ||
| id="xpack.ml.fileDatavisualizer.fieldStatsCard.minTitle" | ||
| defaultMessage="min" | ||
| /> | ||
| </b> | ||
| </EuiFlexItem> | ||
| <EuiFlexItem> | ||
| <b> | ||
| <FormattedMessage | ||
| id="xpack.ml.fileDatavisualizer.fieldStatsCard.medianTitle" | ||
| defaultMessage="median" | ||
| /> | ||
| </b> | ||
| </EuiFlexItem> | ||
| <EuiFlexItem> | ||
| <b> | ||
| <FormattedMessage | ||
| id="xpack.ml.fileDatavisualizer.fieldStatsCard.maxTitle" | ||
| defaultMessage="max" | ||
| /> | ||
| </b> | ||
| </EuiFlexItem> | ||
| </EuiFlexGroup> | ||
| <EuiFlexGroup gutterSize="xs"> | ||
| <EuiFlexItem>{stats.min}</EuiFlexItem> | ||
| <EuiFlexItem>{stats.median}</EuiFlexItem> | ||
| <EuiFlexItem>{stats.max}</EuiFlexItem> | ||
| </EuiFlexGroup> | ||
| </EuiFlexGroup> | ||
| ); | ||
| }; | ||
46 changes: 46 additions & 0 deletions
46
...pplication/datavisualizer/file_based/components/field_names_filter/field_names_filter.tsx
This file contains hidden or 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,46 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License; | ||
| * you may not use this file except in compliance with the Elastic License. | ||
| */ | ||
| import React, { FC, useMemo } from 'react'; | ||
| import { i18n } from '@kbn/i18n'; | ||
| import { MultiSelectPicker } from '../../../../components/multi_select_picker'; | ||
| import type { | ||
| FileBasedFieldVisConfig, | ||
| FileBasedUnknownFieldVisConfig, | ||
| } from '../../../stats_table/types/field_vis_config'; | ||
|
|
||
| interface Props { | ||
| fields: Array<FileBasedFieldVisConfig | FileBasedUnknownFieldVisConfig>; | ||
| setVisibleFieldNames(q: string[]): void; | ||
| visibleFieldNames: string[]; | ||
| } | ||
|
|
||
| export const DataVisualizerFieldNamesFilter: FC<Props> = ({ | ||
| fields, | ||
| setVisibleFieldNames, | ||
| visibleFieldNames, | ||
| }) => { | ||
| const fieldNameTitle = useMemo( | ||
| () => | ||
| i18n.translate('xpack.ml.dataVisualizer.fileBased.fieldNameSelect', { | ||
| defaultMessage: 'Field name', | ||
| }), | ||
| [] | ||
| ); | ||
| const options = useMemo( | ||
| () => fields.filter((d) => d.fieldName !== undefined).map((d) => ({ value: d.fieldName! })), | ||
| [fields] | ||
| ); | ||
|
|
||
| return ( | ||
| <MultiSelectPicker | ||
| title={fieldNameTitle} | ||
| options={options} | ||
| onChange={setVisibleFieldNames} | ||
| checkedOptions={visibleFieldNames} | ||
| dataTestSubj={'mlDataVisualizerFieldNameSelect'} | ||
| /> | ||
| ); | ||
| }; |
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.