Skip to content

Commit

Permalink
Merge branch 'devel' into fix/cb-4698/limit-grid-inline-editor
Browse files Browse the repository at this point in the history
  • Loading branch information
EvgeniaBzzz authored May 14, 2024
2 parents 51695db + 833dae5 commit 20a58fe
Show file tree
Hide file tree
Showing 190 changed files with 2,181 additions and 1,408 deletions.
3 changes: 3 additions & 0 deletions config/sample-databases/DefaultConfiguration/cloudbeaver.conf
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@
"h2:h2_embedded",
"h2:h2_embedded_v2",
"clickhouse:yandex_clickhouse"
],
disabledBetaFeatures: [

]

}
Expand Down
3 changes: 3 additions & 0 deletions config/sample-databases/SQLiteConfiguration/cloudbeaver.conf
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@
"h2:h2_embedded",
"h2:h2_embedded_v2",
"clickhouse:yandex_clickhouse"
],
disabledBetaFeatures: [

]

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@ public abstract class BaseWebAppConfiguration implements WebAppConfiguration {
protected boolean resourceManagerEnabled;
protected boolean showReadOnlyConnectionInfo;
protected String[] enabledFeatures;
protected String[] disabledBetaFeatures;


public BaseWebAppConfiguration() {
this.plugins = new LinkedHashMap<>();
this.resourceManagerEnabled = true;
this.enabledFeatures = null;
this.disabledBetaFeatures = new String[0];
this.showReadOnlyConnectionInfo = false;
}

Expand All @@ -46,6 +49,7 @@ public BaseWebAppConfiguration(BaseWebAppConfiguration src) {
this.defaultUserTeam = src.defaultUserTeam;
this.resourceManagerEnabled = src.resourceManagerEnabled;
this.enabledFeatures = src.enabledFeatures;
this.disabledBetaFeatures = src.disabledBetaFeatures;
this.showReadOnlyConnectionInfo = src.showReadOnlyConnectionInfo;
}

Expand Down Expand Up @@ -104,4 +108,8 @@ public void setEnabledFeatures(String[] enabledFeatures) {
public boolean isShowReadOnlyConnectionInfo() {
return showReadOnlyConnectionInfo;
}

public String[] getDisabledBetaFeatures() {
return disabledBetaFeatures;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ type ServerConfig {
distributed: Boolean!

enabledFeatures: [ID!]!
disabledBetaFeatures: [ID!] @since(version: "24.0.5")
enabledAuthProviders: [ID!]!
supportedLanguages: [ ServerLanguage! ]!
services: [ WebServiceConfig ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.cloudbeaver.server.CBApplication;
import io.cloudbeaver.server.CBPlatform;
import io.cloudbeaver.service.security.PasswordPolicyConfiguration;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.model.meta.Property;
import org.jkiss.dbeaver.model.navigator.DBNBrowseSettings;
import org.jkiss.dbeaver.registry.language.PlatformLanguageDescriptor;
Expand Down Expand Up @@ -155,6 +156,12 @@ public String[] getEnabledFeatures() {
return application.getAppConfiguration().getEnabledFeatures();
}

@Property
@Nullable
public String[] getDisabledBetaFeatures() {
return application.getAppConfiguration().getDisabledBetaFeatures();
}

@Property
public String[] getEnabledAuthProviders() {
return application.getAppConfiguration().getEnabledAuthProviders();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.eclipse.jetty.server.*;
import org.eclipse.jetty.server.session.DefaultSessionCache;
import org.eclipse.jetty.server.session.DefaultSessionIdManager;
import org.eclipse.jetty.server.session.FileSessionDataStore;
import org.eclipse.jetty.server.session.NullSessionDataStore;
import org.eclipse.jetty.server.session.SessionHandler;
import org.eclipse.jetty.servlet.ErrorPageErrorHandler;
import org.eclipse.jetty.servlet.ServletContextHandler;
Expand All @@ -41,11 +41,8 @@
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.runtime.DBWorkbench;
import org.jkiss.dbeaver.utils.GeneralUtils;
import org.jkiss.utils.CommonUtils;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.file.Files;
import java.nio.file.Path;
Expand Down Expand Up @@ -189,17 +186,6 @@ private void initSessionManager(
@NotNull ServletContextHandler servletContextHandler
) {
// Init sessions persistence
Path metadataFolder = GeneralUtils.getMetadataFolder(DBWorkbench.getPlatform().getWorkspace().getAbsolutePath());
Path sessionCacheFolder = metadataFolder.resolve(SESSION_CACHE_DIR);
if (!Files.exists(sessionCacheFolder)) {
try {
Files.createDirectories(sessionCacheFolder);
} catch (IOException e) {
log.error("Can't create http session cache directory '" + sessionCacheFolder.toAbsolutePath() + "'", e);
return;
}
}

SessionHandler sessionHandler = new SessionHandler();
var maxIdleTime = application.getMaxSessionIdleTime();
int intMaxIdleSeconds;
Expand All @@ -212,10 +198,9 @@ private void initSessionManager(
sessionHandler.setMaxInactiveInterval(intMaxIdleSeconds);

DefaultSessionCache sessionCache = new DefaultSessionCache(sessionHandler);
FileSessionDataStore sessionStore = new FileSessionDataStore();
sessionStore.setStoreDir(sessionCacheFolder.toFile());
sessionCache.setSessionDataStore(sessionStore);
sessionCache.setSessionDataStore(new NullSessionDataStore());
sessionHandler.setSessionCache(sessionCache);

servletContextHandler.setSessionHandler(sessionHandler);
}

Expand Down
14 changes: 7 additions & 7 deletions webapp/packages/core-administration/src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
*/
import type { PluginManifest } from '@cloudbeaver/core-di';

import { AdministrationItemService } from './AdministrationItem/AdministrationItemService';
import { AdministrationLocaleService } from './AdministrationLocaleService';
import { AdministrationScreenService } from './AdministrationScreen/AdministrationScreenService';
import { ConfigurationWizardService } from './AdministrationScreen/ConfigurationWizard/ConfigurationWizardService';
import { PermissionsResource } from './PermissionsResource';

export const coreAdministrationManifest: PluginManifest = {
info: {
name: 'Core Administration',
},

providers: [AdministrationItemService, PermissionsResource, AdministrationScreenService, ConfigurationWizardService, AdministrationLocaleService],
providers: [
() => import('./AdministrationItem/AdministrationItemService').then(m => m.AdministrationItemService),
() => import('./PermissionsResource').then(m => m.PermissionsResource),
() => import('./AdministrationScreen/AdministrationScreenService').then(m => m.AdministrationScreenService),
() => import('./AdministrationScreen/ConfigurationWizard/ConfigurationWizardService').then(m => m.ConfigurationWizardService),
() => import('./AdministrationLocaleService').then(m => m.AdministrationLocaleService),
],
};
11 changes: 9 additions & 2 deletions webapp/packages/core-app/src/Body.m.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
/*
* 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.
*/
.bodyContent {
composes: theme-background-surface theme-text-on-surface theme-typography from global;
height: var(--app-height);
height: var(--app-height, 100vh);
display: flex;
padding: 0 !important;
flex-direction: column;
overflow: hidden;
}

.loader {
height: var(--app-height);
height: var(--app-height, 100vh);
}
8 changes: 6 additions & 2 deletions webapp/packages/core-app/src/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,12 @@ export const Body = observer(function Body() {
<Loader className={s(styles, { loader: true })} suspense>
{Screen && <Screen {...screenService.routerService.params} />}
</Loader>
<DialogsPortal />
<Notifications />
<Loader className={s(styles, { loader: true })} suspense>
<DialogsPortal />
</Loader>
<Loader className={s(styles, { loader: true })} suspense>
<Notifications />
</Loader>
</div>
</Loader>
</DNDProvider>
Expand Down
10 changes: 5 additions & 5 deletions webapp/packages/core-app/src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
*/
import type { PluginManifest } from '@cloudbeaver/core-di';

import { AppLocaleService } from './AppLocaleService';
import { AppScreenBootstrap } from './AppScreen/AppScreenBootstrap';
import { AppScreenService } from './AppScreen/AppScreenService';

export const coreAppManifest: PluginManifest = {
info: {
name: 'Core App',
},

providers: [AppScreenService, AppScreenBootstrap, AppLocaleService],
providers: [
() => import('./AppScreen/AppScreenService').then(m => m.AppScreenService),
() => import('./AppScreen/AppScreenBootstrap').then(m => m.AppScreenBootstrap),
() => import('./AppLocaleService').then(m => m.AppLocaleService),
],
};
55 changes: 18 additions & 37 deletions webapp/packages/core-authentication/src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,29 @@
*/
import type { PluginManifest } from '@cloudbeaver/core-di';

import { AppAuthService } from './AppAuthService';
import { AuthConfigurationParametersResource } from './AuthConfigurationParametersResource';
import { AuthConfigurationsResource } from './AuthConfigurationsResource';
import { AuthInfoService } from './AuthInfoService';
import { AuthProviderService } from './AuthProviderService';
import { AuthProvidersResource } from './AuthProvidersResource';
import { AuthRolesResource } from './AuthRolesResource';
import { AuthSettingsService } from './AuthSettingsService';
import { LocaleService } from './LocaleService';
import { PasswordPolicyService } from './PasswordPolicyService';
import { TeamMetaParametersResource } from './TeamMetaParametersResource';
import { TeamsManagerService } from './TeamsManagerService';
import { TeamsResource } from './TeamsResource';
import { UserConfigurationBootstrap } from './UserConfigurationBootstrap';
import { UserDataService } from './UserDataService';
import { UserInfoResource } from './UserInfoResource';
import { UserMetaParametersResource } from './UserMetaParametersResource';
import { UsersResource } from './UsersResource';

export const coreAuthenticationManifest: PluginManifest = {
info: {
name: 'Core Authentication',
},

providers: [
AppAuthService,
AuthInfoService,
AuthProviderService,
AuthProvidersResource,
AuthSettingsService,
AuthConfigurationsResource,
AuthConfigurationParametersResource,
TeamsManagerService,
TeamsResource,
UserDataService,
UserInfoResource,
UsersResource,
UserMetaParametersResource,
UserConfigurationBootstrap,
AuthRolesResource,
TeamMetaParametersResource,
PasswordPolicyService,
LocaleService,
() => import('./AppAuthService').then(m => m.AppAuthService),
() => import('./AuthConfigurationParametersResource').then(m => m.AuthConfigurationParametersResource),
() => import('./AuthConfigurationsResource').then(m => m.AuthConfigurationsResource),
() => import('./AuthInfoService').then(m => m.AuthInfoService),
() => import('./AuthProviderService').then(m => m.AuthProviderService),
() => import('./AuthProvidersResource').then(m => m.AuthProvidersResource),
() => import('./AuthRolesResource').then(m => m.AuthRolesResource),
() => import('./AuthSettingsService').then(m => m.AuthSettingsService),
() => import('./LocaleService').then(m => m.LocaleService),
() => import('./PasswordPolicyService').then(m => m.PasswordPolicyService),
() => import('./TeamMetaParametersResource').then(m => m.TeamMetaParametersResource),
() => import('./TeamsManagerService').then(m => m.TeamsManagerService),
() => import('./TeamsResource').then(m => m.TeamsResource),
() => import('./UserConfigurationBootstrap').then(m => m.UserConfigurationBootstrap),
() => import('./UserDataService').then(m => m.UserDataService),
() => import('./UserInfoResource').then(m => m.UserInfoResource),
() => import('./UserMetaParametersResource').then(m => m.UserMetaParametersResource),
() => import('./UsersResource').then(m => m.UsersResource),
],
};
49 changes: 31 additions & 18 deletions webapp/packages/core-blocks/src/Cell.m.css
Original file line number Diff line number Diff line change
@@ -1,30 +1,43 @@
/*
* 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.
*/
.main {
position: relative;
display: flex;
align-items: center;
padding: 8px;
}
.before {
margin-right: 16px;
width: 24px;
height: 24px;
flex-shrink: 0;

& .before {
width: 24px;
height: 24px;
flex-shrink: 0;
}
& .after {
flex-shrink: 0;
}
& .info {
line-height: 1.4;
font-weight: 500;
}
& .description {
line-height: 1.2;
}
}
.after {
margin-left: 16px;
flex-shrink: 0;

.big {
& .before {
width: 32px;
height: 32px;
}
}

.info {
composes: theme-typography--body2 from global;
flex: 1;
line-height: 1.4;
display: flex;
flex-direction: column;
font-weight: 500;
}

.description {
composes: theme-typography--caption from global;
line-height: 1.2;
}

.ripple {
Expand Down
28 changes: 19 additions & 9 deletions webapp/packages/core-blocks/src/Cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import { observer } from 'mobx-react-lite';

import style from './Cell.m.css';
import { Container } from './Containers/Container';
import { s } from './s';
import { useS } from './useS';

Expand All @@ -16,23 +17,32 @@ interface Props {
before?: React.ReactElement;
after?: React.ReactElement;
ripple?: boolean;
big?: boolean;
className?: string;
children?: React.ReactNode;
}

export const Cell = observer<Props>(function Cell({ before, after, description, className, ripple = true, children }) {
export const Cell = observer<Props>(function Cell({ before, after, description, className, ripple = true, big, children }) {
const styles = useS(style);

return (
<div className={s(styles, { ripple }, className)}>
<main className={s(styles, { main: true })}>
<div className={s(styles, { before: true })}>{before}</div>
<div className={s(styles, { info: true })}>
<div className={s(styles, { ripple, big }, className)}>
<Container className={s(styles, { main: true })} gap parent center dense>
{before && (
<Container className={s(styles, { before: true })} keepSize>
{before}
</Container>
)}
<Container className={s(styles, { info: true })} zeroBasis>
{children}
{description && <div className={s(styles, { description: true })}>{description}</div>}
</div>
<div className={s(styles, { after: true })}>{after}</div>
</main>
{description && <Container className={s(styles, { description: true })}>{description}</Container>}
</Container>
{after && (
<Container className={s(styles, { after: true })} keepSize>
{after}
</Container>
)}
</Container>
</div>
);
});
Loading

0 comments on commit 20a58fe

Please sign in to comment.