Skip to content

Commit

Permalink
Merge branch 'devel' into dbeaver/pro#3348-qmdb-migration
Browse files Browse the repository at this point in the history
  • Loading branch information
serge-rider authored Nov 15, 2024
2 parents fe1b1fd + 5bcef92 commit e371078
Show file tree
Hide file tree
Showing 255 changed files with 2,199 additions and 477 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/backend-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Clone Deps Repositories
uses: dbeaver/github-actions/clone-repositories@devel
with:
project_deps_path: './cloudbeaver/project.deps'
project_deps_path: "./cloudbeaver/project.deps"

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -34,9 +34,9 @@ jobs:
shell: bash
working-directory: ./cloudbeaver/deploy

- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: backend-build-artifacts
path: cloudbeaver/deploy/cloudbeaver
if-no-files-found: error
# - name: Archive build artifacts
# uses: actions/upload-artifact@v4
# with:
# name: backend-build-artifacts
# path: cloudbeaver/deploy/cloudbeaver
# if-no-files-found: error
14 changes: 7 additions & 7 deletions .github/workflows/frontend-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ jobs:
run: yarn clear

- run: yarn install --immutable

- run: yarn bundle
working-directory: ./webapp/packages/product-default

- run: yarn test

- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: frontend-build-artifacts
path: webapp/packages/product-default/lib
if-no-files-found: error
# - name: Archive build artifacts
# uses: actions/upload-artifact@v4
# with:
# name: frontend-build-artifacts
# path: webapp/packages/product-default/lib
# if-no-files-found: error
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}/..",
"outFiles": [
"${workspaceFolder}/../cloudbeaver/packages/**/dist/**/*.{js,jsx}"
"${workspaceFolder}/../cloudbeaver/webapp/packages/**/dist/**/*.{js,jsx}"
],
"smartStep": true,
"sourceMaps": true,
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,23 @@ You can see a live demo of CloudBeaver here: https://demo.cloudbeaver.io

## Changelog

