From f3c6cf94d78c3088ee02d4db603e721eccc84a5a Mon Sep 17 00:00:00 2001 From: sergeyteleshev Date: Thu, 28 Mar 2024 15:32:06 +0100 Subject: [PATCH 1/5] CB-4030 makes clear log viewer button sticky to the top-right corner (#2505) Co-authored-by: Evgenia Bezborodova <139753579+EvgeniaBzzz@users.noreply.github.com> --- .../src/LogViewer/LogViewerTable.m.css | 52 ++++++++++++ .../src/LogViewer/LogViewerTable.tsx | 82 ++++++------------- 2 files changed, 78 insertions(+), 56 deletions(-) create mode 100644 webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.m.css diff --git a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.m.css b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.m.css new file mode 100644 index 0000000000..3d000a41c9 --- /dev/null +++ b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.m.css @@ -0,0 +1,52 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ + +.wrapper { + overflow: hidden; + height: 100%; + width: 100%; +} + +.table { + flex: 1 1 auto; + width: 100%; +} + +.tableWrapper { + height: 100%; +} + +.messageTitleBox { + display: flex; + align-items: center; + + .messageTitle { + flex: 1; + } +} + +.tableColumnHeader { + white-space: nowrap; + text-overflow: ellipsis; +} + +.tableColumnHeaderMin { + width: 32px; +} + +.timestamp { + width: 116px; + min-width: 116px; +} + +.clearButton { + position: absolute !important; + top: 4px; + right: 16px; + z-index: 100; +} diff --git a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.tsx b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.tsx index 0669d3cee2..5c59875d41 100644 --- a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.tsx +++ b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.tsx @@ -6,50 +6,12 @@ * you may not use this file except in compliance with the License. */ import { observer } from 'mobx-react-lite'; -import styled, { css, use } from 'reshadow'; -import { MenuBarSmallItem, Table, TableBody, TableColumnHeader, TableHeader, useStyles, useTranslate } from '@cloudbeaver/core-blocks'; +import { Container, MenuBarSmallItem, s, Table, TableBody, TableColumnHeader, TableHeader, useS, useTranslate } from '@cloudbeaver/core-blocks'; import type { ILogEntry } from './ILogEntry'; import { LogEntry } from './LogEntry'; - -const styles = css` - wrapper { - overflow: hidden; - display: flex; - flex-direction: column; - height: 100%; - } - Table { - flex: 1 1 auto; - width: 100%; - } - table-wrapper { - overflow: auto; - } - message-title-box { - display: flex; - align-items: center; - - & message-title { - flex: 1; - } - } - [|buttons] { - text-align: right; - } - TableColumnHeader { - white-space: nowrap; - text-overflow: ellipsis; - } - TableColumnHeader[min] { - width: 32px; - } - [|timestamp] { - width: 116px; - min-width: 116px; - } -`; +import styles from './LogViewerTable.m.css'; interface Props { items: ILogEntry[]; @@ -60,22 +22,30 @@ interface Props { } export const LogViewerTable = observer(function LogViewerTable({ items, selectedItem, onItemSelect, onClear, className }) { const translate = useTranslate(); - const style = useStyles(styles); + const style = useS(styles); - return styled(style)( - - - + return ( + + + {translate('ui_clear')} + + +
- - {translate('plugin_log_viewer_entry_timestamp')} - - - {translate('plugin_log_viewer_entry_message')} - - {translate('ui_clear')} - - + + + {translate('plugin_log_viewer_entry_timestamp')} + + +
+
{translate('plugin_log_viewer_entry_message')}
+
@@ -84,7 +54,7 @@ export const LogViewerTable = observer(function LogViewerTable({ items, s ))}
-
-
, + + ); }); From 192da2c0d6ee4bb48f511ac96963039d811eb85f Mon Sep 17 00:00:00 2001 From: Cheng Pan Date: Fri, 29 Mar 2024 00:58:06 +0800 Subject: [PATCH 2/5] Support Apache Kyuubi as built-in datasource (#1336) * Add Kyuubi driver JDBC driver 1.9.0 --------- Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com> --- .../plugin.xml | 3 +++ server/drivers/kyuubi/pom.xml | 25 +++++++++++++++++++ server/drivers/pom.xml | 1 + 3 files changed, 29 insertions(+) create mode 100644 server/drivers/kyuubi/pom.xml diff --git a/server/bundles/io.cloudbeaver.resources.drivers.base/plugin.xml b/server/bundles/io.cloudbeaver.resources.drivers.base/plugin.xml index 46cd997963..cbd9c57a41 100644 --- a/server/bundles/io.cloudbeaver.resources.drivers.base/plugin.xml +++ b/server/bundles/io.cloudbeaver.resources.drivers.base/plugin.xml @@ -17,6 +17,7 @@ + @@ -36,6 +37,7 @@ + @@ -55,6 +57,7 @@ + diff --git a/server/drivers/kyuubi/pom.xml b/server/drivers/kyuubi/pom.xml new file mode 100644 index 0000000000..d59c25552b --- /dev/null +++ b/server/drivers/kyuubi/pom.xml @@ -0,0 +1,25 @@ + + 4.0.0 + drivers.kyuubi + 1.0.0 + + io.cloudbeaver + drivers + 1.0.0 + ../ + + + + kyuubi + + + + + org.apache.kyuubi + kyuubi-hive-jdbc-shaded + 1.9.0 + + + + diff --git a/server/drivers/pom.xml b/server/drivers/pom.xml index 2d5d4b3718..39fecc0302 100644 --- a/server/drivers/pom.xml +++ b/server/drivers/pom.xml @@ -18,6 +18,7 @@ h2 h2_v2 jaybird + kyuubi mysql mariadb oracle From 77f531ddac37fdde70ac4be71567994ced09c6ea Mon Sep 17 00:00:00 2001 From: Isa Inalcik Date: Thu, 28 Mar 2024 17:58:42 +0100 Subject: [PATCH 3/5] Update trino driver to 438 (#2372) Co-authored-by: Evgenia Bezborodova <139753579+EvgeniaBzzz@users.noreply.github.com> Co-authored-by: Anastasiya <45152336+LonwoLonwo@users.noreply.github.com> --- server/drivers/trino/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/drivers/trino/pom.xml b/server/drivers/trino/pom.xml index d2c5220ece..6664afd89a 100644 --- a/server/drivers/trino/pom.xml +++ b/server/drivers/trino/pom.xml @@ -18,7 +18,7 @@ io.trino trino-jdbc - 422 + 438 From 66f6ccb2457d6fdffbe3a13164ea8d90112c7093 Mon Sep 17 00:00:00 2001 From: Ainur <59531286+yagudin10@users.noreply.github.com> Date: Thu, 28 Mar 2024 17:59:53 +0100 Subject: [PATCH 4/5] CB-4569 set default database when getting driver props (#2512) Co-authored-by: Evgenia Bezborodova <139753579+EvgeniaBzzz@users.noreply.github.com> --- .../src/io/cloudbeaver/model/WebDatabaseDriverInfo.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/model/WebDatabaseDriverInfo.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/model/WebDatabaseDriverInfo.java index a0d4602162..61f0a8e970 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/model/WebDatabaseDriverInfo.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/model/WebDatabaseDriverInfo.java @@ -182,6 +182,7 @@ public WebPropertyInfo[] getDriverProperties() throws DBWebException { cfg.setUrl(driver.getSampleURL()); cfg.setHostName(DBConstants.HOST_LOCALHOST); cfg.setHostPort(driver.getDefaultPort()); + cfg.setDatabaseName(driver.getDefaultDatabase()); cfg.setUrl(driver.getConnectionURL(cfg)); DBPPropertyDescriptor[] properties = driver.getDataSourceProvider().getConnectionProperties(webSession.getProgressMonitor(), driver, cfg); if (properties == null) { From 8004db0f8b3d8e23456bbc6b61b45cc7f1320669 Mon Sep 17 00:00:00 2001 From: Ainur <59531286+yagudin10@users.noreply.github.com> Date: Thu, 28 Mar 2024 18:00:45 +0100 Subject: [PATCH 5/5] CB-4919 update results fix (#2509) --- .../src/io/cloudbeaver/service/sql/WebSQLProcessor.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java index 08e199f930..a6b01c916d 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java @@ -364,9 +364,16 @@ public WebSQLExecuteInfo updateResultsDataBatch( isAutoCommitEnabled = txnManager.isAutoCommit(); if (txnManager.isSupportsTransactions() && isAutoCommitEnabled) { txnManager.setAutoCommit(monitor, false); - savepoint = txnManager.setSavepoint(monitor, null); revertToAutoCommit = true; } + if (!txnManager.isAutoCommit() && txnManager.supportsSavepoints()) { + try { + savepoint = txnManager.setSavepoint(monitor, null); + } catch (Throwable e) { + // May be savepoints not supported + log.debug("Can't set savepoint", e); + } + } } try { Map options = Collections.emptyMap();