Skip to content

Commit

Permalink
fixing issue with dashboard csv download (#42964)
Browse files Browse the repository at this point in the history
* fixing issue with dashboard csv download

* fixing test fixture to match new sort storage format for saved searches

* fixing sort in additional fixtures
  • Loading branch information
bmcconaghy authored Aug 9, 2019
1 parent f411470 commit 5e76040
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ export async function generateCsvSearch(
payloadQuery
);

const [savedSortField, savedSortOrder] = savedSearchObjectAttr.sort;
const sortConfig = [...payloadSort, { [savedSortField]: { order: savedSortOrder } }];

const savedSortConfigs = savedSearchObjectAttr.sort;
const sortConfig = [...payloadSort];
savedSortConfigs.forEach(([savedSortField, savedSortOrder]) => {
sortConfig.push({ [savedSortField]: { order: savedSortOrder } });
});
const scriptFieldsConfig = indexPatternFields
.filter((f: IndexPatternField) => f.scripted)
.reduce((accum: any, curr: IndexPatternField) => {
Expand Down Expand Up @@ -137,7 +139,6 @@ export async function generateCsvSearch(
sort: sortConfig,
},
};

const { callWithRequest } = server.plugins.elasticsearch.getCluster('data');
const callCluster = (...params: any[]) => callWithRequest(req, ...params);
const config = server.config();
Expand Down
Binary file not shown.
Binary file modified x-pack/test/functional/es_archives/reporting/logs/data.json.gz
Binary file not shown.
Binary file modified x-pack/test/functional/es_archives/reporting/nanos/data.json.gz
Binary file not shown.
Binary file modified x-pack/test/functional/es_archives/reporting/sales/data.json.gz
Binary file not shown.
Binary file not shown.

0 comments on commit 5e76040

Please sign in to comment.