### 24.2.4. 2024-11-04
- General:
- Data export: Added the ability to export JSON values as embedded JSON;
- Brazilian Portuguese localization was enhanced (thanks to [brlarini](https://github.com/brlarini));
- Fixed a proxy issue that excluded the Content-Type header in responses.
- Administration:
- Refreshed design for the User and Teams tab in the Administration panel;
- Added an ability to change a user password even if the user is disabled in a system.
### 24.2.3. 2024-10-21
- Important update:
- Connections Templates feature is declared as obsolete and will be removed in future releases.
- General:
- Data editor enhancements: Rows with focused cells are specially marked to make it easier to locate a position in large tables;
- DB2i driver has been updated to version 20.0.7;
- The URL mode for PostgreSQL now supports connecting to multiple databases;
- The issue with displaying BLOB data types in DuckDB has been resolved.

### 24.2.2. 2024-10-07
- Schemas were added to the SQL autocompletion for PostgreSQL, H2, and SQL Server;
- CloudBeaver can now correctly display negative dates for MySQL database;
Expand Down
2 changes: 1 addition & 1 deletion config/core/cloudbeaver.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
server: {
serverPort: "${CLOUDBEAVER_SERVICE_PORT:8978}",
serverPort: "${CLOUDBEAVER_WEB_SERVER_PORT:8978}",

workspaceLocation: "${CLOUDBEAVER_WORKSPACE_LOCATION:workspace}",
contentRoot: "web",
Expand Down
1 change: 1 addition & 0 deletions deploy/build-backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ cd ../..
echo "Pull dbeaver platform"
[ ! -d dbeaver ] && git clone --depth 1 https://github.com/dbeaver/dbeaver.git
[ ! -d dbeaver-common ] && git clone --depth 1 https://github.com/dbeaver/dbeaver-common.git
[ ! -d dbeaver-jdbc-libsql ] && git clone --depth 1 https://github.com/dbeaver/dbeaver-jdbc-libsql.git


cd cloudbeaver/deploy
Expand Down
29 changes: 22 additions & 7 deletions deploy/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ echo Pull dbeaver platform

IF NOT EXIST dbeaver git clone https://github.com/dbeaver/dbeaver.git
IF NOT EXIST dbeaver-common git clone https://github.com/dbeaver/dbeaver-common.git
IF NOT EXIST dbeaver-jdbc-libsql git clone https://github.com/dbeaver/dbeaver-jdbc-libsql.git

cd cloudbeaver\deploy

echo Build cloudbeaver server
Expand All @@ -41,22 +43,35 @@ copy ..\config\DefaultConfiguration\GlobalConfiguration\.dbeaver\data-sources.js

move drivers cloudbeaver >NUL

echo Build static content
echo "Build static content"

cd ..\
mkdir .\cloudbeaver\web

cd ..\cloudbeaver\webapp
cd ..\webapp

call yarn
call yarn lerna bootstrap
call yarn lerna run bundle --no-bail --stream --scope=@cloudbeaver/product-default &::-- -- --env source-map
cd .\packages\product-default
call yarn run bundle

if %ERRORLEVEL% neq 0 (
echo 'Application build failed'
exit /b %ERRORLEVEL%
)

cd ..\..\
call yarn test

if %ERRORLEVEL% neq 0 (
echo 'Frontend tests failed'
exit /b %ERRORLEVEL%
)

cd ..\deploy

echo Copy static content
echo "Copy static content"

xcopy /E /Q ..\webapp\packages\product-default\lib cloudbeaver\web >NUL

echo Cloudbeaver is ready. Run run-server.bat in cloudbeaver folder to start the server.
echo "Cloudbeaver is ready. Run run-server.bat in cloudbeaver folder to start the server."

pause
4 changes: 3 additions & 1 deletion osgi-app.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ testBundlePaths=\
additionalModuleRoots=\
opt;
optionalFeatureRepositories=\
dbeaver/product/repositories
dbeaver/product/repositories
excludeOutputs=\
cloudbeaver/webapp/node_modules
1 change: 1 addition & 0 deletions project.deps
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dbeaver-common
dbeaver-jdbc-libsql
dbeaver
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.64.qualifier
Bundle-Release-Date: 20241104
Bundle-Version: 1.0.66.qualifier
Bundle-Release-Date: 20241202
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.64-SNAPSHOT</version>
<version>1.0.66-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import graphql.language.SourceLocation;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.sql.SQLState;
import org.jkiss.dbeaver.utils.GeneralUtils;
import org.jkiss.utils.CommonUtils;

import java.io.PrintWriter;
Expand Down Expand Up @@ -100,7 +99,7 @@ public ErrorClassification getErrorType() {
@Override
public Map<String, Object> getExtensions() {
StringWriter buf = new StringWriter();
GeneralUtils.getRootCause(this).printStackTrace(new PrintWriter(buf, true));
CommonUtils.getRootCause(this).printStackTrace(new PrintWriter(buf, true));

Map<String, Object> extensions = new LinkedHashMap<>();
String stString = buf.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
import org.jkiss.dbeaver.model.rm.RMConstants;
import org.jkiss.dbeaver.model.rm.RMProjectPermission;
import org.jkiss.dbeaver.model.runtime.DBRRunnableParametrized;
import org.jkiss.dbeaver.registry.network.NetworkHandlerDescriptor;
import org.jkiss.dbeaver.registry.network.NetworkHandlerRegistry;
import org.jkiss.dbeaver.runtime.DBWorkbench;
import org.jkiss.utils.CommonUtils;

Expand Down Expand Up @@ -356,8 +358,16 @@ public WebPropertyInfo[] getAuthProperties() {

@Property
public List<WebNetworkHandlerConfig> getNetworkHandlersConfig() {
return dataSourceContainer.getConnectionConfiguration().getHandlers().stream()
.map(WebNetworkHandlerConfig::new).collect(Collectors.toList());
var registry = NetworkHandlerRegistry.getInstance();
return dataSourceContainer.getConnectionConfiguration()
.getHandlers()
.stream()
.filter(handlerConf -> {
NetworkHandlerDescriptor descriptor = registry.getDescriptor(handlerConf.getId());
return descriptor != null && !descriptor.isDesktopHandler();
})
.map(WebNetworkHandlerConfig::new)
.collect(Collectors.toList());
}

@Property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static Path getPathFromNode(@NotNull WebSession webSession, @NotNull Stri
public static DBNPathBase getNodeByPath(@NotNull WebSession webSession, @NotNull String nodePath) throws DBException {
DBRProgressMonitor monitor = webSession.getProgressMonitor();

DBNModel navigatorModel = webSession.getNavigatorModel();
DBNModel navigatorModel = webSession.getNavigatorModelOrThrow();
DBNNode node = navigatorModel.getNodeByPath(monitor, nodePath);
if (!(node instanceof DBNPathBase dbnPath)) {
throw new DBWebException("Node '" + nodePath + "' is not found in File Systems");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,18 @@ public void setLocale(@Nullable String locale) {
this.locale = locale != null ? locale : Locale.getDefault().getLanguage();
}

@Nullable
public DBNModel getNavigatorModel() {
return navigatorModel;
}

@NotNull
public DBNModel getNavigatorModelOrThrow() throws DBWebException {
if (navigatorModel != null) {
return navigatorModel;
}
throw new DBWebException("Navigator model is not found in session");
}
/**
* Returns and clears progress messages
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public class WebAuthProviderDescriptor extends AbstractDescriptor {
private final boolean configurable;
private final boolean trusted;
private final boolean isPrivate;
private final boolean isAuthHidden;
private final boolean isCaseInsensitive;
private final String[] requiredFeatures;
private final boolean isRequired;
private final String[] types;
Expand All @@ -67,6 +69,8 @@ public WebAuthProviderDescriptor(IConfigurationElement cfg) {
this.trusted = CommonUtils.toBoolean(cfg.getAttribute("trusted"));
this.isPrivate = CommonUtils.toBoolean(cfg.getAttribute("private"));
this.isRequired = CommonUtils.toBoolean(cfg.getAttribute("required"));
this.isAuthHidden = CommonUtils.toBoolean(cfg.getAttribute("authHidden"));
this.isCaseInsensitive = CommonUtils.toBoolean(cfg.getAttribute("caseInsensitive"));

for (IConfigurationElement cfgElement : cfg.getChildren("configuration")) {
List<WebAuthProviderProperty> properties = WebAuthProviderRegistry.readProperties(cfgElement);
Expand Down Expand Up @@ -126,6 +130,14 @@ public boolean isRequired() {
return isRequired;
}

public boolean isAuthHidden() {
return isAuthHidden;
}

public boolean isCaseInsensitive() {
return isCaseInsensitive;
}

public List<WebAuthProviderProperty> getConfigurationParameters() {
return new ArrayList<>(configurationParameters.values());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,22 @@ public void initializeProjects() {
initializeWorkspaceSession();

// Load global project
Path globalProjectPath = getAbsolutePath().resolve(WebAppUtils.getGlobalProjectId());
if (!Files.exists(globalProjectPath)) {
try {
Files.createDirectories(globalProjectPath);
} catch (IOException e) {
log.error("Error creating global project path: " + globalProject, e);
String defaultProjectName = WebAppUtils.getWebApplication().getDefaultProjectName();
if (CommonUtils.isNotEmpty(defaultProjectName)) {
Path globalProjectPath = getAbsolutePath().resolve(defaultProjectName);
if (!Files.exists(globalProjectPath)) {
try {
Files.createDirectories(globalProjectPath);
} catch (IOException e) {
log.error("Error creating global project path: " + globalProject, e);
}
}
}

globalProject = new WebGlobalProject(
this,
getAuthContext(),
CommonUtils.notEmpty(WebAppUtils.getWebApplication().getDefaultProjectName())
CommonUtils.notEmpty(defaultProjectName)
);
activeProject = globalProject;
}
Expand Down
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.2.4.qualifier
Bundle-Release-Date: 20241104
Bundle-Version: 24.3.0.qualifier
Bundle-Release-Date: 20241202
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.2.4-SNAPSHOT</version>
<version>24.3.0-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.109.qualifier
Bundle-Release-Date: 20241104
Bundle-Version: 1.0.111.qualifier
Bundle-Release-Date: 20241202
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 @@ -54,6 +54,7 @@
<driver id="h2:h2_embedded"/>
<driver id="h2:h2_embedded_v2"/>
<driver id="sqlite:sqlite_jdbc"/>
<driver id="sqlite:libsql_jdbc"/>
<driver id="sqlserver:microsoft"/>
<driver id="generic:trino_jdbc"/>
<driver id="generic:duckdb_jdbc"/>
Expand Down
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.109-SNAPSHOT</version>
<version>1.0.111-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.2.4.qualifier
Bundle-Release-Date: 20241104
Bundle-Version: 24.3.0.qualifier
Bundle-Release-Date: 20241202
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.2.4-SNAPSHOT</version>
<version>24.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
scalar Object
# Date/Time
scalar DateTime
scalar Date

input PageInput {
limit: Int
Expand Down
Loading

0 comments on commit e371078

Please sign in to comment.