Skip to content

Commit

Permalink
[Reporting] Remove "download CSV" export type functionality (elastic#…
Browse files Browse the repository at this point in the history
…199033)

## Summary

Closes elastic/kibana-team#1202

This PR removes the CSV Download feature, and API from Kibana. Any logic
that is based on the `xpack.reporting.csv.enablePanelActionDownload`
setting has been removed.

## Release Note

The functionality that allowed users to download of a CSV export from a
dashboard saved search panel without creating a report has been removed.
To export CSV data from a dashboard panel, users may use the action menu
of a saved search panel in a dashboard to generate a CSV report, and
download the report from a toast popup when the report has finished
generating.

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)
- [x] This will appear in the **Release Notes** and follow the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
tsullivan and kibanamachine authored Nov 6, 2024
1 parent 4f9ab47 commit 1df9479
Show file tree
Hide file tree
Showing 31 changed files with 10 additions and 940 deletions.
2 changes: 1 addition & 1 deletion packages/kbn-generate-csv/src/generate_csv.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const getMockConfig = (opts: Partial<CsvConfigType> = {}): CsvConfigType => ({
maxSizeBytes: 180000,
useByteOrderMarkEncoding: false,
scroll: { size: 500, duration: '30s', strategy: 'pit' },
enablePanelActionDownload: true,
enablePanelActionDownload: false,
maxConcurrentShardRequests: 5,
...opts,
});
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-generate-csv/src/generate_csv_esql.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ describe('CsvESQLGenerator', () => {
maxSizeBytes: 180000,
useByteOrderMarkEncoding: false,
scroll: { size: 500, duration: '30s', strategy: 'pit' },
enablePanelActionDownload: true,
enablePanelActionDownload: false,
maxConcurrentShardRequests: 5,
};

Expand Down Expand Up @@ -569,7 +569,7 @@ describe('CsvESQLGenerator', () => {
maxSizeBytes: 180000,
useByteOrderMarkEncoding: false,
scroll: { size: 500, duration: '30s', strategy: 'pit' },
enablePanelActionDownload: true,
enablePanelActionDownload: false,
maxConcurrentShardRequests: 5,
};
mockSearchResponse({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('getExportSettings', () => {
scroll: { size: 500, duration: '30s', strategy: 'pit' },
useByteOrderMarkEncoding: false,
maxConcurrentShardRequests: 5,
enablePanelActionDownload: true,
enablePanelActionDownload: false,
};

taskInstanceFields = { startedAt: null, retryAt: null };
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-reporting/common/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const INTERNAL_ROUTES = {
DELETE_PREFIX: prefixInternalPath + '/jobs/delete', // docId is added to the final path
DOWNLOAD_PREFIX: prefixInternalPath + '/jobs/download', // docId is added to the final path
},
DOWNLOAD_CSV: prefixInternalPath + '/generate/immediate/csv_searchsource', // DEPRECATED
GENERATE_PREFIX: prefixInternalPath + '/generate', // exportTypeId is added to the final path
};

Expand Down

This file was deleted.

157 changes: 0 additions & 157 deletions packages/kbn-reporting/export_types/csv/csv_searchsource_immediate.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/kbn-reporting/export_types/csv/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@

export { CsvSearchSourceExportType } from './csv_searchsource';
export { CsvV2ExportType } from './csv_v2';
export { CsvSearchSourceImmediateExportType } from './csv_searchsource_immediate';
2 changes: 0 additions & 2 deletions packages/kbn-reporting/export_types/csv/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@
"@kbn/discover-plugin",
"@kbn/data-plugin",
"@kbn/generate-csv",
"@kbn/core-http-server",
"@kbn/reporting-server",
"@kbn/reporting-export-types-csv-common",
"@kbn/reporting-mocks-server",
"@kbn/core-http-request-handler-context-server",
"@kbn/field-formats-plugin",
"@kbn/core-http-server-mocks",
]
}
17 changes: 0 additions & 17 deletions packages/kbn-reporting/export_types/csv_common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,6 @@ import type {

export * from './constants';

/**
* @deprecated
* Requires `xpack.reporting.csv.enablePanelActionDownload` set to `true` (default is false)
*/
export interface JobParamsDownloadCSV {
browserTimezone: string;
title: string;
searchSource: SerializedSearchSourceFields;
columns?: string[];
}

interface BaseParamsCSV {
searchSource: SerializedSearchSourceFields;
columns?: string[];
Expand Down Expand Up @@ -62,12 +51,6 @@ export interface TaskPayloadCsvFromSavedObject extends CsvFromSavedObjectBase, B

export const CSV_REPORTING_ACTION = 'generateCsvReport';

/**
* @deprecated
* Requires `xpack.reporting.csv.enablePanelActionDownload` set to `true` (default is false)
*/
export const CSV_SEARCHSOURCE_IMMEDIATE_TYPE = 'csv_searchsource_immediate';

/**
* @deprecated
* Supported in case older reports exist in storage
Expand Down
Loading

0 comments on commit 1df9479

Please sign in to comment.