Skip to content

Commit

Permalink
[Reporting] Remove "download CSV" export type functionality, Part 2 (e…
Browse files Browse the repository at this point in the history
…lastic#201010)

Follows elastic#199033

## Summary

This PR further removes logic that uses
`xpack.reporting.csv.enablePanelActionDownload`, and removes references
of that setting from our documentation. See
elastic#199033 for the **release note**.

### Changes
1. `enablePanelActionDownload` exists as an **optional** setting in
`packages/kbn-reporting/server/config_schema.ts`
2. The only reference to this setting marks it as unused in
`x-pack/plugins/reporting/server/config/index.ts`
3. Removes the detection of the setting from the Upgrade Assistant
integration

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
  • Loading branch information
tsullivan authored and CAWilson94 committed Dec 12, 2024
1 parent bca5302 commit 221cd7f
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 71 deletions.
6 changes: 0 additions & 6 deletions docs/settings/reporting-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,5 @@ Enables a check that warns you when there's a potential formula included in the
`xpack.reporting.csv.escapeFormulaValues`::
Escape formula values in cells with a `'`. See OWASP: https://www.owasp.org/index.php/CSV_Injection. Defaults to `true`.

`xpack.reporting.csv.enablePanelActionDownload`::
deprecated:[8.14.0,This setting will be removed in an upcoming version of {kib}.] When `true`, this
setting enables a deprecated feature which allows users to download a CSV export from a saved search
panel on a dashboard. When `false`, users can generate regular CSV reports from a saved search panel on a
dashboard and later download them in *Stack Management > Reporting*. Defaults to `false`.

`xpack.reporting.csv.useByteOrderMarkEncoding`::
Adds a byte order mark (`\ufeff`) at the beginning of the CSV file. Defaults to `false`.
1 change: 0 additions & 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,6 @@ const getMockConfig = (opts: Partial<CsvConfigType> = {}): CsvConfigType => ({
maxSizeBytes: 180000,
useByteOrderMarkEncoding: false,
scroll: { size: 500, duration: '30s', strategy: 'pit' },
enablePanelActionDownload: false,
maxConcurrentShardRequests: 5,
...opts,
});
Expand Down
2 changes: 0 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,6 @@ describe('CsvESQLGenerator', () => {
maxSizeBytes: 180000,
useByteOrderMarkEncoding: false,
scroll: { size: 500, duration: '30s', strategy: 'pit' },
enablePanelActionDownload: false,
maxConcurrentShardRequests: 5,
};

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

taskInstanceFields = { startedAt: null, retryAt: null };
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/kbn-reporting/server/config_schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const CaptureSchema = schema.object({
const CsvSchema = schema.object({
checkForFormulas: schema.boolean({ defaultValue: true }),
escapeFormulaValues: schema.boolean({ defaultValue: false }),
enablePanelActionDownload: schema.boolean({ defaultValue: false }), // unused as of 9.0
enablePanelActionDownload: schema.maybe(schema.boolean({ defaultValue: false })), // unused as of 9.0
maxSizeBytes: schema.oneOf([schema.number(), schema.byteSize()], {
defaultValue: ByteSizeValue.parse('250mb'),
}),
Expand Down
11 changes: 0 additions & 11 deletions x-pack/plugins/reporting/server/config/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,8 @@ describe('deprecations', () => {
`);
});

it('logs a warning if csv.enablePanelActionDownload: true is set', () => {
const { messages } = applyReportingDeprecations({ csv: { enablePanelActionDownload: true } });
expect(messages).toMatchInlineSnapshot(`
Array [
"The default mechanism for Reporting privileges will work differently in future versions, which will affect the behavior of this cluster. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.",
"The \\"xpack.reporting.csv.enablePanelActionDownload\\" setting is deprecated.",
]
`);
});

it('does not log a warning recommended settings are used', () => {
const { messages } = applyReportingDeprecations({
csv: { enablePanelActionDownload: false },
roles: { enabled: false },
});
expect(messages).toMatchInlineSnapshot(`Array []`);
Expand Down
38 changes: 1 addition & 37 deletions x-pack/plugins/reporting/server/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ import { ConfigSchema, ReportingConfigType } from '@kbn/reporting-server';

export const config: PluginConfigDescriptor<ReportingConfigType> = {
exposeToBrowser: {
csv: {
enablePanelActionDownload: true,
scroll: true,
},
csv: { scroll: true },
poll: true,
roles: true,
export_types: true,
Expand Down Expand Up @@ -69,44 +66,11 @@ export const config: PluginConfigDescriptor<ReportingConfigType> = {
},
});
}

if (reporting?.csv?.enablePanelActionDownload === true) {
addDeprecation({
configPath: `${fromPath}.csv.enablePanelActionDownload`,
title: i18n.translate('xpack.reporting.deprecations.csvPanelActionDownload.title', {
defaultMessage:
'The setting to enable CSV Download from saved search panels in dashboards is deprecated.',
}),
level: 'warning',
message: i18n.translate('xpack.reporting.deprecations.csvPanelActionDownload.message', {
defaultMessage: `The "{enablePanelActionDownload}" setting is deprecated.`,
values: {
enablePanelActionDownload: `${fromPath}.csv.enablePanelActionDownload`,
},
}),
correctiveActions: {
manualSteps: [
i18n.translate('xpack.reporting.deprecations.csvPanelActionDownload.manualStep1', {
defaultMessage:
'Remove "{enablePanelActionDownload}" from `kibana.yml` or change the setting to `false`.',
values: {
enablePanelActionDownload: `${fromPath}.csv.enablePanelActionDownload`,
},
}),
i18n.translate('xpack.reporting.deprecations.csvPanelActionDownload.manualStep2', {
defaultMessage:
'Use the replacement panel action to generate CSV reports from saved search panels in the Dashboard application.',
}),
],
},
});
}
},
],
exposeToUsage: {
capture: { maxAttempts: true },
csv: {
enablePanelActionDownload: true,
maxSizeBytes: true,
scroll: { size: true, duration: true },
},
Expand Down
4 changes: 0 additions & 4 deletions x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -35462,10 +35462,6 @@
"xpack.remoteClusters.updateRemoteCluster.noRemoteClusterErrorMessage": "Aucun cluster distant ne porte ce nom.",
"xpack.remoteClusters.updateRemoteCluster.unknownRemoteClusterErrorMessage": "Impossible de modifier le cluster, aucune réponse renvoyée d'ES.",
"xpack.reporting.breadcrumb": "Reporting",
"xpack.reporting.deprecations.csvPanelActionDownload.manualStep1": "Supprimez \"{enablePanelActionDownload}\" de `kibana.yml` ou modifiez le paramètre sur `false`.",
"xpack.reporting.deprecations.csvPanelActionDownload.manualStep2": "Utilisez le panneau de remplacement pour générer des rapports CSV à partir des panneaux de recherche enregistrés dans l'application Tableau de bord.",
"xpack.reporting.deprecations.csvPanelActionDownload.message": "Le paramètre \"{enablePanelActionDownload}\" est déclassé.",
"xpack.reporting.deprecations.csvPanelActionDownload.title": "Le paramètre permettant d'activer le téléchargement CSV à partir des panneaux de recherche enregistrés dans les tableaux de bord est déclassé.",
"xpack.reporting.deprecations.migrateIndexIlmPolicy.manualStepOneMessage": "Mettez à jour tous les index de reporting de façon à ce qu'ils utilisent la politique \"{reportingIlmPolicy}\" à l'aide de l'API de paramètres des index.",
"xpack.reporting.deprecations.migrateIndexIlmPolicyActionMessage": "Les nouveaux index de reporting seront gérés par la politique ILM provisionnée \"{reportingIlmPolicy}\". Vous devez modifier cette politique pour gérer le cycle de vie des rapports. Cette modification cible le modèle d'indexation du système caché \"{indexPattern}\".",
"xpack.reporting.deprecations.migrateIndexIlmPolicyActionTitle": "Des index de reporting gérés par une politique ILM personnalisée ont été détectés.",
Expand Down
4 changes: 0 additions & 4 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -35431,10 +35431,6 @@
"xpack.remoteClusters.updateRemoteCluster.noRemoteClusterErrorMessage": "その名前のリモートクラスターはありません。",
"xpack.remoteClusters.updateRemoteCluster.unknownRemoteClusterErrorMessage": "ES からレスポンスが返らず、クラスターを編集できません。",
"xpack.reporting.breadcrumb": "レポート",
"xpack.reporting.deprecations.csvPanelActionDownload.manualStep1": "kibana.ymlから“{enablePanelActionDownload}”を削除するか、設定をfalseに変更します。",
"xpack.reporting.deprecations.csvPanelActionDownload.manualStep2": "置換パネルアクションを使用して、ダッシュボードアプリケーションに保存された検索パネルからCSV形式のレポートを生成します。",
"xpack.reporting.deprecations.csvPanelActionDownload.message": "\"{enablePanelActionDownload}\"設定は廃止予定です。",
"xpack.reporting.deprecations.csvPanelActionDownload.title": "ダッシュボードの保存された検索パネルからCSVダウンロードを有効にする設定は廃止予定です。",
"xpack.reporting.deprecations.migrateIndexIlmPolicy.manualStepOneMessage": "インデックス設定APIを使用して、すべてのレポートインデックスを更新し、\"{reportingIlmPolicy}\"ポリシーを使用します。",
"xpack.reporting.deprecations.migrateIndexIlmPolicyActionMessage": "新しいレポートインデックスは\"{reportingIlmPolicy}\"がプロビジョニングしたILMポリシーによって管理されます。レポートライフサイクルを管理するには、このポリシーを編集する必要があります。この変更は、非表示のシステムインデックスパターン\"{indexPattern}\"を対象としています。",
"xpack.reporting.deprecations.migrateIndexIlmPolicyActionTitle": "カスタムILMポリシーで管理されたレポートインデックスが見つかりました。",
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -34896,8 +34896,6 @@
"xpack.remoteClusters.updateRemoteCluster.noRemoteClusterErrorMessage": "没有该名称的远程集群。",
"xpack.remoteClusters.updateRemoteCluster.unknownRemoteClusterErrorMessage": "无法编辑集群,ES 未返回任何响应。",
"xpack.reporting.breadcrumb": "Reporting",
"xpack.reporting.deprecations.csvPanelActionDownload.manualStep2": "在 Dashboard 应用程序中使用替代面板操作从已保存搜索面板生成 CSV 报告。",
"xpack.reporting.deprecations.csvPanelActionDownload.title": "在仪表板中从已保存搜索面板启用 CSV 下载的设置已弃用。",
"xpack.reporting.deprecations.migrateIndexIlmPolicyActionTitle": "找到由定制 ILM 策略管理的报告索引。",
"xpack.reporting.deprecations.reportingRole.forbiddenErrorCorrectiveAction": "请确保您分配有'manage_security'集群权限。",
"xpack.reporting.deprecations.reportingRole.forbiddenErrorMessage": "您没有足够的权限来修复此弃用。",
Expand Down

0 comments on commit 221cd7f

Please sign in to comment.