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

[Lens] Combined histogram/range aggregation for numbers #76121

Merged
merged 73 commits into from
Sep 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
62ce297
:sparkles: First range/histogram implementation draft
dej611 Aug 27, 2020
dff176f
:sparkles: Implemented DnD reordering of ranges
dej611 Aug 31, 2020
4e1c418
:bug: Fixed transition from histogram to ranges
dej611 Sep 1, 2020
8650416
Merge remote-tracking branch 'upstream/master' into feature/lens/hist…
dej611 Sep 1, 2020
02fecd3
:white_check_mark: Add first batch of tests
dej611 Sep 2, 2020
cf4f62d
Merge remote-tracking branch 'upstream/master' into feature/lens/hist…
dej611 Sep 2, 2020
e3ca488
:sparkles: Reworked and addressed some more features
dej611 Sep 2, 2020
8fda9d8
:bug: Fix the i18n check issue duplicating symbols
dej611 Sep 2, 2020
a6e6064
:pencil2: Fix typo
dej611 Sep 3, 2020
b250e6e
:lipstick: Align UI to new design
dej611 Sep 3, 2020
3f3d1f7
:bug: Fix i18n message duplicate name
dej611 Sep 4, 2020
67ec91f
:lipstick: Match UI mock
dej611 Sep 4, 2020
83d8067
:bug: Fix x label, tooltip and filters with ranges
dej611 Sep 7, 2020
0bc6887
:lipstick: Revisit UI removing max Bars for now
dej611 Sep 7, 2020
f4e0875
:lipstick: Reworked the popover behaviour to be reactive on change
dej611 Sep 8, 2020
bcb59d6
:recycle: Restored back maxBars
dej611 Sep 8, 2020
6fa81b3
:ok_hand: First batch of review fixes
dej611 Sep 9, 2020
777f630
:lipstick: Add explanation tooltips
dej611 Sep 9, 2020
21f463a
:truck: Split advanced editor in its own file + fixed popover multipl…
dej611 Sep 9, 2020
9677fcc
:truck: Migrate to useDebounce
dej611 Sep 9, 2020
d9eb0e4
Merge remote-tracking branch 'upstream/master' into feature/lens/hist…
dej611 Sep 9, 2020
f620eb4
:lipstick: Fix the dnd no show on drag issue
dej611 Sep 9, 2020
6e12bbf
:wrench: Remove keyed param
dej611 Sep 10, 2020
f834db6
:bug: Fix raange validation
dej611 Sep 10, 2020
6accaaa
:bug: Fix decimals issue for intervals
dej611 Sep 10, 2020
be8bab5
:bug: Fix the empty state for interval value
dej611 Sep 10, 2020
7c2756f
:bug: Fix the max bars empty state
dej611 Sep 10, 2020
fc552dd
:lipstick: Better button size for popover edit
dej611 Sep 10, 2020
a27db97
:white_mark_check: Refactored code and fixed existing tests
dej611 Sep 10, 2020
445e81c
:wrench: Bump priority of operation for numeric values
dej611 Sep 10, 2020
29f9ca4
:camera_flash: Update snapshot based on new operation priority
dej611 Sep 10, 2020
53c7442
:sparkles: prioritize date histograms over ranges in suggestions
dej611 Sep 10, 2020
e062c66
:white_check_mark: Refactor + complete basic editor tests
dej611 Sep 14, 2020
2f6015d
:white_check_mark: Add range editor tests
dej611 Sep 14, 2020
1ad4fa1
:shuffle: Merged latest master
dej611 Sep 14, 2020
d900cd5
Merge remote-tracking branch 'origin/master' into HEAD
wylieconlon Sep 14, 2020
41a937c
🔧 Increase priority of ranges above terms for numeric fields
wylieconlon Sep 14, 2020
d3844a1
:bug: Various bug fixes (0 values + type fixes)
dej611 Sep 15, 2020
c07cc16
:alambic: First trial with custom labels
dej611 Sep 15, 2020
0aa9dc2
Revert ":alambic: First trial with custom labels"
dej611 Sep 15, 2020
1844d0b
:fire: Remove custom label as for now
dej611 Sep 16, 2020
5bae675
:sparkles: Close the popup on enter when in to field
dej611 Sep 16, 2020
dbc2e40
:white_check_mark: Reworked tests to remove custom labels and add rem…
dej611 Sep 16, 2020
d4fdfd1
:twisted_rightwards_arrows: Merged latest master + fixed conflicts
dej611 Sep 16, 2020
47ad1b9
Merge branch 'master' into feature/lens/histograms
elasticmachine Sep 16, 2020
55f6691
:label: fix type issues
dej611 Sep 16, 2020
f7664e9
:speech_balloon: Add grouping labels
dej611 Sep 16, 2020
da255ec
[Lens] use reusable component for drag and drop
mbondyra Sep 16, 2020
8b0fc01
Merge pull request #1 from mbondyra/lens/use-reusable-component-for-dnd
dej611 Sep 16, 2020
ca4095c
:label: Fix types again
dej611 Sep 16, 2020
8b0e7ba
:bug: Fix filters popover on click check for histograms
dej611 Sep 16, 2020
86479e5
Merge branch 'master' into feature/lens/histograms
elasticmachine Sep 16, 2020
2d03751
Update x-pack/plugins/lens/public/indexpattern_datasource/operations/…
dej611 Sep 17, 2020
a7389f7
Update x-pack/plugins/lens/public/indexpattern_datasource/operations/…
dej611 Sep 17, 2020
fe9164b
Update x-pack/plugins/lens/public/indexpattern_datasource/operations/…
dej611 Sep 17, 2020
1613370
Update x-pack/plugins/lens/public/indexpattern_datasource/operations/…
dej611 Sep 17, 2020
887ca93
:sparkles: Start with better default value + enable infinite range
dej611 Sep 17, 2020
516f1d7
Update x-pack/plugins/lens/public/indexpattern_datasource/operations/…
dej611 Sep 17, 2020
9b1d52e
:bug: Remount component when transitioning from auto to manual mode
dej611 Sep 17, 2020
9258d1b
:bug: Fix test
dej611 Sep 17, 2020
4786737
:lipstick: Remove form wrapper not used
dej611 Sep 17, 2020
8f2a4a0
Merge remote-tracking branch 'upstream/master' into feature/lens/hist…
dej611 Sep 17, 2020
c759d7a
:label: Fix type checks
dej611 Sep 17, 2020
bcc21b9
Update x-pack/plugins/lens/public/indexpattern_datasource/operations/…
dej611 Sep 17, 2020
18e9f34
:sparkles: New interval range input
dej611 Sep 18, 2020
01b8400
:white_check_mark: Refactor tests to handle new interval panel
dej611 Sep 18, 2020
5ee79b4
:fire: Remove non longer useful formatter
dej611 Sep 18, 2020
a0d2b23
:label: Fix type check issue
dej611 Sep 18, 2020
ad9f4f4
Merge branch 'master' into feature/lens/histograms
elasticmachine Sep 21, 2020
40deac1
:ok_hand: Use data test ids
dej611 Sep 22, 2020
4cfa4e6
:ok_hand: Use data plugin range definition
dej611 Sep 22, 2020
cdff81b
:recycle: Revert esaggs type refactor
dej611 Sep 22, 2020
a0e9aec
Adding tooltips and fixing layouts/spacing
Sep 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ export function BucketNestingEditor({
defaultMessage: 'Top values for each {field}',
values: { field: fieldName },
}),
range: i18n.translate('xpack.lens.indexPattern.groupingOverallRanges', {
defaultMessage: 'Top values for each {field}',
values: { field: fieldName },
}),
};

