CB-3782 add tooltip to the select container switch (#1936)

Co-authored-by: EvgeniaBzzz <139753579+EvgeniaBzzz@users.noreply.github.com>
This commit is contained in:
alex
2023-08-23 00:32:04 +02:00
committed by GitHub
co-authored by EvgeniaBzzz
parent cd4e97b4d9
commit 20b94f06f6
5 changed files with 23 additions and 0 deletions
@@ -16,6 +16,7 @@ import {
serializeConnectionParam,
} from '@cloudbeaver/core-connections';
import { Bootstrap, injectable } from '@cloudbeaver/core-di';
import { LocalizationService } from '@cloudbeaver/core-localization';
import { EObjectFeature, NodeManagerUtils } from '@cloudbeaver/core-navigation-tree';
import { getCachedMapResourceLoaderState } from '@cloudbeaver/core-sdk';
import { OptionsPanelService } from '@cloudbeaver/core-ui';
@@ -51,6 +52,7 @@ export class ConnectionSchemaManagerBootstrap extends Bootstrap {
private readonly containerResource: ContainerResource,
private readonly menuService: MenuService,
private readonly connectionsSettingsService: ConnectionsSettingsService,
private readonly localizationService: LocalizationService,
) {
super();
}
@@ -219,10 +221,15 @@ export class ConnectionSchemaManagerBootstrap extends Bootstrap {
icon = '/icons/plugin_datasource_context_switch_database_m.svg';
}
const tooltip = this.localizationService.translate('plugin_datasource_context_switch_select_container_tooltip', undefined, {
name: connectionSchemaManagerService.currentConnection?.name,
});
return {
...menu,
icon,
label,
tooltip,
};
},
});
@@ -1,4 +1,8 @@
export default [
['plugin_datasource_context_switch_select_connection', 'Select connection'],
['plugin_datasource_context_switch_select_container', 'Select container'],
[
'plugin_datasource_context_switch_select_container_tooltip',
'The changes will be applied to all active scripts associated with a "{arg:name}" connection',
],
];
@@ -1,4 +1,8 @@
export default [
['plugin_datasource_context_switch_select_connection', 'Select connection'],
['plugin_datasource_context_switch_select_container', 'Select container'],
[
'plugin_datasource_context_switch_select_container_tooltip',
'The changes will be applied to all active scripts associated with a "{arg:name}" connection',
],
];
@@ -1,4 +1,8 @@
export default [
['plugin_datasource_context_switch_select_connection', 'Выбрать подключение'],
['plugin_datasource_context_switch_select_container', 'Выбрать контейнер'],
[
'plugin_datasource_context_switch_select_container_tooltip',
'Изменения будут применены ко всем активным скриптам, связанным с "{arg:name}" подключением',
],
];
@@ -1,4 +1,8 @@
export default [
['plugin_datasource_context_switch_select_connection', 'Select connection'],
['plugin_datasource_context_switch_select_container', 'Select container'],
[
'plugin_datasource_context_switch_select_container_tooltip',
'The changes will be applied to all active scripts associated with a "{arg:name}" connection',
],
];