Skip to content

Commit ec8ff29

Browse files
Merge branch 'main' into chore/langchain-core-bump
2 parents 083bcb6 + 45641c3 commit ec8ff29

22 files changed

Lines changed: 178 additions & 121 deletions

File tree

src/platform/packages/shared/kbn-visualization-ui-components/components/query_input/filter_query_input.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ export function FilterQueryInput({
7878
dataView
7979
);
8080

81+
const emptyFilterQueryText = i18n.translate(
82+
'visualizationUiComponents.filterQueryInput.emptyFilterQuery',
83+
{
84+
defaultMessage: '(empty)',
85+
}
86+
);
87+
const filterQueryText = (inputFilter?.query as string) || emptyFilterQueryText;
88+
8189
return (
8290
<EuiFormRow
8391
display="rowCompressed"
@@ -135,14 +143,9 @@ export function FilterQueryInput({
135143
defaultMessage: 'Click to edit',
136144
}
137145
)}
146+
aria-label={`${filterByLabel} ${filterQueryText}`}
138147
>
139-
{(inputFilter?.query as string) ||
140-
i18n.translate(
141-
'visualizationUiComponents.filterQueryInput.emptyFilterQuery',
142-
{
143-
defaultMessage: '(empty)',
144-
}
145-
)}
148+
{filterQueryText}
146149
</EuiLink>
147150
</EuiFlexItem>
148151
</EuiFlexGroup>

src/platform/plugins/shared/dashboard/public/dashboard_app/no_data/dashboard_app_no_data.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const DashboardAppNoDataPage = ({
7575
query: `FROM ${indexName}`,
7676
http: coreServices.http,
7777
});
78-
const esqlQuery = getInitialESQLQuery(dataView);
78+
const esqlQuery = getInitialESQLQuery(dataView, true);
7979

8080
try {
8181
const columns = await getESQLQueryColumns({

src/platform/test/functional/apps/dashboard/group6/dashboard_esql_no_data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
3535

3636
await panelActions.clickEdit();
3737
const editorValue = await monacoEditor.getCodeEditorValue();
38-
expect(editorValue).to.eql(`FROM logs* | LIMIT 10`);
38+
expect(editorValue).to.eql(`FROM logs*`);
3939
});
4040
});
4141
}

x-pack/platform/plugins/shared/agent_builder/server/routes/wrap_handler.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,12 @@ export const getHandlerWrapper =
4141
if (!ignoreLicense) {
4242
const { license } = await ctx.licensing;
4343
if (!isValidLicense(license)) {
44-
return res.forbidden();
44+
return res.forbidden({
45+
body: {
46+
message:
47+
'Invalid license level. Agent Builder APIs require an Enterprise license or higher.',
48+
},
49+
});
4550
}
4651
}
4752

x-pack/platform/plugins/shared/lens/public/datasources/form_based/dimension_panel/field_input.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@ export function FieldInput({
4444
selectedOperationDefinition?.input,
4545
currentFieldIsInvalid
4646
);
47+
const fieldLabel = i18n.translate('xpack.lens.indexPattern.chooseField', {
48+
defaultMessage: 'Field',
49+
});
4750
return (
4851
<EuiFormRow
4952
data-test-subj="indexPattern-field-selection-row"
50-
label={i18n.translate('xpack.lens.indexPattern.chooseField', {
51-
defaultMessage: 'Field',
52-
})}
53+
label={fieldLabel}
5354
fullWidth
5455
isInvalid={Boolean(incompleteOperation || currentFieldIsInvalid)}
5556
error={fieldErrorMessage}
@@ -86,6 +87,7 @@ export function FieldInput({
8687
groupId,
8788
dimensionGroups
8889
)}
90+
aria-label={fieldLabel}
8991
/>
9092
</EuiFormRow>
9193
);

x-pack/platform/plugins/shared/lens/public/datasources/form_based/dimension_panel/field_select.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export interface FieldSelectProps extends EuiComboBoxProps<EuiComboBoxOptionOpti
3838
'data-test-subj'?: string;
3939
showTimeSeriesDimensions: boolean;
4040
'aria-describedby'?: string;
41+
'aria-label'?: string;
4142
}
4243

