Skip to content

Commit

Permalink
Merge branch 'devel' into fix/cb-3884/tree-empty-flickering
Browse files Browse the repository at this point in the history
  • Loading branch information
Wroud authored Mar 15, 2024
2 parents f086e70 + 25b895c commit 3f25bf0
Show file tree
Hide file tree
Showing 59 changed files with 148 additions and 113 deletions.
12 changes: 3 additions & 9 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,12 @@
"name": "CloudBeaver CE",
"cwd": "${workspaceFolder}/../opt/cbce",
"request": "launch",
"mainClass": "org.eclipse.equinox.launcher.Main",
"mainClass": "org.jkiss.dbeaver.launcher.DBeaverLauncher",
"windows": {
"type": "java",
"name": "CloudBeaver CE",
"request": "launch",
"mainClass": "org.eclipse.equinox.launcher.Main",
"classPaths": [
"${workspaceFolder}/../eclipse/eclipse/plugins/org.eclipse.equinox.launcher_1.6.600.v20231106-1826.jar"
],
"mainClass": "org.jkiss.dbeaver.launcher.DBeaverLauncher",
"args": [
"-product",
"io.cloudbeaver.product.ce.product",
Expand Down Expand Up @@ -63,10 +60,7 @@
"type": "java",
"name": "CloudBeaver CE",
"request": "launch",
"mainClass": "org.eclipse.equinox.launcher.Main",
"classPaths": [
"${workspaceFolder}/../eclipse/Eclipse.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher_1.6.600.v20231106-1826.jar"
],
"mainClass": "org.jkiss.dbeaver.launcher.DBeaverLauncher",
"args": [
"-product",
"io.cloudbeaver.product.ce.product",
Expand Down
2 changes: 1 addition & 1 deletion deploy/scripts/run-server.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off
for /f %%a in ('dir /B /S server\plugins\org.eclipse.equinox.launcher*.jar') do SET launcherJar="%%a"
for /f %%a in ('dir /B /S server\plugins\org.jkiss.dbeaver.launcher*.jar') do SET launcherJar="%%a"

echo "Starting Cloudbeaver Server"

Expand Down
2 changes: 1 addition & 1 deletion deploy/scripts/run-server.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

launcherJar=( server/plugins/org.eclipse.equinox.launcher*.jar )
launcherJar=( server/plugins/org.jkiss.dbeaver.launcher*.jar )

echo "Starting Cloudbeaver Server"

Expand Down
4 changes: 2 additions & 2 deletions server/bundles/io.cloudbeaver.model/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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.48.qualifier
Bundle-Release-Date: 20240304
Bundle-Version: 1.0.49.qualifier
Bundle-Release-Date: 20240325
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.model</artifactId>
<version>1.0.48-SNAPSHOT</version>
<version>1.0.49-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
4 changes: 2 additions & 2 deletions server/bundles/io.cloudbeaver.product.ce/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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.0.qualifier
Bundle-Release-Date: 20240304
Bundle-Version: 24.0.1.qualifier
Bundle-Release-Date: 20240325
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.product.ce/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.product.ce</artifactId>
<version>24.0.0-SNAPSHOT</version>
<version>24.0.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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.93.qualifier
Bundle-Release-Date: 20240304
Bundle-Version: 1.0.94.qualifier
Bundle-Release-Date: 20240325
Bundle-Vendor: DBeaver Corp
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: io.cloudbeaver.resources.drivers.base
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.resources.drivers.base</artifactId>
<version>1.0.93-SNAPSHOT</version>
<version>1.0.94-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
4 changes: 2 additions & 2 deletions server/bundles/io.cloudbeaver.server/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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.0.qualifier
Bundle-Release-Date: 20240304
Bundle-Version: 24.0.1.qualifier
Bundle-Release-Date: 20240325
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-Activator: io.cloudbeaver.server.CBPlatformActivator
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.server</artifactId>
<version>24.0.0-SNAPSHOT</version>
<version>24.0.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2023 DBeaver Corp and others
* Copyright (C) 2010-2024 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,16 +18,13 @@

import io.cloudbeaver.model.session.BaseWebSession;
import io.cloudbeaver.model.session.WebSession;
import io.cloudbeaver.server.CBApplication;
import io.cloudbeaver.server.CBPlatform;
import org.jkiss.code.NotNull;
import org.jkiss.dbeaver.model.DBPDataSource;
import org.jkiss.dbeaver.model.DBPDataSourceContainer;
import org.jkiss.dbeaver.model.app.DBPPlatform;
import org.jkiss.dbeaver.model.auth.SMSession;
import org.jkiss.dbeaver.model.websocket.event.WSEventType;
import org.jkiss.dbeaver.model.app.DBPProject;
import org.jkiss.dbeaver.model.websocket.event.datasource.WSDataSourceEvent;
import org.jkiss.dbeaver.model.websocket.event.datasource.WSDataSourceProperty;
import org.jkiss.dbeaver.runtime.DBWorkbench;
import org.jkiss.dbeaver.runtime.jobs.DataSourceMonitorJob;

import java.util.Collection;
Expand All @@ -46,22 +43,23 @@ public WebDataSourceMonitorJob(DBPPlatform platform) {
protected void doJob() {
Collection<BaseWebSession> allSessions = CBPlatform.getInstance().getSessionManager().getAllActiveSessions();
allSessions.parallelStream().forEach(s -> {
checkDataSourceAliveInWorkspace(s.getWorkspace(), s::getLastAccessTimeMillis);
checkDataSourceAliveInWorkspace(s.getWorkspace(), s.getLastAccessTimeMillis());
});

}

@Override
public void showNotification(DBPDataSource dataSource, DBPDataSourceContainer dsDescriptor, SMSession smSession) {
if (smSession instanceof WebSession webSession) {
webSession.addSessionEvent( //TODO: Add new event for disconnect datasource
WSDataSourceEvent.update(
webSession.getSessionId(),
webSession.getUserId(),
dsDescriptor.getProject().getId(),
List.of(dsDescriptor.getId()),
WSDataSourceProperty.CONFIGURATION)
);
protected void showNotification(@NotNull DBPDataSource dataSource) {
final DBPProject project = dataSource.getContainer().getProject();
if (project.getWorkspaceSession() instanceof WebSession webSession) {
// TODO: Add new event for disconnect datasource
webSession.addSessionEvent(WSDataSourceEvent.update(
webSession.getSessionId(),
webSession.getUserId(),
project.getId(),
List.of(dataSource.getContainer().getId()),
WSDataSourceProperty.CONFIGURATION
));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -585,12 +585,19 @@ private DBSDataManipulator generateUpdateResultsDataBatch(

Object[] rowValues = new Object[updateAttributes.length + keyAttributes.length];
// put key values first in case of updating them
DBDDocument document = null;
for (int i = 0; i < keyAttributes.length; i++) {
DBDAttributeBinding keyAttribute = keyAttributes[i];
boolean isDocumentValue = keyAttributes.length == 1 && keyAttribute.getDataKind() == DBPDataKind.DOCUMENT && dataContainer instanceof DBSDocumentLocator;
if (isDocumentValue) {
rowValues[updateAttributes.length + i] =
makeDocumentInputValue(session, (DBSDocumentLocator) dataContainer, resultsInfo, row, metaData);
document = makeDocumentInputValue(
session,
(DBSDocumentLocator) dataContainer,
resultsInfo,
row,
metaData
);
rowValues[updateAttributes.length + i] = document;
} else {
rowValues[updateAttributes.length + i] = keyAttribute.getValueHandler().getValueFromObject(
session,
Expand All @@ -610,6 +617,9 @@ private DBSDataManipulator generateUpdateResultsDataBatch(
DBDAttributeBinding updateAttribute = updateAttributes[i];
Object value = updateValues.get(String.valueOf(updateAttribute.getOrdinalPosition()));
Object realCellValue = setCellRowValue(value, webSession, session, updateAttribute, withoutExecution);
if (document instanceof DBDComposite compositeDoc) {
compositeDoc.setAttributeValue(updateAttribute, realCellValue);
}
rowValues[i] = realCellValue;
finalRow[updateAttribute.getOrdinalPosition()] = realCellValue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ private static Object serializeContentValue(WebSession session, DBDContent value
Map<String, Object> map = createMapOfType(WebSQLConstants.VALUE_TYPE_CONTENT);
if (ContentUtils.isTextContent(value)) {
String stringValue = ContentUtils.getContentStringValue(session.getProgressMonitor(), value);
int textPreviewMaxLength = CommonUtils.toInt(
CBApplication.getInstance().getAppConfiguration().getResourceQuota(
WebSQLConstants.QUOTA_PROP_TEXT_PREVIEW_MAX_LENGTH,
WebSQLConstants.TEXT_PREVIEW_MAX_LENGTH));
if (stringValue != null && stringValue.length() > textPreviewMaxLength) {
stringValue = stringValue.substring(0, textPreviewMaxLength);
}
map.put(WebSQLConstants.ATTR_TEXT, stringValue);
} else {
map.put(WebSQLConstants.ATTR_BINARY, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.92.qualifier
Bundle-Release-Date: 20240304
Bundle-Version: 1.0.93.qualifier
Bundle-Release-Date: 20240325
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.admin</artifactId>
<version>1.0.92-SNAPSHOT</version>
<version>1.0.93-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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.92.qualifier
Bundle-Release-Date: 20240304
Bundle-Version: 1.0.93.qualifier
Bundle-Release-Date: 20240325
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.auth</artifactId>
<version>1.0.92-SNAPSHOT</version>
<version>1.0.93-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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.93.qualifier
Bundle-Release-Date: 20240304
Bundle-Version: 1.0.94.qualifier
Bundle-Release-Date: 20240325
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.data.transfer</artifactId>
<version>1.0.93-SNAPSHOT</version>
<version>1.0.94-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
4 changes: 2 additions & 2 deletions server/bundles/io.cloudbeaver.service.fs/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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.10.qualifier
Bundle-Release-Date: 20240304
Bundle-Version: 1.0.11.qualifier
Bundle-Release-Date: 20240325
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.fs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.fs</artifactId>
<version>1.0.10-SNAPSHOT</version>
<version>1.0.11-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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.96.qualifier
Bundle-Release-Date: 20240304
Bundle-Version: 1.0.97.qualifier
Bundle-Release-Date: 20240325
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.metadata/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.metadata</artifactId>
<version>1.0.96-SNAPSHOT</version>
<version>1.0.97-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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.10.qualifier
Bundle-Release-Date: 20240304
Bundle-Version: 1.0.11.qualifier
Bundle-Release-Date: 20240325
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.rm.nio/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.rm.nio</artifactId>
<version>1.0.10-SNAPSHOT</version>
<version>1.0.11-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
4 changes: 2 additions & 2 deletions server/bundles/io.cloudbeaver.service.rm/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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.45.qualifier
Bundle-Release-Date: 20240304
Bundle-Version: 1.0.46.qualifier
Bundle-Release-Date: 20240325
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.rm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.rm</artifactId>
<version>1.0.45-SNAPSHOT</version>
<version>1.0.46-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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.48.qualifier
Bundle-Release-Date: 20240304
Bundle-Version: 1.0.49.qualifier
Bundle-Release-Date: 20240325
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.security/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</credentials>
<configuration>
<propertyGroup label="Configuration">
<property id="logout-url" label="Logout url" type="string" description="Logout url"/>
<property id="logout-url" label="Logout URL" type="string" description="Logout URL"/>
<property id="user-header" label="Username header" type="string" description="Username header"/>
<property id="team-header" label="Team header" type="string" description="Team header"/>
<property id="team-delimiter" label="Team delimiter symbol" type="string" description="Team delimiter symbol, default: |"/>
Expand Down
Loading

0 comments on commit 3f25bf0

Please sign in to comment.