Skip to content

Commit

Permalink
Updates warning for unsupported rolled up data function (#141524)
Browse files Browse the repository at this point in the history
* Updates warning for unsupported rolled up data function

* Update the functional test

* Fix text on functional test

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
  • Loading branch information
KOTungseth and stratoula authored Sep 28, 2022
1 parent 421150a commit 6ae4764
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export function getTSDBRollupWarningMessages(
).map((label) =>
i18n.translate('xpack.lens.indexPattern.tsdbRollupWarning', {
defaultMessage:
'"{label}" does not work for all indices in the selected data view because it\'s using a function which is not supported on rolled up data. Please edit the visualization to use another function or change the time range.',
'{label} uses a function that is unsupported by rolled up data. Select a different function or change the time range.',
values: {
label,
},
Expand Down
4 changes: 2 additions & 2 deletions x-pack/test/functional/apps/lens/group2/tsdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await testSubjects.click('lns-indexPatternDimension-median');
await PageObjects.lens.waitForVisualization('xyVisChart');
await PageObjects.lens.assertEditorWarning(
'"Median of kubernetes.container.memory.available.bytes" does not work for all indices in the selected data view because it\'s using a function which is not supported on rolled up data. Please edit the visualization to use another function or change the time range.'
'Median of kubernetes.container.memory.available.bytes uses a function that is unsupported by rolled up data. Select a different function or change the time range.'
);
});
it('shows warnings in dashboards as well', async () => {
await PageObjects.lens.save('New', false, false, false, 'new');

await PageObjects.dashboard.waitForRenderComplete();
await PageObjects.lens.assertInlineWarning(
'"Median of kubernetes.container.memory.available.bytes" does not work for all indices in the selected data view because it\'s using a function which is not supported on rolled up data. Please edit the visualization to use another function or change the time range.'
'Median of kubernetes.container.memory.available.bytes uses a function that is unsupported by rolled up data. Select a different function or change the time range.'
);
});
it('still shows other warnings as toast', async () => {
Expand Down

0 comments on commit 6ae4764

Please sign in to comment.