const bottomLevelCopy: Record<string, string> = {
Expand All @@ -90,6 +94,10 @@ export function BucketNestingEditor({
defaultMessage: 'Overall top {target}',
values: { target: target.fieldName },
}),
range: i18n.translate('xpack.lens.indexPattern.groupingSecondRanges', {
defaultMessage: 'Overall top {target}',
values: { target: target.fieldName },
}),
};

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ export function DimensionEditor(props: DimensionEditorProps) {

{!incompatibleSelectedOperationType && ParamEditor && (
<>
<EuiSpacer size="s" />
<ParamEditor
state={state}
setState={setState}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n/react';

import {
EuiForm,
EuiFormRow,
EuiSwitch,
EuiSwitchEvent,
Expand Down Expand Up @@ -42,7 +41,7 @@ export const dateHistogramOperation: OperationDefinition<DateHistogramIndexPatte
displayName: i18n.translate('xpack.lens.indexPattern.dateHistogram', {
defaultMessage: 'Date histogram',
}),
priority: 3, // Higher than any metric
priority: 5, // Highest priority level used
getPossibleOperationForField: ({ aggregationRestrictions, aggregatable, type }) => {
if (
type === 'date' &&
Expand Down Expand Up @@ -180,7 +179,7 @@ export const dateHistogramOperation: OperationDefinition<DateHistogramIndexPatte
};

return (
<EuiForm>
<>
{!intervalIsRestricted && (
<EuiFormRow display="rowCompressed" hasChildLabel={false}>
<EuiSwitch
Expand Down Expand Up @@ -314,7 +313,7 @@ export const dateHistogramOperation: OperationDefinition<DateHistogramIndexPatte
)}
</EuiFormRow>
)}
</EuiForm>
</>
);
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ export const FilterList = ({
removeTitle={i18n.translate('xpack.lens.indexPattern.filters.removeFilter', {
defaultMessage: 'Remove a filter',
})}
isNotRemovable={localFilters.length === 1}
>
<FilterPopover
data-test-subj="indexPattern-filters-existingFilterContainer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { BaseIndexPatternColumn } from './column_types';
import { IndexPatternPrivateState, IndexPattern, IndexPatternField } from '../../types';
import { DateRange } from '../../../../common';
import { DataPublicPluginStart } from '../../../../../../../src/plugins/data/public';
import { RangeIndexPatternColumn, rangeOperation } from './ranges';

// List of all operation definitions registered to this data source.
// If you want to implement a new operation, add the definition to this array and
Expand All @@ -40,6 +41,7 @@ const internalOperationDefinitions = [
cardinalityOperation,
sumOperation,
countOperation,
rangeOperation,
];

/**
Expand All @@ -49,6 +51,7 @@ const internalOperationDefinitions = [
*/
export type IndexPatternColumn =
| FiltersIndexPatternColumn
| RangeIndexPatternColumn
| TermsIndexPatternColumn
| DateHistogramIndexPatternColumn
| MinIndexPatternColumn
Expand All @@ -59,6 +62,7 @@ export type IndexPatternColumn =
| CountIndexPatternColumn;

export { termsOperation } from './terms';
export { rangeOperation } from './ranges';
export { filtersOperation } from './filters';
export { dateHistogramOperation } from './date_histogram';
export { minOperation, averageOperation, sumOperation, maxOperation } from './metrics';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.lnsRangesOperation__popoverButton {
@include euiTextBreakWord;
@include euiFontSizeS;
min-height: $euiSizeXL;
width: 100%;
}
Loading