Skip to content
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
dfc2ad8
dbeaver/pro#7897 add connection view plugin
devnaumov Jan 5, 2026
76616b5
Merge branch 'devel' into dbeaver/pro#7897-user-connection-view
devnaumov Jan 7, 2026
69ef685
dbeaver/pro#7897 add view settings to the connection dialog
devnaumov Jan 7, 2026
a0b1e38
dbeaver/pro#7897 navigator settings as separate resource
devnaumov Jan 8, 2026
dd4ef17
Merge remote-tracking branch 'origin/devel' into dbeaver/pro#7897-use…
yagudin10 Jan 9, 2026
1726441
Merge remote-tracking branch 'origin/devel' into dbeaver/pro#7897-use…
yagudin10 Jan 9, 2026
c607664
Merge remote-tracking branch 'origin/devel' into dbeaver/pro#7897-use…
yagudin10 Jan 12, 2026
5be6e3b
dbeaver/pro#7897 api for original navigator settings config
yagudin10 Jan 12, 2026
2d8f714
dbeaver/pro#7897 use original settings for connection dialog
devnaumov Jan 12, 2026
66f97e0
dbeaver/pro#7897 save connection view fixes
yagudin10 Jan 12, 2026
7e57881
dbeaver/pro#7897 update node on reset
devnaumov Jan 12, 2026
feffcbb
dbeaver/pro#7897 remove extra comments
devnaumov Jan 12, 2026
918c398
dbeaver/pro#7897 do not update node if only global settings had changed
devnaumov Jan 12, 2026
6bfe2eb
dbeaver/pro#7897 reuse view
devnaumov Jan 12, 2026
60a3a54
dbeaver/pro#7897 fixes after review
yagudin10 Jan 13, 2026
b7dff29
dbeaver/pro#7897 return old api for user settings
yagudin10 Jan 13, 2026
5fd94cc
dbeaver/pro#7897 change field name
devnaumov Jan 14, 2026
ab54239
Merge branch 'devel' into dbeaver/pro#7897-user-connection-view
kseniaguzeeva Jan 20, 2026
57c9acf
Merge branch 'devel' into dbeaver/pro#7897-user-connection-view
dariamarutkina Jan 20, 2026
f96c9d9
Merge branch 'devel' into dbeaver/pro#7897-user-connection-view
dariamarutkina Jan 21, 2026
20c3b12
Merge branch 'devel' into dbeaver/pro#7897-user-connection-view
dariamarutkina Jan 22, 2026
fc2e182
dbeaver/pro#7897 add descriptions
devnaumov Jan 22, 2026
ed2f089
dbeaver/pro#7897 get defaults settings in creation mode
devnaumov Jan 23, 2026
eeae166
dbeaver/pro#7897 get defaults based on userSettings flag
devnaumov Jan 23, 2026
2bfa2c7
dbeaver/pro#7897 remove extra locales
devnaumov Jan 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package io.cloudbeaver.model;

