-
Notifications
You must be signed in to change notification settings - Fork 505
dbeaver/pro#7897 add connection view plugin #4031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: devel
Are you sure you want to change the base?
Changes from all commits
dfc2ad8
76616b5
69ef685
a0b1e38
dd4ef17
1726441
c607664
5be6e3b
2d8f714
66f97e0
7e57881
feffcbb
918c398
6bfe2eb
60a3a54
b7dff29
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 }; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why did we mark a thing that is required to optional? may be it should be optional first from the begin?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also |
||
|
|
||
| export const CONNECTION_NAVIGATOR_VIEW_SETTINGS: Record<NavigatorView, NavigatorViewSettings> = { | ||
| simple: { | ||
|
|
||
| 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 |
|---|---|---|
|
|
@@ -6,4 +6,6 @@ fragment AllNavigatorSettings on NavigatorSettings { | |
| hideFolders | ||
| hideSchemas | ||
| hideVirtualModel | ||
| } | ||
|
|
||
| userSettings | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| fragment DatabaseConnectionNavigatorViewSettings on ConnectionInfo { | ||
| id | ||
| projectId | ||
| navigatorSettings { | ||
| ...AllNavigatorSettings | ||
| } | ||
| originalNavigatorSettings { | ||
| ...AllNavigatorSettings | ||
| } | ||
|
Comment on lines
+7
to
+9
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably you need to split it into two fragments and two resources, because |
||
| } | ||
| 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* |
| 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', | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +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 { createAction } from '@cloudbeaver/core-view'; | ||
|
|
||
| export const ACTION_CONNECTION_VIEW_SYSTEM_OBJECTS = createAction('connection-view-system-objects', { | ||
| label: 'app_navigationTree_connection_view_option_showSystemObjects', | ||
| label: 'plugin_connection_view_option_show_system_objects', | ||
| type: 'checkbox', | ||
| }); |
There was a problem hiding this comment.
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