Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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