Skip to content

Commit

Permalink
CB-4691 pr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyteleshev committed Jul 1, 2024
1 parent 19f219b commit 0227482
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof defaultSettings>;
Expand All @@ -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 {
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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'],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const ImageValuePresentation: TabContainerPanelComponent<IDataValuePanelP
},
);

function imageOnContextMenuHandler(event: React.MouseEvent<HTMLImageElement>) {
function imageContextMenuHandler(event: React.MouseEvent<HTMLImageElement>) {
if (!data.canSave) {
event.preventDefault();
}
Expand All @@ -71,7 +71,7 @@ export const ImageValuePresentation: TabContainerPanelComponent<IDataValuePanelP
<ImageRenderer
srcGetter={srcGetter}
className={s(style, { img: true, stretch: state.stretch })}
onContextMenu={imageOnContextMenuHandler}
onContextMenu={imageContextMenuHandler}
/>
)}
{isTruncatedMessageDisplay && (
Expand Down
4 changes: 2 additions & 2 deletions webapp/packages/plugin-data-viewer/src/locales/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
4 changes: 2 additions & 2 deletions webapp/packages/plugin-data-viewer/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
4 changes: 2 additions & 2 deletions webapp/packages/plugin-data-viewer/src/locales/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions webapp/packages/plugin-data-viewer/src/locales/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
4 changes: 2 additions & 2 deletions webapp/packages/plugin-data-viewer/src/locales/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', 'Максимальный размер выборки'],
Expand Down
4 changes: 2 additions & 2 deletions webapp/packages/plugin-data-viewer/src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down

0 comments on commit 0227482

Please sign in to comment.