From 0227482275838eb5f417d06804a76dbaa4a268c4 Mon Sep 17 00:00:00 2001 From: sergeyteleshev Date: Mon, 1 Jul 2024 16:40:41 +0200 Subject: [PATCH] CB-4691 pr fixes --- .../src/DataViewerSettingsService.ts | 15 ++++++++++----- .../ImageValue/ImageValuePresentation.tsx | 4 ++-- .../packages/plugin-data-viewer/src/locales/de.ts | 4 ++-- .../packages/plugin-data-viewer/src/locales/en.ts | 4 ++-- .../packages/plugin-data-viewer/src/locales/fr.ts | 4 ++-- .../packages/plugin-data-viewer/src/locales/it.ts | 4 ++-- .../packages/plugin-data-viewer/src/locales/ru.ts | 4 ++-- .../packages/plugin-data-viewer/src/locales/zh.ts | 4 ++-- 8 files changed, 24 insertions(+), 19 deletions(-) diff --git a/webapp/packages/plugin-data-viewer/src/DataViewerSettingsService.ts b/webapp/packages/plugin-data-viewer/src/DataViewerSettingsService.ts index cc14515d8a..ecd33d456a 100644 --- a/webapp/packages/plugin-data-viewer/src/DataViewerSettingsService.ts +++ b/webapp/packages/plugin-data-viewer/src/DataViewerSettingsService.ts @@ -31,7 +31,7 @@ const defaultSettings = schema.object({ 'plugin.data-viewer.fetchMin': schema.coerce.number().min(FETCH_MIN).default(DEFAULT_FETCH_SIZE), 'plugin.data-viewer.fetchMax': schema.coerce.number().min(FETCH_MIN).default(FETCH_MAX), 'resultset.maxrows': schema.coerce.number().min(FETCH_MIN).max(FETCH_MAX).default(DEFAULT_FETCH_SIZE), - 'plugin.data-export.disabled': schemaExtra.stringedBoolean().default(false), + 'plugin.data-viewer.export.disabled': schemaExtra.stringedBoolean().default(false), }); export type DataViewerSettings = schema.infer; @@ -47,7 +47,7 @@ export class DataViewerSettingsService extends Dependency { } get disableExportData(): boolean { - return this.settings.getValue('plugin.data-export.disabled'); + return this.settings.getValue('plugin.data-viewer.export.disabled'); } get maxFetchSize(): number { @@ -80,12 +80,17 @@ export class DataViewerSettingsService extends Dependency { 'plugin.data-viewer.disableCopyData': 'core.app.dataViewer.disableCopyData', 'plugin.data-viewer.fetchMin': 'core.app.dataViewer.fetchMin', 'plugin.data-viewer.fetchMax': 'core.app.dataViewer.fetchMax', + 'plugin.data-viewer.export.disabled': 'plugin.data-export.disabled', 'resultset.maxrows': 'core.app.dataViewer.fetchDefault', }), /** @deprecated Use settings instead, will be removed in 25.0.0 */ createSettingsAliasResolver(this.settingsResolverService, this.settings, { 'resultset.maxrows': 'plugin.data-viewer.fetchDefault', }), + /** @deprecated Use settings instead, will be removed in 23.0.0 */ + createSettingsAliasResolver(this.settingsResolverService, this.settings, { + 'plugin.data-viewer.export.disabled': 'plugin_data_export.disabled', + }), ); this.registerSettings(); @@ -154,10 +159,10 @@ export class DataViewerSettingsService extends Dependency { }, { group: DATA_EDITOR_SETTINGS_GROUP, - key: 'plugin.data-export.disabled', + key: 'plugin.data-viewer.export.disabled', type: ESettingsValueType.Checkbox, - name: 'settings_data_editor_disable_data_download_name', - description: 'settings_data_editor_disable_data_download_description', + name: 'settings_data_editor_disable_data_export_name', + description: 'settings_data_editor_disable_data_export_description', access: { scope: ['server'], }, diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentation.tsx b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentation.tsx index 4a669ed484..4e89471c42 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentation.tsx +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentation.tsx @@ -57,7 +57,7 @@ export const ImageValuePresentation: TabContainerPanelComponent) { + function imageContextMenuHandler(event: React.MouseEvent) { if (!data.canSave) { event.preventDefault(); } @@ -71,7 +71,7 @@ export const ImageValuePresentation: TabContainerPanelComponent )} {isTruncatedMessageDisplay && ( diff --git a/webapp/packages/plugin-data-viewer/src/locales/de.ts b/webapp/packages/plugin-data-viewer/src/locales/de.ts index a8c2a179e3..f443d6cc3f 100644 --- a/webapp/packages/plugin-data-viewer/src/locales/de.ts +++ b/webapp/packages/plugin-data-viewer/src/locales/de.ts @@ -41,8 +41,8 @@ export default [ ['settings_data_editor_disable_edit_description', 'Deaktivieren Sie die Bearbeitung von Daten in Data Viewer für Nicht-Admin-Benutzer'], ['settings_data_editor_disable_data_copy_name', 'Kopie deaktivieren'], ['settings_data_editor_disable_data_copy_description', 'Deaktivieren Sie das Kopieren von Daten in Data Viewer für Nicht-Admin-Benutzer'], - ['settings_data_editor_disable_data_download_name', 'Disable Export'], - ['settings_data_editor_disable_data_download_description', 'Disable exporting of data in Data Viewer for non-admin users'], + ['settings_data_editor_disable_data_export_name', 'Disable Export'], + ['settings_data_editor_disable_data_export_description', 'Disable exporting of data in Data Viewer for non-admin users'], ['settings_data_editor_fetch_min_name', 'Minimale fetch size'], ['settings_data_editor_fetch_min_description', 'Mindestanzahl von Zeilen zum Abrufen'], ['settings_data_editor_fetch_max_name', 'Maximale fetch size'], diff --git a/webapp/packages/plugin-data-viewer/src/locales/en.ts b/webapp/packages/plugin-data-viewer/src/locales/en.ts index cd20a7e5d6..9b0c003aa5 100644 --- a/webapp/packages/plugin-data-viewer/src/locales/en.ts +++ b/webapp/packages/plugin-data-viewer/src/locales/en.ts @@ -64,8 +64,8 @@ export default [ ['settings_data_editor_disable_edit_description', 'Disable editing of data in Data Viewer for non-admin users'], ['settings_data_editor_disable_data_copy_name', 'Disable Copy'], ['settings_data_editor_disable_data_copy_description', 'Disable copying of data in Data Viewer for non-admin users'], - ['settings_data_editor_disable_data_download_name', 'Disable Export'], - ['settings_data_editor_disable_data_download_description', 'Disable exporting of data in Data Viewer for non-admin users'], + ['settings_data_editor_disable_data_export_name', 'Disable Export'], + ['settings_data_editor_disable_data_export_description', 'Disable exporting of data in Data Viewer for non-admin users'], ['settings_data_editor_fetch_min_name', 'Minimum fetch size'], ['settings_data_editor_fetch_min_description', 'Minimum number of rows to fetch'], ['settings_data_editor_fetch_max_name', 'Maximum fetch size'], diff --git a/webapp/packages/plugin-data-viewer/src/locales/fr.ts b/webapp/packages/plugin-data-viewer/src/locales/fr.ts index 01c4e7a129..6a6e6adce8 100644 --- a/webapp/packages/plugin-data-viewer/src/locales/fr.ts +++ b/webapp/packages/plugin-data-viewer/src/locales/fr.ts @@ -62,8 +62,8 @@ export default [ ['settings_data_editor_disable_edit_name', "Désactiver l'édition"], ['settings_data_editor_disable_edit_description', "Désactiver l'édition des données dans le Data Viewer pour les utilisateurs non administrateurs"], ['settings_data_editor_disable_data_copy_name', 'Désactiver la copie'], - ['settings_data_editor_disable_data_download_name', 'Disable Export'], - ['settings_data_editor_disable_data_download_description', 'Disable exporting of data in Data Viewer for non-admin users'], + ['settings_data_editor_disable_data_export_name', 'Disable Export'], + ['settings_data_editor_disable_data_export_description', 'Disable exporting of data in Data Viewer for non-admin users'], [ 'settings_data_editor_disable_data_copy_description', 'Désactiver la copie des données dans le Data Viewer pour les utilisateurs non administrateurs', diff --git a/webapp/packages/plugin-data-viewer/src/locales/it.ts b/webapp/packages/plugin-data-viewer/src/locales/it.ts index 45d1fec78b..30a2185b31 100644 --- a/webapp/packages/plugin-data-viewer/src/locales/it.ts +++ b/webapp/packages/plugin-data-viewer/src/locales/it.ts @@ -57,8 +57,8 @@ export default [ ['settings_data_editor_disable_edit_description', 'Disable editing of data in Data Viewer for non-admin users'], ['settings_data_editor_disable_data_copy_name', 'Disable Copy'], ['settings_data_editor_disable_data_copy_description', 'Disable copying of data in Data Viewer for non-admin users'], - ['settings_data_editor_disable_data_download_name', 'Disable Export'], - ['settings_data_editor_disable_data_download_description', 'Disable exporting of data in Data Viewer for non-admin users'], + ['settings_data_editor_disable_data_export_name', 'Disable Export'], + ['settings_data_editor_disable_data_export_description', 'Disable exporting of data in Data Viewer for non-admin users'], ['settings_data_editor_fetch_min_name', 'Minimum fetch size'], ['settings_data_editor_fetch_min_description', 'Minimum number of rows to fetch'], ['settings_data_editor_fetch_max_name', 'Maximum fetch size'], diff --git a/webapp/packages/plugin-data-viewer/src/locales/ru.ts b/webapp/packages/plugin-data-viewer/src/locales/ru.ts index e30cf6fbad..1738fcbf4d 100644 --- a/webapp/packages/plugin-data-viewer/src/locales/ru.ts +++ b/webapp/packages/plugin-data-viewer/src/locales/ru.ts @@ -58,8 +58,8 @@ export default [ ['settings_data_editor_disable_edit_description', 'Отключить редактирование данных для пользователей без прав администратора'], ['settings_data_editor_disable_data_copy_name', 'Отключить копирование'], ['settings_data_editor_disable_data_copy_description', 'Отключить копирование данных для пользователей без прав администратора'], - ['settings_data_editor_disable_data_download_name', 'Отключить скачивание данных'], - ['settings_data_editor_disable_data_download_description', 'Отключить скачивание данных для пользователей без прав администратора'], + ['settings_data_editor_disable_data_export_name', 'Отключить скачивание данных'], + ['settings_data_editor_disable_data_export_description', 'Отключить скачивание данных для пользователей без прав администратора'], ['settings_data_editor_fetch_min_name', 'Минимальный размер выборки'], ['settings_data_editor_fetch_min_description', 'Минимальное количество строк для выборки'], ['settings_data_editor_fetch_max_name', 'Максимальный размер выборки'], diff --git a/webapp/packages/plugin-data-viewer/src/locales/zh.ts b/webapp/packages/plugin-data-viewer/src/locales/zh.ts index 51a5b9d1cf..460c73036a 100644 --- a/webapp/packages/plugin-data-viewer/src/locales/zh.ts +++ b/webapp/packages/plugin-data-viewer/src/locales/zh.ts @@ -64,8 +64,8 @@ export default [ ['settings_data_editor_disable_edit_description', 'Disable editing of data in Data Viewer for non-admin users'], ['settings_data_editor_disable_data_copy_name', 'Disable Copy'], ['settings_data_editor_disable_data_copy_description', 'Disable copying of data in Data Viewer for non-admin users'], - ['settings_data_editor_disable_data_download_name', 'Disable Export'], - ['settings_data_editor_disable_data_download_description', 'Disable exporting of data in Data Viewer for non-admin users'], + ['settings_data_editor_disable_data_export_name', 'Disable Export'], + ['settings_data_editor_disable_data_export_description', 'Disable exporting of data in Data Viewer for non-admin users'], ['settings_data_editor_fetch_min_name', 'Minimum fetch size'], ['settings_data_editor_fetch_min_description', 'Minimum number of rows to fetch'], ['settings_data_editor_fetch_max_name', 'Maximum fetch size'],