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

[Discover] Enable EuiDataGrid as default document table #89264

Merged
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
6210c00
Enable EuiDataGrid by default
kertal Jan 26, 2021
36e1575
Merge branch 'master' into kertal-pr-2020-01-26-discover-enable-data-…
kibanamachine Feb 5, 2021
6ec2e51
Merge branch 'master' into kertal-pr-2020-01-26-discover-enable-data-…
kibanamachine Feb 8, 2021
01e9376
Merge branch 'master' into kertal-pr-2020-01-26-discover-enable-data-…
kibanamachine Feb 10, 2021
5cc47d2
Merge branch 'master' into kertal-pr-2020-01-26-discover-enable-data-…
kibanamachine Feb 11, 2021
24f5515
Merge remote-tracking branch 'upstream/master' into kertal-pr-2020-01…
kertal Feb 11, 2021
084ca9e
Fix several functional test failures
kertal Feb 11, 2021
b02c2b2
Merge branch 'kertal-pr-2020-01-26-discover-enable-data-grid' of gith…
kertal Feb 11, 2021
80f48e4
Fix context navigation
kertal Feb 11, 2021
0c76315
Fix more tests
kertal Feb 11, 2021
f8fb55a
Fix even more tests
kertal Feb 13, 2021
eca4b36
Fix even more tests
kertal Feb 14, 2021
b38137b
Surprise, more tests fixed
kertal Feb 14, 2021
0b3f376
Guess what ... fixing more tests
kertal Feb 14, 2021
4429e3d
More tests for breakfast
kertal Feb 15, 2021
e5b7e8d
Increase default page size from 25 to 250
kertal Feb 15, 2021
486bcd8
Fix session test
kertal Feb 15, 2021
90a464e
Another fix
kertal Feb 15, 2021
4ffab69
Adapt security tests
kertal Feb 15, 2021
bae41c6
Enable legacy data grid for a11y tests
kertal Feb 15, 2021
83817de
Fix another security issue
kertal Feb 15, 2021
c192acc
Merge remote-tracking branch 'upstream/master' into kertal-pr-2020-01…
kertal Feb 15, 2021
4a2024d
Improve tests, again
kertal Feb 15, 2021
8102db0
Merge remote-tracking branch 'upstream/master' into kertal-pr-2020-01…
kertal Feb 15, 2021
4b363dc
Merge branch 'master' into kertal-pr-2020-01-26-discover-enable-data-…
kibanamachine Feb 16, 2021
f764227
Cleanups, and improving another test
kertal Feb 16, 2021
9701bd1
Merge branch 'kertal-pr-2020-01-26-discover-enable-data-grid' of gith…
kertal Feb 16, 2021
e181420
Fix dashboard embeddable
kertal Feb 16, 2021
510628d
Fix lots of tests
kertal Feb 16, 2021
a5b3279
Putting on the fix
kertal Feb 16, 2021
cdfd64d
Fixing tests softly with this commit
kertal Feb 17, 2021
42ddc0b
Need a better pix, to provide a fix
kertal Feb 17, 2021
49328d7
Adapt default page size
kertal Feb 17, 2021
206cd33
Adapt constants
kertal Feb 18, 2021
bbae519
Merge remote-tracking branch 'upstream/master' into kertal-pr-2020-01…
kertal Feb 18, 2021
77f00bc
Fix nomal!
kertal Feb 18, 2021
4c22116
Merge master / fix conflicts
kertal Mar 31, 2021
cbf69a5
Merge branch 'master' into kertal-pr-2020-01-26-discover-enable-data-…
kibanamachine Apr 12, 2021
a871c0c
Fix type errors
kertal Apr 12, 2021
1f280a7
Fix dashboard functional error
kertal Apr 12, 2021
ede9dfd
Fix another dashboard test
kertal Apr 12, 2021
ac0802c
Lint correctly
kertal Apr 13, 2021
49c6b00
Fix security app
kertal Apr 13, 2021
63d7a57
Fix dashboard test
kertal Apr 13, 2021
0b6883c
Fix more tests
kertal Apr 13, 2021
deff384
Fix even more tests
kertal Apr 13, 2021
78b01b8
Merge remote-tracking branch 'upstream/master' into kertal-pr-2020-01…
kertal Apr 13, 2021
f5eaa56
More test fix even
kertal Apr 14, 2021
1c34b81
Fix async search test
kertal Apr 14, 2021
0277c8d
Cleanup
kertal Apr 14, 2021
0998e6f
Remove unnecessary skip
kertal Apr 15, 2021
714c500
Merge remote-tracking branch 'upstream/master' into kertal-pr-2020-01…
kertal Apr 15, 2021
d2989e8
Fix functional tests
kertal Apr 15, 2021
099ba07
Merge remote-tracking branch 'upstream/master' into kertal-pr-2020-01…
kertal Apr 19, 2021
3c44aef
Fix runtime field editor
kertal Apr 19, 2021
60184de
Merge branch 'master' into kertal-pr-2020-01-26-discover-enable-data-…
kibanamachine Apr 20, 2021
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 @@ -15,7 +15,7 @@ export const gridStyle = {
rowHover: 'none',
};

