-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Implement first version of new aggregation controls, including support for metric configuration. #10281
Merged
Conversation
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
dennisoelkers
approved these changes
Mar 19, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, works great! 🎉
6 tasks
…figured multiple times.
…justing bootstrap elements padding. The negative row / form-group margin caused the horizontal scroll bar.
…Use` with `allowCreate`.
…ich separates each section of the metrics element configuration.
c89778f
to
c450d95
Compare
This was referenced Mar 25, 2021
janheise
pushed a commit
that referenced
this pull request
Mar 25, 2021
…t for metric configuration. (#10281) * Creating basic `AggregationWizard` component. * Creating basic components for aggregation attribute configuration. * Rename aggregation attribute to aggregation action. * Improve aggregation actions structure and expandability. * Fixing typo. * Fixing headline font size and `AggregationWizard` props. * Creating test for `AggregationActionSelect`. * Creating test for `ActionConfigurationContainer`. * Creating test for `AggregationWizard`. * Clearing `AggregationActionSelect` value after selection an action. * Renaming aggregation action properties label to title and value to key. * Reverting `AggregationWizard` usage in views bindings. * Fixing linter warnings. * List aggregation action in `AggregationActionSelect` if it can be configured multiple times. * Renaming aggregation action to aggregation element. * Do not add new section for an already configured aggregation action. * Removing no longer needed `createDefault` series method. * Changing order of configured aggregation elements. * Always display configured aggregation elements in correct order. * Updating `AggregationElementSelect.test`.` * Creating `WidgetConfigForm`. * Moving `SearchBarForm` from `EditWidgetFrame` to `WidgetQueryControls`. * Rename `MetricConfiguration` to `MetricsConfiguration`. * Creating basic metric form with function and field select. * Enable widget configuration update for metrics. * Providing correct initial values for metrics configuration form. * Removing no longer needed aggregation wizard state by using `WidgetConfigForm` only. * Updating type definition of `SeriesConfig` value and constructor. * Splitting up `AggregationWizard` in multiple components. * Migrating `AggregationFunctionsStore` to ts. * Importing aggregation functions for metrics configuration directly from `AggregationFunctionsStore`. * Reverting `Series` and `SeriesConfiguration` constructor type definition changes. * Fixing type imports * Only display aggregation element configuraion container if form has related values. * Validating metric functions, triggering manual validation on initial mount. * Validate form on change/on mount. * Switching from field-level to form-level validation. * Handling percentile parameter for `percentile` function. * Do not include metrics errors in validation result if empty. * Include name field for metric. * Include placeholder for name field. * Fixing vertical scrolling of aggregation elements column in aggregation wizard. (cherry picked from commit 0efd3b2) * Styling fixes * Removing section headlines to save vertical space. * Fixing horizontal scrolling of element configuration containers by adjusting bootstrap elements padding. The negative row / form-group margin caused the horizontal scroll bar. * Creating one file for each aggregation element. * Fixing types. * Fixing types. * Replacing aggregation element properties `isConfigured` and `multipleUse` with `allowCreate`. * Defining theme color for element separator. * Reducing element container padding. * Fixing `allowCreate` usage. * Providing form values as a prop for `AggregationElementSelect` to simplify testing. * Updating `AggregationElementSelect.test`. * Udpating `MetricsConfiguration.test`. * Adding missing key in `MetricsConfiguration`. * Extend PropType definition for common `Select` value with number. * Extending `AgggregationWizard.test` with tests for metrics element. * Fixing linter warnings * Updating `WidgetQueryControls.test` regarding `SearchBarForm` addition. * Implement `ElementConfigurationSection` for `MetricsConfiguration` which separates each section of the metrics element configuration. * Test configuration of metric with multiple functions. * Creating separate file for metric element tests. * Fixing linter warnings. * Reimplementing type definition for `Widget.tsx` config prop. * Fixing import path. Co-authored-by: Dennis Oelkers <dennis@graylog.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Please note: We need to merge #10212 first.
Motivation and Context
To make better use of the space we have in the aggregation builder edit component, we created a new layout which displays the controls on the left side of the aggregation. The new implementation displays only the configured aggregation elements.
Description
AggregationWizard
which contains the new controls and the visualization.editComponent
inviews/bindings
to not break the widget configuration.AggregationWizard
as theeditComponent
for aggregations.import AggregationWizard from 'views/components/aggregationwizard/AggregationWizard';
AggregationControls
we can rename theAggregationWizard
toAggregationControls
.aggregationWizard/aggregationElements
directory, in the future we will include them in theviews/bindings
.AggregationActionSelect
which is only listing not configured actions.ActionConfigurationContainer
which displays the title of an actionFixes: #9737
Types of changes
Checklist: