Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/devel' into dbeaver/dbeaver-vsco…
Browse files Browse the repository at this point in the history
…de#3-remove-redundunt-plugins
  • Loading branch information
alexander-skoblikov committed Sep 17, 2024
2 parents 2788f4d + 03d0f26 commit 0a12157
Show file tree
Hide file tree
Showing 132 changed files with 1,850 additions and 918 deletions.
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"streetsidesoftware.code-spell-checker",
"streetsidesoftware.code-spell-checker-russian",
"syler.sass-indented",
"VisualStudioExptTeam.intellicode-api-usage-examples",
"VisualStudioExptTeam.vscodeintellicode",
"yzhang.markdown-all-in-one",
"GraphQL.vscode-graphql-syntax",
Expand Down
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<img src="https://github.com/dbeaver/cloudbeaver/wiki/images/cloudbeaver-logo.png" width="250"/>

Cloud Database Manager - Community Edition.
CloudBeaver is a web server which provides rich web interface. Server itself is a Java application, web part is written on TypeScript and React.
CloudBeaver is a web server that provides a rich web interface. The server itself is a Java application, and the web part is written in TypeScript and React.
It is free to use and open-source (licensed under [Apache 2](https://github.com/dbeaver/cloudbeaver/blob/devel/LICENSE) license).
See out [WIKI](https://github.com/dbeaver/cloudbeaver/wiki) for more details.
See our [WIKI](https://github.com/dbeaver/cloudbeaver/wiki) for more details.

![](https://github.com/dbeaver/cloudbeaver/wiki/images/demo_screenshot_1.png)

Expand All @@ -16,7 +16,7 @@ See out [WIKI](https://github.com/dbeaver/cloudbeaver/wiki) for more details.

## Demo server

You can see live demo of CloudBeaver here: https://demo.cloudbeaver.io
You can see a live demo of CloudBeaver here: https://demo.cloudbeaver.io

[Database access instructions](https://github.com/dbeaver/cloudbeaver/wiki/Demo-Server)

Expand All @@ -25,7 +25,7 @@ You can see live demo of CloudBeaver here: https://demo.cloudbeaver.io
### 24.2.0. 2024-09-02
### Changes since 24.1.0:
- General:
- French language support was added (thanks to @matthieukhl)
- French language support was added (thanks to [matthieukhl](https://github.com/matthieukhl))
- Added the ability to close editor tabs with the middle mouse button
- Added right-click support to open the context menu in the Metadata Editor
- The list of forbidden characters for naming and renaming resource manager files has been updated, and now it includes the following characters: / : " \ ' <> | ? *
Expand All @@ -45,9 +45,15 @@ You can see live demo of CloudBeaver here: https://demo.cloudbeaver.io
- Administration:
- Redesigned administration navigation panel - now it is more compact and clear
- Added the ability to change the default commit mode for each connection separately
- Added the ability to configure the server property rootURI parameter (thanks to @arioko)
- Added the ability to configure the server property rootURI parameter (thanks to [arioko](https://github.com/arioko))
- Databases:
- Added the "Keep alive" setting for Db2 LUW and IMB i, Apache Kyuubi, Clickhouse, Firebird, and Trino
- Updated Firebird driver to version 5.0.4
- DDL generation for Oracle Tablespaces was added (thanks to @pandya09)
- DDL generation for Oracle Tablespaces was added (thanks to [pandya09](https://github.com/pandya09))

## Contribution
As a community-driven open-source project, we warmly welcome contributions through GitHub pull requests.

[We are happy to reward](https://dbeaver.com/help-beaver/) our most active contributors every major sprint.
The most significant contribution to our code for the major release 24.2.0 was made by:
1. [matthieukhl](https://github.com/matthieukhl)
5 changes: 5 additions & 0 deletions osgi-app.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ bundlesPaths=\
dbeaver-common/modules;\
dbeaver/plugins;\
cloudbeaver/server/bundles;
testLibraries=\
org.junit;\
org.mockito.mockito-core;\
junit-jupiter-api;\
org.opentest4j
repositories=\
https://p2.dev.dbeaver.com/eclipse-repo/;\
https://download.eclipse.org/releases/${eclipse-version}/;
Expand Down
1 change: 1 addition & 0 deletions server/bundles/io.cloudbeaver.model/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Require-Bundle: org.jkiss.dbeaver.data.gis;visibility:=reexport,
org.jkiss.dbeaver.model;visibility:=reexport,
org.jkiss.dbeaver.model.rcp;visibility:=reexport,
org.jkiss.dbeaver.model.sm;visibility:=reexport,
org.jkiss.dbeaver.model.event;visibility:=reexport,
org.jkiss.dbeaver.model.nio;visibility:=reexport,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,21 @@
*/
package io.cloudbeaver;

import org.eclipse.core.resources.IProject;
import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.model.app.DBPWorkspace;
import org.jkiss.dbeaver.model.auth.SMSessionContext;
import org.jkiss.dbeaver.model.impl.app.BaseProjectImpl;
import org.jkiss.dbeaver.model.rm.RMController;
import org.jkiss.dbeaver.model.rm.RMControllerProvider;
import org.jkiss.dbeaver.model.rm.RMProject;
import org.jkiss.dbeaver.model.rm.RMUtils;
import org.jkiss.dbeaver.registry.BaseProjectImpl;
import org.jkiss.utils.CommonUtils;
import org.jkiss.utils.Pair;

import java.nio.file.Path;
import java.util.Collection;

public class BaseWebProjectImpl extends BaseProjectImpl implements RMControllerProvider {
public abstract class BaseWebProjectImpl extends BaseProjectImpl implements RMControllerProvider {

@NotNull
private final RMProject project;
Expand Down Expand Up @@ -91,12 +89,6 @@ public Path getAbsolutePath() {
return path;
}

@Nullable
@Override
public IProject getEclipseProject() {
return null;
}

@Override
public boolean isOpen() {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public interface DBWConstants {
String PERMISSION_EDIT_DATA = "edit-data";

String STATE_ATTR_SIGN_IN_STATE = "state.signin";
String WORK_DATA_FOLDER_NAME = ".work-data";

enum SignInState {
GLOBAL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.jkiss.dbeaver.model.preferences.DBPPreferenceStore;
import org.jkiss.dbeaver.model.rm.RMController;
import org.jkiss.dbeaver.model.rm.RMProject;
import org.jkiss.dbeaver.model.task.DBTTaskManager;
import org.jkiss.dbeaver.registry.rm.DataSourceRegistryRM;
import org.jkiss.dbeaver.runtime.DBWorkbench;

Expand Down Expand Up @@ -70,6 +71,12 @@ public boolean isUseSecretStorage() {
return DBWorkbench.isDistributed();
}

@NotNull
@Override
public DBTTaskManager getTaskManager() {
throw new IllegalStateException("Task manager not supported");
}

@NotNull
@Override
protected DBPDataSourceRegistry createDataSourceRegistry() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ default String getUserSignOutLink(
@Nullable
String getAcsLink(String id, @NotNull Map<String, Object> providerConfig) throws DBException;

@Nullable
String getEntityIdLink(String id, @NotNull Map<String, Object> providerConfig) throws DBException;

@Nullable
default String getRedirectLink(String id, @NotNull Map<String, Object> providerConfig) throws DBException {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,24 @@
import io.cloudbeaver.WebSessionProjectImpl;
import io.cloudbeaver.model.log.SLF4JLogHandler;
import io.cloudbeaver.model.session.WebSession;
import io.cloudbeaver.server.WebGlobalWorkspace;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.runtime.Platform;
import org.eclipse.equinox.app.IApplicationContext;
import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.model.DBFileController;
import org.jkiss.dbeaver.model.app.DBPPlatform;
import org.jkiss.dbeaver.model.app.DBPWorkspace;
import org.jkiss.dbeaver.model.auth.SMCredentialsProvider;
import org.jkiss.dbeaver.model.auth.SMSessionContext;
import org.jkiss.dbeaver.model.data.json.JSONUtils;
import org.jkiss.dbeaver.model.impl.app.ApplicationRegistry;
import org.jkiss.dbeaver.model.impl.app.BaseApplicationImpl;
import org.jkiss.dbeaver.model.impl.app.BaseWorkspaceImpl;
import org.jkiss.dbeaver.model.rm.RMController;
import org.jkiss.dbeaver.model.rm.RMProject;
import org.jkiss.dbeaver.model.secret.DBSSecretController;
import org.jkiss.dbeaver.model.websocket.event.WSEventController;
import org.jkiss.dbeaver.registry.BaseApplicationImpl;
import org.jkiss.dbeaver.registry.BaseWorkspaceImpl;
import org.jkiss.dbeaver.runtime.IVariableResolver;
import org.jkiss.dbeaver.utils.GeneralUtils;
import org.jkiss.dbeaver.utils.RuntimeUtils;
Expand All @@ -66,12 +63,6 @@ public abstract class BaseWebApplication extends BaseApplicationImpl implements

private String instanceId;

@NotNull
@Override
public DBPWorkspace createWorkspace(@NotNull DBPPlatform platform, @NotNull IWorkspace eclipseWorkspace) {
return new WebGlobalWorkspace(platform, eclipseWorkspace);
}

@Override
public RMController createResourceController(
@NotNull SMCredentialsProvider credentialsProvider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.jkiss.dbeaver.model.app.DBPWorkspace;
import org.jkiss.dbeaver.model.auth.SMCredentials;
import org.jkiss.dbeaver.model.auth.SMCredentialsProvider;
import org.jkiss.dbeaver.model.impl.app.BaseProjectImpl;
import org.jkiss.dbeaver.model.impl.auth.SessionContextImpl;
import org.jkiss.dbeaver.model.rm.*;
import org.jkiss.dbeaver.model.runtime.VoidProgressMonitor;
Expand Down Expand Up @@ -130,12 +131,7 @@ protected BaseWebProjectImpl getWebProject(String projectId, boolean refresh) th
if (project == null || refresh) {
SessionContextImpl sessionContext = new SessionContextImpl(null);
RMProject rmProject = makeProjectFromId(projectId, false);
project = new BaseWebProjectImpl(
workspace,
this,
sessionContext,
rmProject,
(container) -> true);
project = new InternalWebProjectImpl(sessionContext, rmProject);
projectRegistries.put(projectId, project);
}
return project;
Expand Down Expand Up @@ -1289,4 +1285,21 @@ public static boolean isProjectOwner(String projectId, String userId) {
}


private class InternalWebProjectImpl extends BaseWebProjectImpl {
public InternalWebProjectImpl(SessionContextImpl sessionContext, RMProject rmProject) {
super(
LocalResourceController.this.workspace,
LocalResourceController.this,
sessionContext,
rmProject,
(container) -> true);
}

@NotNull
@Override
protected DBPDataSourceRegistry createDataSourceRegistry() {
return new DataSourceRegistry(this);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ public SessionContextImpl getAuthContext() {
return workspaceAuthContext;
}

@Override
public void initializeProjects() {
// noop
}

@Override
public void dispose() {
clearProjects();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ public String getAcsLink() throws DBException {
return instance instanceof SMAuthProviderFederated ? ((SMAuthProviderFederated) instance).getAcsLink(getId(), config.getParameters()) : null;
}

@Property
public String getEntityIdLink() throws DBException {
SMAuthProvider<?> instance = providerDescriptor.getInstance();
return instance instanceof SMAuthProviderFederated
? ((SMAuthProviderFederated) instance).getEntityIdLink(getId(), config.getParameters())
: null;
}

@Override
public String toString() {
return getDisplayName();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*
* DBeaver - Universal Database Manager
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.cloudbeaver.server;

import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.model.app.DBPDataSourceRegistry;
import org.jkiss.dbeaver.model.app.DBPWorkspace;
import org.jkiss.dbeaver.model.auth.SMSessionContext;
import org.jkiss.dbeaver.model.impl.app.BaseProjectImpl;
import org.jkiss.dbeaver.registry.DataSourceRegistry;

import java.nio.file.Path;

/**
* Web global project.
*/
public class WebGlobalProject extends BaseProjectImpl {

private static final Log log = Log.getLog(WebGlobalProject.class);

private final String projectId;

public WebGlobalProject(
@NotNull DBPWorkspace workspace,
@Nullable SMSessionContext sessionContext,
@NotNull String projectId
) {
super(workspace, sessionContext);
this.projectId = projectId;
}

@Override
public boolean isVirtual() {
return false;
}

@NotNull
@Override
public String getName() {
return projectId;
}

@NotNull
@Override
public Path getAbsolutePath() {
return getWorkspace().getAbsolutePath().resolve(projectId);
}

@Override
public boolean isOpen() {
return true;
}

@Override
public void ensureOpen() {

}

@Override
public boolean isUseSecretStorage() {
return false;
}

@NotNull
@Override
protected DBPDataSourceRegistry createDataSourceRegistry() {
return new DataSourceRegistry(this);
}
}
Loading

0 comments on commit 0a12157

Please sign in to comment.