4344
export function FieldSelect({
@@ -53,6 +54,7 @@ export function FieldSelect({
5354
['data-test-subj']: dataTestSub,
5455
showTimeSeriesDimensions,
5556
['aria-describedby']: ariaDescribedby,
57+
['aria-label']: ariaLabel,
5658
}: FieldSelectProps) {
5759
const { hasFieldData } = useExistingFieldsReader();
5860
const memoizedFieldOptions = useMemo(() => {
@@ -212,6 +214,7 @@ export function FieldSelect({
212214
fieldIsInvalid={Boolean(incompleteOperation || fieldIsInvalid)}
213215
data-test-subj={dataTestSub ?? 'indexPattern-dimension-field'}
214216
aria-describedby={ariaDescribedby}
217+
aria-label={ariaLabel}
215218
/>
216219
);
217220
}

x-pack/platform/plugins/shared/lens/public/datasources/form_based/dimension_panel/format_selector.test.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,26 @@ describe('FormatSelector', () => {
9393
expect(screen.queryByLabelText('Decimals')).toHaveValue(2);
9494
expect(screen.queryByTestId('lns-indexpattern-dimension-formatCompact')).toBeInTheDocument();
9595
});
96+
97+
it('sets compact to true by default when selecting duration format', async () => {
98+
renderFormatSelector({
99+
selectedColumn: {
100+
...props.selectedColumn,
101+
params: { format: { id: 'number' } },
102+
},
103+
});
104+
105+
// Change format from number to duration
106+
const formatInput = within(screen.getByTestId('indexPattern-dimension-format')).getByRole(
107+
'combobox'
108+
);
109+
await user.click(formatInput);
110+
fireEvent.click(screen.getByText('Duration'));
111+
112+
expect(props.onChange).toBeCalledWith({
113+
id: 'duration',
114+
params: { decimals: 0, compact: true },
115+
});
116+
});
96117
});
97118
});

x-pack/platform/plugins/shared/lens/public/datasources/form_based/dimension_panel/format_selector.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,10 @@ export function FormatSelector(props: FormatSelectorProps) {
244244
const defaultDecimals = supportedFormats[id].defaultDecimals;
245245
onChange({
246246
id: choices[0].value,
247-
params: { decimals: defaultDecimals ?? decimals },
247+
params: {
248+
decimals: defaultDecimals ?? decimals,
249+
...(id === 'duration' ? { compact: true } : {}),
250+
},
248251
});
249252
setDecimals(defaultDecimals ?? decimals);
250253
},

x-pack/platform/plugins/shared/lens/public/datasources/form_based/dimension_panel/reduced_time_range.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ export function ReducedTimeRange({
184184
setLocalValue(choice);
185185
}
186186
}}
187+
aria-label={label}
187188
/>
188189
</EuiFlexItem>
189190
</EuiFlexGroup>

x-pack/platform/plugins/shared/lens/public/datasources/form_based/dimension_panel/time_scaling.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ export interface TimeScalingProps {
5151

5252
export function TimeScaling({ selectedColumn, columnId, layer, updateLayer }: TimeScalingProps) {
5353
const selectedOperation = operationDefinitionMap[selectedColumn.operationType];
54+
const timeScaleLabel = i18n.translate('xpack.lens.indexPattern.timeScale.label', {
55+
defaultMessage: 'Normalize by unit',
56+
});
5457

5558
if (!selectedOperation.timeScalingMode || selectedOperation.timeScalingMode === 'disabled') {
5659
return null;
@@ -62,9 +65,7 @@ export function TimeScaling({ selectedColumn, columnId, layer, updateLayer }: Ti
6265
fullWidth
6366
label={
6467
<span>
65-
{i18n.translate('xpack.lens.indexPattern.timeScale.label', {
66-
defaultMessage: 'Normalize by unit',
67-
})}{' '}
68+
{timeScaleLabel}{' '}
6869
<EuiIconTip
6970
type="question"
7071
color="subdued"
@@ -101,6 +102,7 @@ export function TimeScaling({ selectedColumn, columnId, layer, updateLayer }: Ti
101102
const value = e.target.value || undefined;
102103
updateLayer(setTimeScaling(columnId, layer, value as TimeScaleUnit));
103104
}}
105+
aria-label={timeScaleLabel}
104106
/>
105107
</EuiFlexItem>
106108
</EuiFlexGroup>

0 commit comments

Comments
 (0)