From 0957684bcecc761126890552ec78e4346bd7fd96 Mon Sep 17 00:00:00 2001 From: alex <48489896+devnaumov@users.noreply.github.com> Date: Thu, 23 May 2024 15:49:43 +0200 Subject: [PATCH 01/10] CB-4868 extend editor highlight (#2647) * CB-4868 extend editor highlight * CB-4868 update colors * CB-4868 fix variable * CB-4868 increase contrast ratio --------- Co-authored-by: Evgenia Bezborodova <139753579+EvgeniaBzzz@users.noreply.github.com> --- .../src/theme/_base-code-editor.scss | 28 +++++++++++++++++++ .../src/theme/dark.module.scss | 9 +++++- .../src/theme/light.module.scss | 9 +++++- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/webapp/packages/plugin-codemirror6/src/theme/_base-code-editor.scss b/webapp/packages/plugin-codemirror6/src/theme/_base-code-editor.scss index 4e3643e6ab..68ee4ae329 100644 --- a/webapp/packages/plugin-codemirror6/src/theme/_base-code-editor.scss +++ b/webapp/packages/plugin-codemirror6/src/theme/_base-code-editor.scss @@ -218,4 +218,32 @@ .editor .tok-type { color: $variable-3; } + + .editor .tok-typeName { + color: $type-name; + } + + .editor .tok-punctuation { + color: $punctuation; + } + + .editor .tok-propertyName { + color: $property-name; + } + + .editor .tok-className { + color: $class-name; + } + + .editor .tok-bool { + color: $bool; + } + + .editor .tok-variableName { + color: $variable-name; + } + + .editor .tok-labelName { + color: $label-name; + } } diff --git a/webapp/packages/plugin-codemirror6/src/theme/dark.module.scss b/webapp/packages/plugin-codemirror6/src/theme/dark.module.scss index 64e9f2f922..d8ce497fb0 100644 --- a/webapp/packages/plugin-codemirror6/src/theme/dark.module.scss +++ b/webapp/packages/plugin-codemirror6/src/theme/dark.module.scss @@ -13,7 +13,7 @@ $meta: #ff1717; $keyword: rgb(115, 158, 202); -$atom: #604aff; +$atom: #56c8d8; $number: rgb(192, 192, 192); $def: #00f; $variable: rgb(126, 186, 211); @@ -34,6 +34,13 @@ $error: #f00; $delimiter: rgb(238, 204, 100); $cursor: #fff; $active-query: $color-positive; +$type-name: #c586c0; +$class-name: #c586c0; +$punctuation: #ffffff8c; +$property-name: #569cd6; +$bool: #56c8d8; +$variable-name: #56c8d8; +$label-name: #cf6edf; :global .#{$theme-class} { @include base-code-editor; diff --git a/webapp/packages/plugin-codemirror6/src/theme/light.module.scss b/webapp/packages/plugin-codemirror6/src/theme/light.module.scss index 4981c84005..aad7e81507 100644 --- a/webapp/packages/plugin-codemirror6/src/theme/light.module.scss +++ b/webapp/packages/plugin-codemirror6/src/theme/light.module.scss @@ -22,7 +22,7 @@ $variable-3: #a8bd00; $property: black; $operator: #a67f59; $comment: #3f7f5f; -$string: #690; +$string: #1f8900; $string-2: #f50; $qualifier: #555; $builtin: #07a; @@ -34,6 +34,13 @@ $error: #f00; $delimiter: rgb(238, 204, 100); $cursor: #000; $active-query: $color-positive; +$type-name: #007acc; +$class-name: #007acc; +$punctuation: #6d6d6d; +$property-name: #c42626; +$bool: #905; +$variable-name: #905; +$label-name: #81a1c1; :global .#{$theme-class} { @include base-code-editor; From 691cceb7849e01af9886ddd1a265e357f10e7a28 Mon Sep 17 00:00:00 2001 From: Alexey Date: Thu, 23 May 2024 23:42:12 +0800 Subject: [PATCH 02/10] CB-4812 fix: infinite loading in error boundary (#2656) --- .../src/CommonDialog/DialogsPortal.tsx | 27 +++--- .../core-blocks/src/ErrorBoundary.tsx | 96 ++++++++++--------- 2 files changed, 64 insertions(+), 59 deletions(-) diff --git a/webapp/packages/core-blocks/src/CommonDialog/DialogsPortal.tsx b/webapp/packages/core-blocks/src/CommonDialog/DialogsPortal.tsx index 139fbee6d6..fc56e623f9 100644 --- a/webapp/packages/core-blocks/src/CommonDialog/DialogsPortal.tsx +++ b/webapp/packages/core-blocks/src/CommonDialog/DialogsPortal.tsx @@ -88,15 +88,7 @@ export const DialogsPortal = observer(function DialogsPortal() {
{commonDialogService.dialogs.map((dialog, i, arr) => ( - - - + ))}
@@ -112,6 +104,7 @@ interface NestedDialogType { } const NestedDialog: React.FC = function NestedDialog({ dialog, resolveDialog, rejectDialog, visible }) { + const styles = useS(style); const DialogComponent = dialog.component; const context = useMemo( @@ -125,13 +118,15 @@ const NestedDialog: React.FC = function NestedDialog({ dialog, return ( - + + + ); }; diff --git a/webapp/packages/core-blocks/src/ErrorBoundary.tsx b/webapp/packages/core-blocks/src/ErrorBoundary.tsx index cd6382d863..cafff18196 100644 --- a/webapp/packages/core-blocks/src/ErrorBoundary.tsx +++ b/webapp/packages/core-blocks/src/ErrorBoundary.tsx @@ -5,7 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import React, { ErrorInfo } from 'react'; +import React, { ErrorInfo, Suspense } from 'react'; import { errorOf, LoadingError } from '@cloudbeaver/core-utils'; @@ -76,62 +76,72 @@ export class ErrorBoundary extends React.Component -

Something went wrong.

- {onClose && ( -
- -
- )} - {this.canRefresh && ( -
- -
- )} + Loading...}>
- {errorData.error.toString()} - {stack &&
} - {stack} +

Something went wrong.

+ {onClose && ( +
+ +
+ )} + {this.canRefresh && ( +
+ +
+ )} +
+ {errorData.error.toString()} + {stack &&
} + {stack} +
+ {this.props.fallback}
- {this.props.fallback} - +
); } if (root) { return ( - - {onClose && ( -
- -
- )} - {this.canRefresh && ( -
- -
- )} -
+ Loading...}> + + {onClose && ( +
+ +
+ )} + {this.canRefresh && ( +
+ +
+ )} +
+
); } else { return ( - + Loading...}> + + ); } } - return {children}; + return ( + + Loading...}>{children} + + ); } private refresh() { From b9b02828dd8b2197843ab63d9cd3d8825c77caf3 Mon Sep 17 00:00:00 2001 From: serge-rider Date: Thu, 23 May 2024 19:04:23 +0200 Subject: [PATCH 03/10] 24.1.0 version bump --- server/bundles/io.cloudbeaver.model/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.model/pom.xml | 2 +- server/bundles/io.cloudbeaver.product.ce/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.product.ce/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.resources.drivers.base/pom.xml | 2 +- server/bundles/io.cloudbeaver.server/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.server/pom.xml | 2 +- .../bundles/io.cloudbeaver.service.admin/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.service.admin/pom.xml | 2 +- .../bundles/io.cloudbeaver.service.auth/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.service.auth/pom.xml | 2 +- .../io.cloudbeaver.service.data.transfer/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.service.data.transfer/pom.xml | 2 +- server/bundles/io.cloudbeaver.service.fs/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.service.fs/pom.xml | 2 +- .../io.cloudbeaver.service.metadata/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.service.metadata/pom.xml | 2 +- .../io.cloudbeaver.service.rm.nio/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.service.rm.nio/pom.xml | 2 +- server/bundles/io.cloudbeaver.service.rm/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.service.rm/pom.xml | 2 +- .../io.cloudbeaver.service.security/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.service.security/pom.xml | 2 +- server/bundles/io.cloudbeaver.slf4j/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.slf4j/pom.xml | 2 +- server/features/io.cloudbeaver.ce.drivers.feature/feature.xml | 2 +- server/features/io.cloudbeaver.ce.drivers.feature/pom.xml | 2 +- server/features/io.cloudbeaver.product.ce.feature/feature.xml | 2 +- server/features/io.cloudbeaver.product.ce.feature/pom.xml | 2 +- server/features/io.cloudbeaver.server.feature/feature.xml | 2 +- server/features/io.cloudbeaver.server.feature/pom.xml | 2 +- server/features/io.cloudbeaver.ws.feature/feature.xml | 2 +- server/features/io.cloudbeaver.ws.feature/pom.xml | 2 +- server/pom.xml | 2 +- server/product/web-server/CloudbeaverServer.product | 2 +- server/product/web-server/pom.xml | 2 +- 37 files changed, 50 insertions(+), 50 deletions(-) diff --git a/server/bundles/io.cloudbeaver.model/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.model/META-INF/MANIFEST.MF index b1ef7fd2b3..0bc04d3e04 100644 --- a/server/bundles/io.cloudbeaver.model/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.model/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: Cloudbeaver Web Model Bundle-SymbolicName: io.cloudbeaver.model;singleton:=true -Bundle-Version: 1.0.53.qualifier -Bundle-Release-Date: 20240520 +Bundle-Version: 1.0.54.qualifier +Bundle-Release-Date: 20240603 Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.model/pom.xml b/server/bundles/io.cloudbeaver.model/pom.xml index 047dc41179..5ce5a9a429 100644 --- a/server/bundles/io.cloudbeaver.model/pom.xml +++ b/server/bundles/io.cloudbeaver.model/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.model - 1.0.53-SNAPSHOT + 1.0.54-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.product.ce/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.product.ce/META-INF/MANIFEST.MF index 06604352fb..02dca6bccc 100644 --- a/server/bundles/io.cloudbeaver.product.ce/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.product.ce/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: Cloudbeaver Community Product Bundle-SymbolicName: io.cloudbeaver.product.ce;singleton:=true -Bundle-Version: 24.0.5.qualifier -Bundle-Release-Date: 20240520 +Bundle-Version: 24.1.0.qualifier +Bundle-Release-Date: 20240603 Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.product.ce/pom.xml b/server/bundles/io.cloudbeaver.product.ce/pom.xml index 617b09013a..7cd0abf00b 100644 --- a/server/bundles/io.cloudbeaver.product.ce/pom.xml +++ b/server/bundles/io.cloudbeaver.product.ce/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.product.ce - 24.0.5-SNAPSHOT + 24.1.0-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.resources.drivers.base/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.resources.drivers.base/META-INF/MANIFEST.MF index d1153906fa..b68f3ec414 100644 --- a/server/bundles/io.cloudbeaver.resources.drivers.base/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.resources.drivers.base/META-INF/MANIFEST.MF @@ -2,8 +2,8 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Base JDBC drivers Bundle-SymbolicName: io.cloudbeaver.resources.drivers.base;singleton:=true -Bundle-Version: 1.0.98.qualifier -Bundle-Release-Date: 20240520 +Bundle-Version: 1.0.99.qualifier +Bundle-Release-Date: 20240603 Bundle-Vendor: DBeaver Corp Bundle-ActivationPolicy: lazy Automatic-Module-Name: io.cloudbeaver.resources.drivers.base diff --git a/server/bundles/io.cloudbeaver.resources.drivers.base/pom.xml b/server/bundles/io.cloudbeaver.resources.drivers.base/pom.xml index e2eb6a6099..f5a154d384 100644 --- a/server/bundles/io.cloudbeaver.resources.drivers.base/pom.xml +++ b/server/bundles/io.cloudbeaver.resources.drivers.base/pom.xml @@ -9,6 +9,6 @@ ../ io.cloudbeaver.resources.drivers.base - 1.0.98-SNAPSHOT + 1.0.99-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.server/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.server/META-INF/MANIFEST.MF index 02219625a3..147e4b409c 100644 --- a/server/bundles/io.cloudbeaver.server/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.server/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: Cloudbeaver Web Server Bundle-SymbolicName: io.cloudbeaver.server;singleton:=true -Bundle-Version: 24.0.5.qualifier -Bundle-Release-Date: 20240520 +Bundle-Version: 24.1.0.qualifier +Bundle-Release-Date: 20240603 Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-ActivationPolicy: lazy Bundle-Activator: io.cloudbeaver.server.CBPlatformActivator diff --git a/server/bundles/io.cloudbeaver.server/pom.xml b/server/bundles/io.cloudbeaver.server/pom.xml index d0645fd3c7..706f0116bd 100644 --- a/server/bundles/io.cloudbeaver.server/pom.xml +++ b/server/bundles/io.cloudbeaver.server/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.server - 24.0.5-SNAPSHOT + 24.1.0-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.service.admin/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.service.admin/META-INF/MANIFEST.MF index fbe4a704ec..242360be01 100644 --- a/server/bundles/io.cloudbeaver.service.admin/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.service.admin/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: Cloudbeaver Web Service - Administration Bundle-SymbolicName: io.cloudbeaver.service.admin;singleton:=true -Bundle-Version: 1.0.97.qualifier -Bundle-Release-Date: 20240520 +Bundle-Version: 1.0.98.qualifier +Bundle-Release-Date: 20240603 Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.service.admin/pom.xml b/server/bundles/io.cloudbeaver.service.admin/pom.xml index 024a43e9a5..7f50b66210 100644 --- a/server/bundles/io.cloudbeaver.service.admin/pom.xml +++ b/server/bundles/io.cloudbeaver.service.admin/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.service.admin - 1.0.97-SNAPSHOT + 1.0.98-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.service.auth/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.service.auth/META-INF/MANIFEST.MF index 92eadf63ef..04b083279c 100644 --- a/server/bundles/io.cloudbeaver.service.auth/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.service.auth/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: Cloudbeaver Web Service - Authentication Bundle-SymbolicName: io.cloudbeaver.service.auth;singleton:=true -Bundle-Version: 1.0.97.qualifier -Bundle-Release-Date: 20240520 +Bundle-Version: 1.0.98.qualifier +Bundle-Release-Date: 20240603 Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.service.auth/pom.xml b/server/bundles/io.cloudbeaver.service.auth/pom.xml index 43fc26f53f..3d5f8f5e6b 100644 --- a/server/bundles/io.cloudbeaver.service.auth/pom.xml +++ b/server/bundles/io.cloudbeaver.service.auth/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.service.auth - 1.0.97-SNAPSHOT + 1.0.98-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.service.data.transfer/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.service.data.transfer/META-INF/MANIFEST.MF index 4facd7f532..61ada5edd1 100644 --- a/server/bundles/io.cloudbeaver.service.data.transfer/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.service.data.transfer/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: Cloudbeaver Web Service - Data Transfer Bundle-SymbolicName: io.cloudbeaver.service.data.transfer;singleton:=true -Bundle-Version: 1.0.98.qualifier -Bundle-Release-Date: 20240520 +Bundle-Version: 1.0.99.qualifier +Bundle-Release-Date: 20240603 Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.service.data.transfer/pom.xml b/server/bundles/io.cloudbeaver.service.data.transfer/pom.xml index dd277ba69c..4d3933755e 100644 --- a/server/bundles/io.cloudbeaver.service.data.transfer/pom.xml +++ b/server/bundles/io.cloudbeaver.service.data.transfer/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.service.data.transfer - 1.0.98-SNAPSHOT + 1.0.99-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.service.fs/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.service.fs/META-INF/MANIFEST.MF index 37f45ba31f..e7b9d10f47 100644 --- a/server/bundles/io.cloudbeaver.service.fs/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.service.fs/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: Cloudbeaver Web Service - File System Bundle-SymbolicName: io.cloudbeaver.service.fs;singleton:=true -Bundle-Version: 1.0.15.qualifier -Bundle-Release-Date: 20240520 +Bundle-Version: 1.0.16.qualifier +Bundle-Release-Date: 20240603 Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.service.fs/pom.xml b/server/bundles/io.cloudbeaver.service.fs/pom.xml index ffa2611861..e59fa09ff9 100644 --- a/server/bundles/io.cloudbeaver.service.fs/pom.xml +++ b/server/bundles/io.cloudbeaver.service.fs/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.service.fs - 1.0.15-SNAPSHOT + 1.0.16-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.service.metadata/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.service.metadata/META-INF/MANIFEST.MF index 3d7a5c5c0d..b63c1363f2 100644 --- a/server/bundles/io.cloudbeaver.service.metadata/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.service.metadata/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: Cloudbeaver Web Service - Metadata Bundle-SymbolicName: io.cloudbeaver.service.metadata;singleton:=true -Bundle-Version: 1.0.101.qualifier -Bundle-Release-Date: 20240520 +Bundle-Version: 1.0.102.qualifier +Bundle-Release-Date: 20240603 Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.service.metadata/pom.xml b/server/bundles/io.cloudbeaver.service.metadata/pom.xml index 4b777dd308..4dcdbbdb70 100644 --- a/server/bundles/io.cloudbeaver.service.metadata/pom.xml +++ b/server/bundles/io.cloudbeaver.service.metadata/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.service.metadata - 1.0.101-SNAPSHOT + 1.0.102-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.service.rm.nio/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.service.rm.nio/META-INF/MANIFEST.MF index 5b8bee73c4..5d9593dafe 100644 --- a/server/bundles/io.cloudbeaver.service.rm.nio/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.service.rm.nio/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: Cloudbeaver Resource manager NIO implementation Bundle-SymbolicName: io.cloudbeaver.service.rm.nio;singleton:=true -Bundle-Version: 1.0.15.qualifier -Bundle-Release-Date: 20240520 +Bundle-Version: 1.0.16.qualifier +Bundle-Release-Date: 20240603 Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.service.rm.nio/pom.xml b/server/bundles/io.cloudbeaver.service.rm.nio/pom.xml index 6e1bd58325..add2901e5b 100644 --- a/server/bundles/io.cloudbeaver.service.rm.nio/pom.xml +++ b/server/bundles/io.cloudbeaver.service.rm.nio/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.service.rm.nio - 1.0.15-SNAPSHOT + 1.0.16-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.service.rm/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.service.rm/META-INF/MANIFEST.MF index 0fe9bfbe6c..b121b41699 100644 --- a/server/bundles/io.cloudbeaver.service.rm/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.service.rm/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: Cloudbeaver Web Service - Resource manager Bundle-SymbolicName: io.cloudbeaver.service.rm;singleton:=true -Bundle-Version: 1.0.50.qualifier -Bundle-Release-Date: 20240520 +Bundle-Version: 1.0.51.qualifier +Bundle-Release-Date: 20240603 Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.service.rm/pom.xml b/server/bundles/io.cloudbeaver.service.rm/pom.xml index 60462c1a12..e9fdbcec25 100644 --- a/server/bundles/io.cloudbeaver.service.rm/pom.xml +++ b/server/bundles/io.cloudbeaver.service.rm/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.service.rm - 1.0.50-SNAPSHOT + 1.0.51-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.service.security/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.service.security/META-INF/MANIFEST.MF index acf55f3fa6..3363502dcc 100644 --- a/server/bundles/io.cloudbeaver.service.security/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.service.security/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: Cloudbeaver Web Service - Security Bundle-Vendor: DBeaver Corp Bundle-SymbolicName: io.cloudbeaver.service.security;singleton:=true -Bundle-Version: 1.0.53.qualifier -Bundle-Release-Date: 20240520 +Bundle-Version: 1.0.54.qualifier +Bundle-Release-Date: 20240603 Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.service.security/pom.xml b/server/bundles/io.cloudbeaver.service.security/pom.xml index aee839bbc1..9ac7925e42 100644 --- a/server/bundles/io.cloudbeaver.service.security/pom.xml +++ b/server/bundles/io.cloudbeaver.service.security/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.service.security - 1.0.53-SNAPSHOT + 1.0.54-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.slf4j/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.slf4j/META-INF/MANIFEST.MF index e5ad5d8e10..93901aaa8b 100644 --- a/server/bundles/io.cloudbeaver.slf4j/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.slf4j/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: CloudBeaver SLF4j Binding Bundle-SymbolicName: io.cloudbeaver.slf4j;singleton:=true -Bundle-Version: 1.0.13.qualifier -Bundle-Release-Date: 20240520 +Bundle-Version: 1.0.14.qualifier +Bundle-Release-Date: 20240603 Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.slf4j/pom.xml b/server/bundles/io.cloudbeaver.slf4j/pom.xml index b0c33b211a..80f3071a56 100644 --- a/server/bundles/io.cloudbeaver.slf4j/pom.xml +++ b/server/bundles/io.cloudbeaver.slf4j/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.slf4j - 1.0.13-SNAPSHOT + 1.0.14-SNAPSHOT eclipse-plugin diff --git a/server/features/io.cloudbeaver.ce.drivers.feature/feature.xml b/server/features/io.cloudbeaver.ce.drivers.feature/feature.xml index 6400a9ba7d..67e0194d2d 100644 --- a/server/features/io.cloudbeaver.ce.drivers.feature/feature.xml +++ b/server/features/io.cloudbeaver.ce.drivers.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/server/features/io.cloudbeaver.ce.drivers.feature/pom.xml b/server/features/io.cloudbeaver.ce.drivers.feature/pom.xml index 605c37d5d7..e205ee8bef 100644 --- a/server/features/io.cloudbeaver.ce.drivers.feature/pom.xml +++ b/server/features/io.cloudbeaver.ce.drivers.feature/pom.xml @@ -9,6 +9,6 @@ ../ io.cloudbeaver.ce.drivers.feature - 1.0.121-SNAPSHOT + 1.0.122-SNAPSHOT eclipse-feature diff --git a/server/features/io.cloudbeaver.product.ce.feature/feature.xml b/server/features/io.cloudbeaver.product.ce.feature/feature.xml index f1b777fae6..1fdcdc4541 100644 --- a/server/features/io.cloudbeaver.product.ce.feature/feature.xml +++ b/server/features/io.cloudbeaver.product.ce.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/server/features/io.cloudbeaver.product.ce.feature/pom.xml b/server/features/io.cloudbeaver.product.ce.feature/pom.xml index 5a77667204..21e33f7191 100644 --- a/server/features/io.cloudbeaver.product.ce.feature/pom.xml +++ b/server/features/io.cloudbeaver.product.ce.feature/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.product.ce.feature - 24.0.5-SNAPSHOT + 24.1.0-SNAPSHOT eclipse-feature diff --git a/server/features/io.cloudbeaver.server.feature/feature.xml b/server/features/io.cloudbeaver.server.feature/feature.xml index 3b96765cfa..9ca6a115d5 100644 --- a/server/features/io.cloudbeaver.server.feature/feature.xml +++ b/server/features/io.cloudbeaver.server.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/server/features/io.cloudbeaver.server.feature/pom.xml b/server/features/io.cloudbeaver.server.feature/pom.xml index c8f24ce67b..94e2fb1011 100644 --- a/server/features/io.cloudbeaver.server.feature/pom.xml +++ b/server/features/io.cloudbeaver.server.feature/pom.xml @@ -10,6 +10,6 @@ ../ io.cloudbeaver.server.feature - 24.0.5-SNAPSHOT + 24.1.0-SNAPSHOT eclipse-feature diff --git a/server/features/io.cloudbeaver.ws.feature/feature.xml b/server/features/io.cloudbeaver.ws.feature/feature.xml index 33ab8f4e5b..7421180188 100644 --- a/server/features/io.cloudbeaver.ws.feature/feature.xml +++ b/server/features/io.cloudbeaver.ws.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/server/features/io.cloudbeaver.ws.feature/pom.xml b/server/features/io.cloudbeaver.ws.feature/pom.xml index 2e31d987c1..448ac45af1 100644 --- a/server/features/io.cloudbeaver.ws.feature/pom.xml +++ b/server/features/io.cloudbeaver.ws.feature/pom.xml @@ -10,6 +10,6 @@ ../ io.cloudbeaver.ws.feature - 1.0.51-SNAPSHOT + 1.0.52-SNAPSHOT eclipse-feature diff --git a/server/pom.xml b/server/pom.xml index 3a68dd8bb3..0d38497bf2 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -19,7 +19,7 @@ CloudBeaver CE - 24.0.5 + 24.1.0 diff --git a/server/product/web-server/CloudbeaverServer.product b/server/product/web-server/CloudbeaverServer.product index a6de390347..57f4e0561e 100644 --- a/server/product/web-server/CloudbeaverServer.product +++ b/server/product/web-server/CloudbeaverServer.product @@ -2,7 +2,7 @@ diff --git a/server/product/web-server/pom.xml b/server/product/web-server/pom.xml index 54a1b5a4b5..88eb0800e6 100644 --- a/server/product/web-server/pom.xml +++ b/server/product/web-server/pom.xml @@ -9,7 +9,7 @@ 1.0.0-SNAPSHOT ../../ - 24.0.5-SNAPSHOT + 24.1.0-SNAPSHOT web-server eclipse-repository Cloudbeaver Server Product From 2abe0572990d823e1952c05775ad37f15bbb3d96 Mon Sep 17 00:00:00 2001 From: serge-rider Date: Thu, 23 May 2024 19:05:01 +0200 Subject: [PATCH 04/10] 24.1.0 version bump --- webapp/packages/product-default/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/packages/product-default/package.json b/webapp/packages/product-default/package.json index 94769b0543..67d812fab7 100644 --- a/webapp/packages/product-default/package.json +++ b/webapp/packages/product-default/package.json @@ -5,7 +5,7 @@ "src/**/*.scss", "public/**/*" ], - "version": "24.0.5", + "version": "24.1.0", "description": "CloudBeaver Community", "license": "Apache-2.0", "main": "dist/index.js", From 95f1a4e6ad1777e7dbb3ce4e68dbdb422603c704 Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 24 May 2024 15:17:52 +0800 Subject: [PATCH 05/10] CB-4812 chore: update vscode workspace (#2657) --- .vscode/launch.json | 8 ++++---- .vscode/tasks.json | 4 ++-- org.jkiss.cloudbeaver.tp.target | 3 +-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 0245c35f3e..69ae494895 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -30,9 +30,9 @@ "-product", "io.cloudbeaver.product.ce.product", "-configuration", - "file:${workspaceFolder}/../eclipse/workspace/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/", + "file:${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product/", "-dev", - "file:${workspaceFolder}/../eclipse/workspace/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/dev.properties", + "file:${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product/dev.properties", "-os", "win32", "-ws", @@ -62,9 +62,9 @@ "-product", "io.cloudbeaver.product.ce.product", "-configuration", - "file:${workspaceFolder}/../eclipse/workspace/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/", + "file:${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product/", "-dev", - "file:${workspaceFolder}/../eclipse/workspace/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/dev.properties", + "file:${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product/dev.properties", "-os", "macosx", "-ws", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 800242fe07..0f7b1f4d53 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -42,7 +42,7 @@ "package", "-q", "exec:java", - "-Dexec.args= -eclipse.version ${eclipse-version} -config ${workspaceFolder}/../idea-workspace-dbeaver/rcp-gen.properties -productFile ${workspaceFolder}/server/product/web-server/CloudbeaverServer.product -projectsFolder ${workspaceFolder}/../ -eclipse ${workspaceFolder}/../eclipse/Eclipse.app/Contents/Eclipse -output ${workspaceFolder}/../eclipse/workspace/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product" + "-Dexec.args= -eclipse.version ${eclipse-version} -config ${workspaceFolder}/../idea-workspace-dbeaver/rcp-gen.properties -productFile ${workspaceFolder}/server/product/web-server/CloudbeaverServer.product -projectsFolder ${workspaceFolder}/../ -eclipse ${workspaceFolder}/../dbeaver-workspace/dependencies -output ${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product" ] }, "windows": { @@ -50,7 +50,7 @@ "package", "-q", "exec:java", - "-Dexec.args= -eclipse.version ${eclipse-version} -config ${workspaceFolder}/../idea-workspace-dbeaver/rcp-gen.properties -productFile ${workspaceFolder}/server/product/web-server/CloudbeaverServer.product -projectsFolder ${workspaceFolder}/../ -eclipse ${workspaceFolder}/../eclipse/eclipse -output ${workspaceFolder}/../eclipse/workspace/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product" + "-Dexec.args= -eclipse.version ${eclipse-version} -config ${workspaceFolder}/../idea-workspace-dbeaver/rcp-gen.properties -productFile ${workspaceFolder}/server/product/web-server/CloudbeaverServer.product -projectsFolder ${workspaceFolder}/../ -eclipse ${workspaceFolder}/../dbeaver-workspace/dependencies -output ${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product" ] }, "options": { diff --git a/org.jkiss.cloudbeaver.tp.target b/org.jkiss.cloudbeaver.tp.target index 9a7482ada6..e933d075c1 100644 --- a/org.jkiss.cloudbeaver.tp.target +++ b/org.jkiss.cloudbeaver.tp.target @@ -2,7 +2,6 @@ - - + \ No newline at end of file From 15e5574ed6e836351023b1139c72b993cbce597b Mon Sep 17 00:00:00 2001 From: DenisSinelnikov <142215442+DenisSinelnikov@users.noreply.github.com> Date: Fri, 24 May 2024 12:17:15 +0400 Subject: [PATCH 06/10] CB-5061. remove mandatory parameters for database form (#2650) Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com> --- .../src/ConnectionForm/Options/ParametersForm.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/Options/ParametersForm.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/Options/ParametersForm.tsx index 951388baf2..7582280882 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/Options/ParametersForm.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/Options/ParametersForm.tsx @@ -26,7 +26,7 @@ export const ParametersForm = observer(function ParametersForm({ config, {!embedded && ( - + {translate('customConnection_custom_host')} @@ -38,7 +38,7 @@ export const ParametersForm = observer(function ParametersForm({ config, {translate('customConnection_custom_database')} {requiresServerName && ( - + {translate('customConnection_custom_server_name')} )} From 22634c7c19977d282b298fd8d1ad65b07d50438f Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 24 May 2024 19:17:35 +0800 Subject: [PATCH 07/10] CB-4812 feat: add app restart hook (#2660) --- webapp/packages/core-bootstrap/src/bootstrap.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/webapp/packages/core-bootstrap/src/bootstrap.ts b/webapp/packages/core-bootstrap/src/bootstrap.ts index b9180d13ab..5eaebd5029 100644 --- a/webapp/packages/core-bootstrap/src/bootstrap.ts +++ b/webapp/packages/core-bootstrap/src/bootstrap.ts @@ -16,6 +16,7 @@ export async function bootstrap(plugins: PluginManifest[]): Promise { configure({ enforceActions: 'never' }); const app = new App([...coreManifests, ...plugins]); + (window as any).internalRestartApp = () => app.restart(); let exception: Error | null = null; try { From 674627ebeaa0ad0febdc9f0f52e3153d2d83d905 Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 24 May 2024 20:52:50 +0800 Subject: [PATCH 08/10] CB-4090 fix: catch throttle errors (#2651) * CB-4090 fix: catch throttle errors * CB-4090 fix: catch throttle errors * CB-4090 fix: detect closed contexts * CB-4090 fix: close results properly --------- Co-authored-by: Evgenia Bezborodova <139753579+EvgeniaBzzz@users.noreply.github.com> --- .../src/CommonDialog/RenameDialog.tsx | 6 +++--- .../ConnectionExecutionContextResource.ts | 13 ++++++------- .../src/ContainerDataSource.ts | 2 -- .../DatabaseDataModel/DatabaseDataModel.ts | 4 ++-- .../DatabaseDataModel/DatabaseDataSource.ts | 6 ++++-- .../DatabaseDataModel/IDatabaseDataModel.ts | 2 +- .../DatabaseDataModel/IDatabaseDataSource.ts | 2 +- .../src/ResultSetDataSource.ts | 17 +++++++++++++++-- .../plugin-projects/src/FolderDialog.tsx | 19 ++++++++++++------- .../plugin-sql-editor/src/QueryDataSource.ts | 2 -- .../SqlResultTabs/SqlQueryResultService.ts | 8 +------- .../plugin-sql-editor/src/useDataSource.ts | 1 - 12 files changed, 45 insertions(+), 37 deletions(-) diff --git a/webapp/packages/core-blocks/src/CommonDialog/RenameDialog.tsx b/webapp/packages/core-blocks/src/CommonDialog/RenameDialog.tsx index 2dd2b39eac..9ab7d3a555 100644 --- a/webapp/packages/core-blocks/src/CommonDialog/RenameDialog.tsx +++ b/webapp/packages/core-blocks/src/CommonDialog/RenameDialog.tsx @@ -33,7 +33,7 @@ interface IRenameDialogState { message: string | undefined; valid: boolean; payload: RenameDialogPayload; - validate: () => void; + validate: () => Promise; setMessage: (message: string) => void; } @@ -97,7 +97,7 @@ export const RenameDialog: DialogComponent = observ ); useEffect(() => { - state.validate(); + state.validate().catch(() => {}); }, [name]); const errorMessage = state.valid ? ' ' : translate(state.message ?? 'ui_rename_taken_or_invalid'); @@ -108,7 +108,7 @@ export const RenameDialog: DialogComponent = observ
resolveDialog(state.name)}> - state.validate()}> + state.validate().catch(() => {})}> {translate('ui_name') + ':'} diff --git a/webapp/packages/core-connections/src/ConnectionExecutionContext/ConnectionExecutionContextResource.ts b/webapp/packages/core-connections/src/ConnectionExecutionContext/ConnectionExecutionContextResource.ts index ad12575d22..cfdecf5753 100644 --- a/webapp/packages/core-connections/src/ConnectionExecutionContext/ConnectionExecutionContextResource.ts +++ b/webapp/packages/core-connections/src/ConnectionExecutionContext/ConnectionExecutionContextResource.ts @@ -119,24 +119,23 @@ export class ConnectionExecutionContextResource extends CachedMapResource { - const context = this.get(contextId); + await this.performUpdate(contextId, [], async () => { + const context = this.get(contextId); - if (!context) { - return; - } + if (!context) { + return; + } - await this.performUpdate(contextId, [], async () => { await this.graphQLService.sdk.executionContextDestroy({ contextId: context.id, connectionId: context.connectionId, projectId: context.projectId, }); - this.onDataOutdated.execute(contextId); + this.delete(contextId); }); runInAction(() => { this.markOutdated(); // TODO: should be removed, currently multiple contexts for same connection may change catalog/schema for all contexts of connection - this.delete(contextId); }); } diff --git a/webapp/packages/plugin-data-viewer/src/ContainerDataSource.ts b/webapp/packages/plugin-data-viewer/src/ContainerDataSource.ts index 1e6faa5d96..d2af27e1a2 100644 --- a/webapp/packages/plugin-data-viewer/src/ContainerDataSource.ts +++ b/webapp/packages/plugin-data-viewer/src/ContainerDataSource.ts @@ -138,8 +138,6 @@ export class ContainerDataSource extends ResultSetDataSource { + async dispose(keepExecutionContext = false): Promise { await this.onDispose.execute(); - await this.source.dispose(); + await this.source.dispose(keepExecutionContext); } async requestSaveAction(action: () => Promise | void): Promise { diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataSource.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataSource.ts index f5278b30c8..2f79fd236b 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataSource.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/DatabaseDataSource.ts @@ -372,9 +372,11 @@ export abstract class DatabaseDataSource { + async dispose(keepExecutionContext = false): Promise { await this.cancel(); - await this.executionContext?.destroy(); + if (!keepExecutionContext) { + await this.executionContext?.destroy(); + } } abstract request(prevResults: TResult[]): TResult[] | Promise; diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataModel.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataModel.ts index 209005db21..dc7d1c5f51 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataModel.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataModel.ts @@ -57,5 +57,5 @@ export interface IDatabaseDataModel Promise; cancel: () => Promise | void; resetData: () => void; - dispose: () => Promise; + dispose: (keepExecutionContext?: boolean) => Promise; } diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataSource.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataSource.ts index 7a7f9baa4f..1b5b3f8a97 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataSource.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataSource.ts @@ -97,5 +97,5 @@ export interface IDatabaseDataSource Promise | void; clearError: () => this; resetData: () => this; - dispose: () => Promise; + dispose: (keepExecutionContext?: boolean) => Promise; } diff --git a/webapp/packages/plugin-data-viewer/src/ResultSetDataSource.ts b/webapp/packages/plugin-data-viewer/src/ResultSetDataSource.ts index 04aa079a52..00d21abd5b 100644 --- a/webapp/packages/plugin-data-viewer/src/ResultSetDataSource.ts +++ b/webapp/packages/plugin-data-viewer/src/ResultSetDataSource.ts @@ -77,13 +77,26 @@ export abstract class ResultSetDataSource extends DatabaseDataSource { + setResults(results: IDatabaseResultSet[]): this { + this.closeResults(this.results); + return super.setResults(results); + } + + async dispose(keepExecutionContext?: boolean): Promise { + if (keepExecutionContext) { + await this.closeResults(this.results); + } + return super.dispose(keepExecutionContext); + } + + private async closeResults(results: IDatabaseResultSet[]): Promise { if (!this.executionContext?.context) { return; } for (const result of results) { - if (result.id === null) { + // TODO: it's better to track that context is closed with subscription + if (result.id === null || result.contextId !== this.executionContext.context.id) { continue; } try { diff --git a/webapp/packages/plugin-projects/src/FolderDialog.tsx b/webapp/packages/plugin-projects/src/FolderDialog.tsx index e9587ab7d2..d47c500488 100644 --- a/webapp/packages/plugin-projects/src/FolderDialog.tsx +++ b/webapp/packages/plugin-projects/src/FolderDialog.tsx @@ -112,7 +112,10 @@ export const FolderDialog: DialogComponent { - state.validate(); + state.validate().catch(() => {}); }, [state.value, state.projectId]); const errorMessage = state.valid ? ' ' : translate(state.message ?? 'ui_rename_taken_or_invalid'); @@ -169,7 +174,7 @@ export const FolderDialog: DialogComponent state.validate()} + onChange={() => state.validate().catch(() => {})} > {translate('ui_name') + ':'} diff --git a/webapp/packages/plugin-sql-editor/src/QueryDataSource.ts b/webapp/packages/plugin-sql-editor/src/QueryDataSource.ts index 5cb9acace8..1f5c2810c2 100644 --- a/webapp/packages/plugin-sql-editor/src/QueryDataSource.ts +++ b/webapp/packages/plugin-sql-editor/src/QueryDataSource.ts @@ -246,8 +246,6 @@ export class QueryDataSource Date: Fri, 24 May 2024 15:30:32 +0200 Subject: [PATCH 09/10] dbeaver/dbeaver-infra#30 add singleton tasks to sm (#2652) * dbeaver/dbeaver-infra#30 add singleton tasks to sm * dbeaver/dbeaver-infra#30 move tasks to ee --------- Co-authored-by: kseniaguzeeva <112612526+kseniaguzeeva@users.noreply.github.com> --- .../db/cb_schema_create.sql | 10 ++++++++++ .../db/cb_schema_update_21.sql | 8 ++++++++ .../io/cloudbeaver/service/security/db/CBDatabase.java | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_21.sql diff --git a/server/bundles/io.cloudbeaver.service.security/db/cb_schema_create.sql b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_create.sql index 3e290e80ea..8186f838a5 100644 --- a/server/bundles/io.cloudbeaver.service.security/db/cb_schema_create.sql +++ b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_create.sql @@ -273,3 +273,13 @@ CREATE TABLE {table_prefix}CB_SUBJECT_SECRETS CREATE INDEX IDX_SUBJECT_SECRETS_PROJECT ON {table_prefix}CB_SUBJECT_SECRETS (PROJECT_ID,SUBJECT_ID); CREATE INDEX IDX_SUBJECT_SECRETS_OBJECT ON {table_prefix}CB_SUBJECT_SECRETS (PROJECT_ID,OBJECT_TYPE,OBJECT_ID); + +-- Tasks +CREATE TABLE {table_prefix}CB_TASKS +( + TASK_ID VARCHAR(128) NOT NULL, + CREATE_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, + TIMEOUT INTEGER NOT NULL, + + PRIMARY KEY (TASK_ID) +); diff --git a/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_21.sql b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_21.sql new file mode 100644 index 0000000000..fd7739c5b1 --- /dev/null +++ b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_21.sql @@ -0,0 +1,8 @@ +CREATE TABLE {table_prefix}CB_TASKS +( + TASK_ID VARCHAR(128) NOT NULL, + CREATE_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, + TIMEOUT INTEGER NOT NULL, + + PRIMARY KEY (TASK_ID) +); \ No newline at end of file diff --git a/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/db/CBDatabase.java b/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/db/CBDatabase.java index 95268033c8..609d1fe54e 100644 --- a/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/db/CBDatabase.java +++ b/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/db/CBDatabase.java @@ -74,7 +74,7 @@ public class CBDatabase { public static final String SCHEMA_UPDATE_SQL_PATH = "db/cb_schema_update_"; private static final int LEGACY_SCHEMA_VERSION = 1; - private static final int CURRENT_SCHEMA_VERSION = 20; + private static final int CURRENT_SCHEMA_VERSION = 21; private static final String DEFAULT_DB_USER_NAME = "cb-data"; private static final String DEFAULT_DB_PWD_FILE = ".database-credentials.dat"; From 407259b8b20599769ba9595114287243b4098e79 Mon Sep 17 00:00:00 2001 From: Alexander Skoblikov Date: Fri, 24 May 2024 16:59:29 +0300 Subject: [PATCH 10/10] Revert "CB-5061. remove mandatory parameters for database form (#2650)" (#2661) This reverts commit 15e5574ed6e836351023b1139c72b993cbce597b. --- .../src/ConnectionForm/Options/ParametersForm.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/Options/ParametersForm.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/Options/ParametersForm.tsx index 7582280882..951388baf2 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/Options/ParametersForm.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/Options/ParametersForm.tsx @@ -26,7 +26,7 @@ export const ParametersForm = observer(function ParametersForm({ config, {!embedded && ( - + {translate('customConnection_custom_host')} @@ -38,7 +38,7 @@ export const ParametersForm = observer(function ParametersForm({ config, {translate('customConnection_custom_database')} {requiresServerName && ( - + {translate('customConnection_custom_server_name')} )}