CB-4561 te UI dynamic connection credentials based on the users team (#2381)

* CB-4598 npe fix

* CB-4561 refactor: connection info resource

* CB-4561 refactor: connection info resource

* CB-4561 load credentials from secret in initConnection

* CB-4561 merge devel

* CB-4561 allow initial team secrets test

* CB-4561 remove ability to use any secret in test connection

* CB-4561 feat: shared credentials management

* CB-4561 feat: connection secret authentication

* CB-4561 little fix

* CB-4561 feat: shared credentials

* CB-4561 chore: remove save credentials checkbox for shared credentials

* CB-4561 fix: send saved state for shared connection credentials

* CB-4561 feat: change shared secret authentication description

* CB-4561 fix: pr review comments

* CB-4561 fix: disable connection test for shared connections in distributed env

* CB-4561 fix: types

---------

Co-authored-by: Aleksandr Skoblikov <aleksandr.skoblikov@dbeaver.com>
Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
This commit is contained in:
Alexey
2024-02-20 16:42:46 +01:00
committed by GitHub
co-authored by Aleksandr Skoblikov mr-anton-t
parent 662d991aca
commit 2b90eb038e
110 changed files with 1164 additions and 497 deletions
@@ -5,6 +5,7 @@
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
import { importLazyComponent } from '@cloudbeaver/core-blocks';
import { Bootstrap, injectable } from '@cloudbeaver/core-di';
import { getCachedDataResourceLoaderState } from '@cloudbeaver/core-resource';
import { ServerConfigResource } from '@cloudbeaver/core-root';
@@ -13,9 +14,10 @@ import { ActionService, DATA_CONTEXT_MENU, menuExtractItems, MenuService } from
import { MENU_TOOLS } from '@cloudbeaver/plugin-tools-panel';
import { ACTION_RESOURCE_MANAGER_SCRIPTS } from './Actions/ACTION_RESOURCE_MANAGER_SCRIPTS';
import { ResourceManagerScripts } from './ResourceManagerScripts';
import { ResourceManagerScriptsService } from './ResourceManagerScriptsService';
const ResourceManagerScripts = importLazyComponent(() => import('./ResourceManagerScripts').then(m => m.ResourceManagerScripts));
@injectable()
export class PluginBootstrap extends Bootstrap {
constructor(
@@ -57,9 +59,12 @@ export class PluginBootstrap extends Bootstrap {
isActionApplicable: (context, action) => [ACTION_RESOURCE_MANAGER_SCRIPTS].includes(action),
isHidden: () => !this.resourceManagerScriptsService.enabled,
isChecked: () => this.resourceManagerScriptsService.active,
getLoader: (context, action) => {
return getCachedDataResourceLoaderState(this.serverConfigResource, undefined, undefined);
},
getLoader: () =>
getCachedDataResourceLoaderState(
this.serverConfigResource,
() => undefined,
() => undefined,
),
handler: (context, action) => {
switch (action) {
case ACTION_RESOURCE_MANAGER_SCRIPTS: {