import graphql.schema.DataFetchingEnvironment;
import io.cloudbeaver.DBWebException;
import io.cloudbeaver.WebProjectImpl;
import io.cloudbeaver.model.app.BaseWebAppConfiguration;
Expand Down Expand Up @@ -283,7 +284,11 @@ public String[] getFeatures() {

@Property
@NotNull
public DBNBrowseSettings getNavigatorSettings() {
public DBNBrowseSettings getNavigatorSettings(@NotNull DataFetchingEnvironment environment) {
Boolean userSpecific = environment.getArgument("userSpecific");
if (userSpecific == null || !userSpecific) {
return dataSourceContainer.getNavigatorSettings().getOriginalSettings();
}
return dataSourceContainer.getNavigatorSettings();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,9 @@ type ConnectionInfo {

"Supported features (provided etc)"
features: [ String! ]!
navigatorSettings: NavigatorSettings!
"Navigator settings for the connection, either global or user-specific depending on the 'userSpecific' parameter"
navigatorSettings(userSpecific: Boolean): NavigatorSettings!

supportedDataFormats: [ ResultDataFormat! ]!
configurationType: DriverConfigurationType

Expand Down Expand Up @@ -595,7 +597,7 @@ type NavigatorSettings {
hideFolders: Boolean!
hideSchemas: Boolean!
hideVirtualModel: Boolean!

"Shows whether these settings are user-specific or global"
userSettings: Boolean! @since(version: "25.3.2")
}

Expand Down Expand Up @@ -639,8 +641,6 @@ input NavigatorSettingsInput {
hideFolders: Boolean!
hideSchemas: Boolean!
hideVirtualModel: Boolean!

userSettings: Boolean @since(version: "25.3.2")
}

input NetworkHandlerConfigInput {
Expand Down Expand Up @@ -837,10 +837,10 @@ extend type Mutation {
"Disconnect from the database"
closeConnection( id: ID!, projectId: ID ): ConnectionInfo!

"Change navigator settings for connection. It can change default settings or user settings depending on userSettings property."
setConnectionNavigatorSettings( id: ID!, projectId: ID, settings: NavigatorSettingsInput!): ConnectionInfo!
"Change navigator settings for connection. It can change default settings or user settings depending on userSpecific parameter."
setConnectionNavigatorSettings( id: ID!, projectId: ID, settings: NavigatorSettingsInput!, userSpecific: Boolean): ConnectionInfo!
"Sets to default navigator settings for connection. Resets all user navigator settings for this connection."
clearConnectionNavigatorSettings(projectId: ID!, id: ID! ): ConnectionInfo! @since(version: "25.3.2")
clearConnectionNavigatorSettings(projectId: ID!, id: ID!): ConnectionInfo! @since(version: "25.3.2")

#### Generic async functions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ WebConnectionInfo setConnectionNavigatorSettings(
@NotNull WebSession webSession,
@Nullable String projectId,
@NotNull String id,
@NotNull DataSourceNavigatorSettings settings
@NotNull DataSourceNavigatorSettings settings,
boolean userSpecific
) throws DBWebException;

@WebAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,10 @@ public void bindWiring(DBWBindingContext model) throws DBWebException {
getWebSession(env),
getProjectReference(env),
getArgumentVal(env, "id"),
WebServiceUtils.parseNavigatorSettings(getArgument(env, "settings"))
))
WebServiceUtils.parseNavigatorSettings(getArgument(env, "settings")),
CommonUtils.toBoolean(getArgument(env, "userSpecific"))
)
)
.dataFetcher(
"clearConnectionNavigatorSettings", env -> getService(env).clearConnectionNavigatorSettings(
getWebSession(env),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -724,12 +724,15 @@ public WebConnectionInfo setConnectionNavigatorSettings(
@NotNull WebSession webSession,
@Nullable String projectId,
@NotNull String id,
@NotNull DataSourceNavigatorSettings settings
@NotNull DataSourceNavigatorSettings settings,
boolean userSpecific
) throws DBWebException {
WebConnectionInfo connectionInfo = WebDataSourceUtils.getWebConnectionInfo(webSession, projectId, id);
WebSessionProjectImpl project = webSession.getProjectById(projectId);
WebConnectionInfo connectionInfo = project != null ? project.getWebConnectionInfo(id) :
WebDataSourceUtils.getWebConnectionInfo(webSession, projectId, id);
DataSourceDescriptor dataSourceDescriptor = ((DataSourceDescriptor) connectionInfo.getDataSourceContainer());
try {
if (settings.isUserSettings()) {
if (project != null && !project.isPrivateProject() && userSpecific) {
DataSourceNavigatorSettingsUtils.updateCustomNavigatorSettings(dataSourceDescriptor, settings);
} else {
// If user has no permissions to save it will cause error
Expand Down
24 changes: 2 additions & 22 deletions webapp/packages/core-connections/src/ConnectionInfoResource.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2025 DBeaver Corp and others
* Copyright (C) 2020-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
Expand All @@ -26,13 +26,7 @@ import {
resourceKeyListAliasFactory,
ResourceKeyUtils,
} from '@cloudbeaver/core-resource';
import {
DataSynchronizationService,
type NavigatorViewSettings,
ServerEventId,
SessionDataResource,
WorkspaceConfigEventHandler,
} from '@cloudbeaver/core-root';
import { DataSynchronizationService, ServerEventId, SessionDataResource, WorkspaceConfigEventHandler } from '@cloudbeaver/core-root';
import {
type AdminConnectionGrantInfo,
type AdminConnectionSearchInfo,
Expand Down Expand Up @@ -432,20 +426,6 @@ export class ConnectionInfoResource extends CachedMapResource<IConnectionInfoPar
return this.get(key)!;
}

async changeConnectionView(key: IConnectionInfoParams, settings: NavigatorViewSettings): Promise<Connection> {
const connectionNavigatorViewSettings = this.get(key)?.navigatorSettings || DEFAULT_NAVIGATOR_VIEW_SETTINGS;
const { connection } = await this.graphQLService.sdk.setConnectionNavigatorSettings({
connectionId: key.connectionId,
projectId: key.projectId,
settings: { ...connectionNavigatorViewSettings, ...settings },
});

this.set(createConnectionParam(connection), connection);
this.onDataOutdated.execute(key);

return this.get(key)!;
}

async update(key: IConnectionInfoParams, config: ConnectionConfig): Promise<DatabaseConnection> {
await this.performUpdate(key, [], async () => {
const { connection } = await this.graphQLService.sdk.updateConnection({
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-localization/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export default [
['ui_field_is_required', 'Please fill in this field'],
['ui_delete_confirmation_message', 'You are about to delete "{arg:item}". Are you sure?'],
['ui_not_selected', 'Not selected'],
['ui_reset', 'Reset'],

['root_permission_denied', "You don't have permissions"],
['root_permission_no_permission', "You don't have permission for this action"],
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-localization/src/locales/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export default [
['ui_field_is_required', 'Please fill in this field'],
['ui_delete_confirmation_message', 'You are about to delete "{arg:item}". Are you sure?'],
['ui_not_selected', 'Not selected'],
['ui_reset', 'Reset'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be translated it to languages respectively using ai suggestions


['root_permission_denied', "Vous n'avez pas les permissions"],
['root_permission_no_permission', "Vous n'avez pas la permission pour cette action"],
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-localization/src/locales/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export default [
['ui_field_is_required', 'Please fill in this field'],
['ui_delete_confirmation_message', 'You are about to delete "{arg:item}". Are you sure?'],
['ui_not_selected', 'Not selected'],
['ui_reset', 'Reset'],

['root_permission_denied', 'Non hai i permessi'],
['app_root_session_expire_warning_title', 'La sessione sta per scadere'],
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-localization/src/locales/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export default [
['ui_field_is_required', 'Заполните это поле'],
['ui_delete_confirmation_message', 'Вы собираетесь удалить "{arg:item}". Вы уверены?'],
['ui_not_selected', 'Не выбрано'],
['ui_reset', 'Сбросить'],

['root_permission_denied', 'Отказано в доступе'],
['root_permission_no_permission', 'У вас нет разрешения на это действие'],
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-localization/src/locales/vi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export default [
['ui_field_is_required', 'Please fill in this field'],
['ui_delete_confirmation_message', 'You are about to delete "{arg:item}". Are you sure?'],
['ui_not_selected', 'Not selected'],
['ui_reset', 'Reset'],

['root_permission_denied', 'Bạn không có quyền'],
['root_permission_no_permission', 'Bạn không có quyền thực hiện hành động này'],
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-localization/src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export default [
['ui_field_is_required', 'Please fill in this field'],
['ui_delete_confirmation_message', 'You are about to delete "{arg:item}". Are you sure?'],
['ui_not_selected', 'Not selected'],
['ui_reset', 'Reset'],

['root_permission_denied', '您没有权限'],
['root_permission_no_permission', '您没有权限执行此操作'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
* Copyright (C) 2020-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
import type { NavigatorSettingsInput } from '@cloudbeaver/core-sdk';

export type NavigatorView = 'simple' | 'advanced';
export type NavigatorViewSettings = Partial<NavigatorSettingsInput>;
export type NavigatorViewSettings = Omit<NavigatorSettingsInput, 'showSystemObjects'> & { showSystemObjects?: boolean };

export const CONNECTION_NAVIGATOR_VIEW_SETTINGS: Record<NavigatorView, NavigatorViewSettings> = {
simple: {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mutation clearConnectionNavigatorSettings($id: ID!, $projectId: ID!) {
connection: clearConnectionNavigatorSettings(id: $id, projectId: $projectId) {
...DatabaseConnectionNavigatorViewSettings
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
query getUserConnectionsNavigatorViewSettings($projectId: ID, $connectionId: ID, $projectIds: [ID!]) {
connections: userConnections(projectId: $projectId, id: $connectionId, projectIds: $projectIds) {
...DatabaseConnectionNavigatorViewSettings
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mutation setConnectionNavigatorSettings($projectId: ID!, $connectionId: ID!, $settings: NavigatorSettingsInput!) {
connection: setConnectionNavigatorSettings(projectId: $projectId, id: $connectionId, settings: $settings) {
...DatabaseConnection
...DatabaseConnectionNavigatorViewSettings
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ fragment AllNavigatorSettings on NavigatorSettings {
hideFolders
hideSchemas
hideVirtualModel
}

userSettings
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ fragment DatabaseConnection on ConnectionInfo {
nodePath
features
supportedDataFormats
navigatorSettings {
...AllNavigatorSettings
}
canViewSettings
canEdit
canDelete
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
fragment DatabaseConnectionNavigatorViewSettings on ConnectionInfo {
id
projectId
navigatorSettings {
...AllNavigatorSettings
}
originalNavigatorSettings {
...AllNavigatorSettings
}
}
17 changes: 17 additions & 0 deletions webapp/packages/plugin-connection-view/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# dependencies
/node_modules

# testing
/coverage

# production
/lib

# misc
.DS_Store
.env*

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
55 changes: 55 additions & 0 deletions webapp/packages/plugin-connection-view/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "@cloudbeaver/plugin-connection-view",
"type": "module",
"sideEffects": [
"./lib/module.js",
"./lib/index.js",
"src/**/*.css",
"src/**/*.scss",
"public/**/*"
],
"version": "0.1.0",
"description": "",
"license": "Apache-2.0",
"exports": {
".": "./lib/index.js",
"./module": "./lib/module.js"
},
"scripts": {
"build": "tsc -b",
"clean": "rimraf --glob lib",
"lint": "eslint ./src/ --ext .ts,.tsx",
"validate-dependencies": "core-cli-validate-dependencies"
},
"dependencies": {
"@cloudbeaver/core-blocks": "workspace:*",
"@cloudbeaver/core-connections": "workspace:*",
"@cloudbeaver/core-data-context": "workspace:*",
"@cloudbeaver/core-di": "workspace:*",
"@cloudbeaver/core-events": "workspace:*",
"@cloudbeaver/core-localization": "workspace:*",
"@cloudbeaver/core-navigation-tree": "workspace:*",
"@cloudbeaver/core-projects": "workspace:*",
"@cloudbeaver/core-resource": "workspace:*",
"@cloudbeaver/core-root": "workspace:*",
"@cloudbeaver/core-sdk": "workspace:*",
"@cloudbeaver/core-ui": "workspace:*",
"@cloudbeaver/core-utils": "workspace:*",
"@cloudbeaver/core-view": "workspace:*",
"@cloudbeaver/plugin-connections": "workspace:*",
"@dbeaver/js-helpers": "workspace:*",
"mobx": "^6",
"mobx-react-lite": "^4",
"react": "^19",
"react-dom": "^19",
"tslib": "^2"
},
"devDependencies": {
"@cloudbeaver/core-cli": "workspace:*",
"@cloudbeaver/tsconfig": "workspace:*",
"@types/react": "^19",
"rimraf": "^6",
"typescript": "^5",
"typescript-plugin-css-modules": "^5"
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
* Copyright (C) 2020-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
import { createAction } from '@cloudbeaver/core-view';

export const ACTION_CONNECTION_VIEW_ADVANCED = createAction('connection-view-advanced', {
label: 'app_navigationTree_connection_view_option_advanced',
label: 'plugin_connection_view_option_advanced',
type: 'select',
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/

import { createAction } from '@cloudbeaver/core-view';

export const ACTION_CONNECTION_VIEW_RESET = createAction('connection-view-reset', {
label: 'ui_reset',
tooltip: 'plugin_connection_view_option_reset_description',
});
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
* Copyright (C) 2020-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
import { createAction } from '@cloudbeaver/core-view';

export const ACTION_CONNECTION_VIEW_SIMPLE = createAction('connection-view-simple', {
label: 'app_navigationTree_connection_view_option_simple',
label: 'plugin_connection_view_option_simple',
type: 'select',
});
Loading
Loading