export const pageSizeArr = [25, 50, 100];
export const pageSizeArr = [25, 50, 100, 250, 500];
export const defaultPageSize = 25;
export const toolbarVisibility = {
showColumnSelector: {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/discover/server/ui_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export const uiSettings: Record<string, UiSettingsParams> = {
name: i18n.translate('discover.advancedSettings.docTableVersionName', {
defaultMessage: 'Use legacy table',
}),
value: true,
value: false,
description: i18n.translate('discover.advancedSettings.docTableVersionDescription', {
defaultMessage:
'Discover uses a new table layout that includes better data sorting, drag-and-drop columns, and a full screen ' +
Expand Down
1 change: 1 addition & 0 deletions test/accessibility/apps/discover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await esArchiver.loadIfNeeded('logstash_functional');
await kibanaServer.uiSettings.update({
defaultIndex: 'logstash-*',
'doc_table:legacy': true,
});
await PageObjects.common.navigateToApp('discover');
await PageObjects.timePicker.setDefaultAbsoluteRange();
Expand Down
2 changes: 1 addition & 1 deletion test/examples/embeddables/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
});

it('saved search', async () => {
await dashboardExpect.savedSearchRowCount(50);
await dashboardExpect.savedSearchRowCount(11);
});
});

Expand Down
6 changes: 6 additions & 0 deletions test/functional/apps/context/_context_navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,23 @@ export default function ({ getService, getPageObjects }) {
const browser = getService('browser');
const docTable = getService('docTable');
const PageObjects = getPageObjects(['common', 'context', 'discover', 'timePicker']);
const kibanaServer = getService('kibanaServer');

describe('discover - context - back navigation', function contextSize() {
before(async function () {
await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings();
await kibanaServer.uiSettings.update({ 'doc_table:legacy': true });
await PageObjects.common.navigateToApp('discover');
for (const [columnName, value] of TEST_FILTER_COLUMN_NAMES) {
await PageObjects.discover.clickFieldListItem(columnName);
await PageObjects.discover.clickFieldListPlusFilter(columnName, value);
}
});

after(async function () {
await kibanaServer.uiSettings.replace({});
});

it('should go back after loading', async function () {
await retry.waitFor('user navigating to context and returning to discover', async () => {
// navigate to the context view
Expand Down
4 changes: 3 additions & 1 deletion test/functional/apps/context/_discover_navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ export default function ({ getService, getPageObjects }) {
const testSubjects = getService('testSubjects');
const dashboardAddPanel = getService('dashboardAddPanel');
const browser = getService('browser');
const kibanaServer = getService('kibanaServer');

describe('context link in discover', () => {
before(async () => {
await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings();
await kibanaServer.uiSettings.update({ 'doc_table:legacy': true });
await PageObjects.common.navigateToApp('discover');

for (const columnName of TEST_COLUMN_NAMES) {
Expand All @@ -46,7 +48,7 @@ export default function ({ getService, getPageObjects }) {
}
});
after(async () => {
await PageObjects.timePicker.resetDefaultAbsoluteRangeViaUiSettings();
await kibanaServer.uiSettings.replace({});
});

it('should open the context view with the selected document as anchor', async () => {
Expand Down
18 changes: 0 additions & 18 deletions test/functional/apps/dashboard/dashboard_filter_bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,24 +162,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});
});

describe('saved search filtering', function () {
before(async () => {
await filterBar.ensureFieldEditorModalIsClosed();
await PageObjects.dashboard.gotoDashboardLandingPage();
await PageObjects.dashboard.clickNewDashboard();
await PageObjects.timePicker.setDefaultDataRange();
});

it('are added when a cell magnifying glass is clicked', async function () {
await dashboardAddPanel.addSavedSearch('Rendering-Test:-saved-search');
await PageObjects.dashboard.waitForRenderComplete();
await testSubjects.click('docTableCellFilter');

const filterCount = await filterBar.getFilterCount();
expect(filterCount).to.equal(1);
});
});

describe('bad filters are loaded properly', function () {
before(async () => {
await filterBar.ensureFieldEditorModalIsClosed();
Expand Down
8 changes: 5 additions & 3 deletions test/functional/apps/dashboard/dashboard_time_picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import { PIE_CHART_VIS_NAME } from '../../page_objects/dashboard_page';
import { FtrProviderContext } from '../../ftr_provider_context';

export default function ({ getService, getPageObjects }: FtrProviderContext) {
const dashboardExpect = getService('dashboardExpect');
const pieChart = getService('pieChart');
const dashboardVisualizations = getService('dashboardVisualizations');
const PageObjects = getPageObjects(['dashboard', 'header', 'visualize', 'timePicker']);
const browser = getService('browser');
const log = getService('log');
const kibanaServer = getService('kibanaServer');
const dataGrid = getService('dataGrid');

describe('dashboard time picker', function describeIndexTests() {
before(async function () {
Expand Down Expand Up @@ -49,14 +49,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
name: 'saved search',
fields: ['bytes', 'agent'],
});
await dashboardExpect.docTableFieldCount(150);
const initialRows = await dataGrid.getDocTableRows();
expect(initialRows.length).to.be(11);

// Set to time range with no data
await PageObjects.timePicker.setAbsoluteRange(
'Jan 1, 2000 @ 00:00:00.000',
'Jan 1, 2000 @ 01:00:00.000'
);
await dashboardExpect.docTableFieldCount(0);
const noResults = await dataGrid.hasNoResults();
expect(noResults).to.be.ok();
});

it('Timepicker start, end, interval values are set by url', async () => {
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/embeddable_rendering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
// TODO add test for 'scripted filter and query' viz
// TODO add test for 'animal weight linked to search' viz
// TODO add test for the last vega viz
await dashboardExpect.savedSearchRowCount(50);
await dashboardExpect.savedSearchRowCount(11);
};

const expectNoDataRenders = async () => {
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/saved_search_embeddable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const marks = $('mark')
.toArray()
.map((mark) => $(mark).text());
expect(marks.length).to.be(50);
expect(marks.length).to.be(11);
});

it('removing a filter removes highlights', async function () {
Expand Down
4 changes: 3 additions & 1 deletion test/functional/apps/discover/_data_grid_field_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

it('the search term should be highlighted in the field data', async function () {
// marks is the style that highlights the text in yellow
await PageObjects.discover.clickFieldListItemAdd('extension');
const marks = await PageObjects.discover.getMarks();
expect(marks.length).to.be(50);
expect(marks.length).to.be.greaterThan(0);
expect(marks.indexOf('php')).to.be(0);
await PageObjects.discover.clickFieldListItemRemove('extension');
});

it('search type:apache should show the correct hit count', async function () {
Expand Down
16 changes: 8 additions & 8 deletions test/functional/apps/discover/_date_nanos_mixed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

it('shows a list of records of indices with date & date_nanos fields in the right order', async function () {
const rowData1 = await PageObjects.discover.getDocTableIndex(1);
expect(rowData1.startsWith('Jan 1, 2019 @ 12:10:30.124000000')).to.be.ok();
const rowData2 = await PageObjects.discover.getDocTableIndex(3);
expect(rowData2.startsWith('Jan 1, 2019 @ 12:10:30.123498765')).to.be.ok();
const rowData3 = await PageObjects.discover.getDocTableIndex(5);
expect(rowData3.startsWith('Jan 1, 2019 @ 12:10:30.123456789')).to.be.ok();
const rowData4 = await PageObjects.discover.getDocTableIndex(7);
expect(rowData4.startsWith('Jan 1, 2019 @ 12:10:30.123000000')).to.be.ok();
const rowData1 = await PageObjects.discover.getDocTableField(1);
expect(rowData1).to.be('Jan 1, 2019 @ 12:10:30.124000000');
const rowData2 = await PageObjects.discover.getDocTableField(2);
expect(rowData2).to.be('Jan 1, 2019 @ 12:10:30.123498765');
const rowData3 = await PageObjects.discover.getDocTableField(3);
expect(rowData3).to.be('Jan 1, 2019 @ 12:10:30.123456789');
const rowData4 = await PageObjects.discover.getDocTableField(4);
expect(rowData4).to.be('Jan 1, 2019 @ 12:10:30.123000000');
});
});
}
7 changes: 4 additions & 3 deletions test/functional/apps/discover/_discover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expect(time.end).to.be(PageObjects.timePicker.defaultEndTime);
const rowData = await PageObjects.discover.getDocTableIndex(1);
log.debug('check the newest doc timestamp in UTC (check diff timezone in last test)');
expect(rowData.startsWith('Sep 22, 2015 @ 23:50:13.253')).to.be.ok();
log.debug(rowData);
expect(rowData).to.contain('Sep 22, 2015 @ 23:50:13.253');
});

it('save query should show toast message and display query name', async function () {
Expand Down Expand Up @@ -303,7 +304,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings();
await PageObjects.common.navigateToApp('discover');
await PageObjects.discover.clickFieldListItemAdd('_score');
await PageObjects.discover.clickFieldSort('_score');
await PageObjects.discover.clickFieldSort('_score', 'Sort Low-High');
const currentUrlWithScore = await browser.getCurrentUrl();
expect(currentUrlWithScore).to.contain('_score');
await PageObjects.discover.clickFieldListItemAdd('_score');
Expand All @@ -314,7 +315,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings();
await PageObjects.common.navigateToApp('discover');
await PageObjects.discover.clickFieldListItemAdd('referer');
await PageObjects.discover.clickFieldSort('referer');
await PageObjects.discover.clickFieldSort('referer', 'Sort A-Z');
expect(await PageObjects.discover.getDocHeader()).to.have.string('Referer custom');
expect(await PageObjects.discover.getAllFieldNames()).to.contain('Referer custom');
const url = await browser.getCurrentUrl();
Expand Down
15 changes: 13 additions & 2 deletions test/functional/apps/discover/_doc_navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,23 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const PageObjects = getPageObjects(['common', 'discover', 'timePicker', 'context']);
const esArchiver = getService('esArchiver');
const retry = getService('retry');
const kibanaServer = getService('kibanaServer');

describe('doc link in discover', function contextSize() {
beforeEach(async function () {
before(async () => {
await esArchiver.loadIfNeeded('logstash_functional');
await esArchiver.loadIfNeeded('discover');
await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings();
await kibanaServer.uiSettings.update({
'doc_table:legacy': true,
'discover:searchFieldsFromSource': true,
});
});
after(async () => {
await kibanaServer.uiSettings.replace({});
});

beforeEach(async function () {
await PageObjects.common.navigateToApp('discover');
await PageObjects.discover.waitForDocTableLoadingComplete();
});
Expand All @@ -45,7 +56,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

// no longer relevant as null field won't be returned in the Fields API response
xit('add filter should create an exists filter if value is null (#7189)', async function () {
it('add filter should create an exists filter if value is null (#7189)', async function () {
await PageObjects.discover.waitUntilSearchingHasFinished();
// Filter special document
await filterBar.addFilter('agent', 'is', 'Missing/Fields');
Expand Down
Loading