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.
[Rollup] Metrics multiple selection (elastic#42927)
* remove duplicate columns declaration * First iteration of select all menu working * A lot of bugfixes and started on row-level selection using flatMap * Wip on row selection * Fix formatting * More bug fixes and and first iteration of row selection and column selection working * Minor refactors, cleaned up logging. Still has nasty UX bug on Popover menu * Added translations and empty tests * Tests are WiP * Move checkboxes out of popover * Implemented first iteration of select all functionality * Move row select all into checkbox area * Remove unused code and simplify select all if-else * First iteration of tests * fix tests and update name data-test-subj name * Move checkboxes into popover with button * - Fix tests - Refactor test helpers for metric step - Cleanup some JS style nits - Make popover button disabled if all metric checkboxes are disabled * Remove extra newline * - Moved constants from metrics to own file so that it's more re-usable - Removed unnecessary styling - Fixed typos - Updated comments - i18n
- Loading branch information
1 parent
838bb39
commit afcfdcb
Showing
7 changed files
with
557 additions
and
136 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
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 |
---|---|---|
|
@@ -7,3 +7,7 @@ | |
export { | ||
CRUD_APP_BASE_PATH, | ||
} from './paths'; | ||
|
||
export { | ||
METRICS_CONFIG | ||
} from './metrics_config'; |
45 changes: 45 additions & 0 deletions
45
x-pack/legacy/plugins/rollup/public/crud_app/constants/metrics_config.js
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,45 @@ | ||
/* | ||
* 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 { i18n } from '@kbn/i18n'; | ||
|
||
export const METRICS_CONFIG = [ | ||
{ | ||
type: 'avg', | ||
label: i18n.translate( | ||
'xpack.rollupJobs.create.stepMetrics.checkboxAverageLabel', | ||
{ defaultMessage: 'Average' }, | ||
), | ||
}, | ||
{ | ||
type: 'max', | ||
label: i18n.translate( | ||
'xpack.rollupJobs.create.stepMetrics.checkboxMaxLabel', | ||
{ defaultMessage: 'Maximum' }, | ||
), | ||
}, | ||
{ | ||
type: 'min', | ||
label: i18n.translate( | ||
'xpack.rollupJobs.create.stepMetrics.checkboxMinLabel', | ||
{ defaultMessage: 'Minimum' }, | ||
), | ||
}, | ||
{ | ||
type: 'sum', | ||
label: i18n.translate( | ||
'xpack.rollupJobs.create.stepMetrics.checkboxSumLabel', | ||
{ defaultMessage: 'Sum' }, | ||
), | ||
}, | ||
{ | ||
type: 'value_count', | ||
label: i18n.translate( | ||
'xpack.rollupJobs.create.stepMetrics.checkboxValueCountLabel', | ||
{ defaultMessage: 'Value count' }, | ||
), | ||
}, | ||
]; |
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.