mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-10-16 14:50:15 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c9d9c3511 | ||
|
|
81c22d9ae6 | ||
|
|
21aabc7343 | ||
|
|
a8c32f0a17 |
@@ -4,7 +4,7 @@ Bundle-Vendor: DBeaver Corp
|
|||||||
Bundle-Name: Cloudbeaver Web Model
|
Bundle-Name: Cloudbeaver Web Model
|
||||||
Bundle-SymbolicName: io.cloudbeaver.model;singleton:=true
|
Bundle-SymbolicName: io.cloudbeaver.model;singleton:=true
|
||||||
Bundle-Version: 1.0.38.qualifier
|
Bundle-Version: 1.0.38.qualifier
|
||||||
Bundle-Release-Date: 20230209
|
Bundle-Release-Date: 20231009
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Bundle-ClassPath: .
|
Bundle-ClassPath: .
|
||||||
|
|||||||
-11
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
package io.cloudbeaver.model.session;
|
package io.cloudbeaver.model.session;
|
||||||
|
|
||||||
import io.cloudbeaver.DBWConstants;
|
|
||||||
import io.cloudbeaver.DBWUserIdentity;
|
import io.cloudbeaver.DBWUserIdentity;
|
||||||
import io.cloudbeaver.DBWebException;
|
import io.cloudbeaver.DBWebException;
|
||||||
import io.cloudbeaver.auth.SMAuthProviderExternal;
|
import io.cloudbeaver.auth.SMAuthProviderExternal;
|
||||||
@@ -38,7 +37,6 @@ import org.jkiss.utils.CommonUtils;
|
|||||||
|
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -114,15 +112,6 @@ public class WebSessionAuthProcessor {
|
|||||||
SMAuthProviderExternal<?> authProviderExternal = authProviderInstance instanceof SMAuthProviderExternal<?> ?
|
SMAuthProviderExternal<?> authProviderExternal = authProviderInstance instanceof SMAuthProviderExternal<?> ?
|
||||||
(SMAuthProviderExternal<?>) authProviderInstance : null;
|
(SMAuthProviderExternal<?>) authProviderInstance : null;
|
||||||
|
|
||||||
boolean providerDisabled = !isProviderEnabled(providerId);
|
|
||||||
if (configMode || webSession.hasPermission(DBWConstants.PERMISSION_ADMIN)) {
|
|
||||||
// 1. Admin can authorize in any providers
|
|
||||||
// 2. When it authorizes in non-local provider for the first time we force linkUser flag
|
|
||||||
if (providerDisabled && webSession.getUser() != null) {
|
|
||||||
linkWithActiveUser = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SMSession authSession;
|
SMSession authSession;
|
||||||
|
|
||||||
if (authProviderExternal != null && !configMode && !alreadyLoggedIn) {
|
if (authProviderExternal != null && !configMode && !alreadyLoggedIn) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Bundle-Vendor: DBeaver Corp
|
|||||||
Bundle-Name: Cloudbeaver Community Product
|
Bundle-Name: Cloudbeaver Community Product
|
||||||
Bundle-SymbolicName: io.cloudbeaver.product.ce;singleton:=true
|
Bundle-SymbolicName: io.cloudbeaver.product.ce;singleton:=true
|
||||||
Bundle-Version: 23.2.2.qualifier
|
Bundle-Version: 23.2.2.qualifier
|
||||||
Bundle-Release-Date: 20230209
|
Bundle-Release-Date: 20231009
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Bundle-ClassPath: .
|
Bundle-ClassPath: .
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
|
|||||||
Bundle-Name: Base JDBC drivers
|
Bundle-Name: Base JDBC drivers
|
||||||
Bundle-SymbolicName: io.cloudbeaver.resources.drivers.base;singleton:=true
|
Bundle-SymbolicName: io.cloudbeaver.resources.drivers.base;singleton:=true
|
||||||
Bundle-Version: 1.0.83.qualifier
|
Bundle-Version: 1.0.83.qualifier
|
||||||
Bundle-Release-Date: 20230209
|
Bundle-Release-Date: 20231009
|
||||||
Bundle-Vendor: DBeaver Corp
|
Bundle-Vendor: DBeaver Corp
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Automatic-Module-Name: io.cloudbeaver.resources.drivers.base
|
Automatic-Module-Name: io.cloudbeaver.resources.drivers.base
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Bundle-Vendor: DBeaver Corp
|
|||||||
Bundle-Name: Cloudbeaver Web Server
|
Bundle-Name: Cloudbeaver Web Server
|
||||||
Bundle-SymbolicName: io.cloudbeaver.server;singleton:=true
|
Bundle-SymbolicName: io.cloudbeaver.server;singleton:=true
|
||||||
Bundle-Version: 23.2.2.qualifier
|
Bundle-Version: 23.2.2.qualifier
|
||||||
Bundle-Release-Date: 20230209
|
Bundle-Release-Date: 20231009
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Bundle-Activator: io.cloudbeaver.server.CBPlatformActivator
|
Bundle-Activator: io.cloudbeaver.server.CBPlatformActivator
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Bundle-Vendor: DBeaver Corp
|
|||||||
Bundle-Name: Cloudbeaver Web Service - Administration
|
Bundle-Name: Cloudbeaver Web Service - Administration
|
||||||
Bundle-SymbolicName: io.cloudbeaver.service.admin;singleton:=true
|
Bundle-SymbolicName: io.cloudbeaver.service.admin;singleton:=true
|
||||||
Bundle-Version: 1.0.82.qualifier
|
Bundle-Version: 1.0.82.qualifier
|
||||||
Bundle-Release-Date: 20230209
|
Bundle-Release-Date: 20231009
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Bundle-ClassPath: .
|
Bundle-ClassPath: .
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Bundle-Vendor: DBeaver Corp
|
|||||||
Bundle-Name: Cloudbeaver Web Service - Authentication
|
Bundle-Name: Cloudbeaver Web Service - Authentication
|
||||||
Bundle-SymbolicName: io.cloudbeaver.service.auth;singleton:=true
|
Bundle-SymbolicName: io.cloudbeaver.service.auth;singleton:=true
|
||||||
Bundle-Version: 1.0.82.qualifier
|
Bundle-Version: 1.0.82.qualifier
|
||||||
Bundle-Release-Date: 20230209
|
Bundle-Release-Date: 20231009
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Bundle-ClassPath: .
|
Bundle-ClassPath: .
|
||||||
|
|||||||
+5
@@ -68,6 +68,11 @@ public class WebServiceAuthImpl implements DBWServiceAuth {
|
|||||||
if (CommonUtils.isEmpty(providerId)) {
|
if (CommonUtils.isEmpty(providerId)) {
|
||||||
throw new DBWebException("Missing auth provider parameter");
|
throw new DBWebException("Missing auth provider parameter");
|
||||||
}
|
}
|
||||||
|
WebAuthProviderDescriptor authProviderDescriptor = WebAuthProviderRegistry.getInstance()
|
||||||
|
.getAuthProvider(providerId);
|
||||||
|
if (authProviderDescriptor.isTrusted()) {
|
||||||
|
throw new DBWebException(authProviderDescriptor.getLabel() + " not allowed for authorization via GQL API");
|
||||||
|
}
|
||||||
if (authParameters == null) {
|
if (authParameters == null) {
|
||||||
authParameters = Map.of();
|
authParameters = Map.of();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Bundle-Vendor: DBeaver Corp
|
|||||||
Bundle-Name: Cloudbeaver Web Service - Data Transfer
|
Bundle-Name: Cloudbeaver Web Service - Data Transfer
|
||||||
Bundle-SymbolicName: io.cloudbeaver.service.data.transfer;singleton:=true
|
Bundle-SymbolicName: io.cloudbeaver.service.data.transfer;singleton:=true
|
||||||
Bundle-Version: 1.0.83.qualifier
|
Bundle-Version: 1.0.83.qualifier
|
||||||
Bundle-Release-Date: 20230209
|
Bundle-Release-Date: 20231009
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Bundle-ClassPath: .
|
Bundle-ClassPath: .
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Bundle-Vendor: DBeaver Corp
|
|||||||
Bundle-Name: Cloudbeaver Web Service - Metadata
|
Bundle-Name: Cloudbeaver Web Service - Metadata
|
||||||
Bundle-SymbolicName: io.cloudbeaver.service.metadata;singleton:=true
|
Bundle-SymbolicName: io.cloudbeaver.service.metadata;singleton:=true
|
||||||
Bundle-Version: 1.0.86.qualifier
|
Bundle-Version: 1.0.86.qualifier
|
||||||
Bundle-Release-Date: 20230209
|
Bundle-Release-Date: 20231009
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Bundle-ClassPath: .
|
Bundle-ClassPath: .
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Bundle-Vendor: DBeaver Corp
|
|||||||
Bundle-Name: Cloudbeaver Web Service - Resource manager
|
Bundle-Name: Cloudbeaver Web Service - Resource manager
|
||||||
Bundle-SymbolicName: io.cloudbeaver.service.rm;singleton:=true
|
Bundle-SymbolicName: io.cloudbeaver.service.rm;singleton:=true
|
||||||
Bundle-Version: 1.0.35.qualifier
|
Bundle-Version: 1.0.35.qualifier
|
||||||
Bundle-Release-Date: 20230209
|
Bundle-Release-Date: 20231009
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Bundle-ClassPath: .
|
Bundle-ClassPath: .
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Bundle-Vendor: Cloudbeaver Web Service - Security
|
|||||||
Bundle-Vendor: DBeaver Corp
|
Bundle-Vendor: DBeaver Corp
|
||||||
Bundle-SymbolicName: io.cloudbeaver.service.security;singleton:=true
|
Bundle-SymbolicName: io.cloudbeaver.service.security;singleton:=true
|
||||||
Bundle-Version: 1.0.38.qualifier
|
Bundle-Version: 1.0.38.qualifier
|
||||||
Bundle-Release-Date: 20230209
|
Bundle-Release-Date: 20231009
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Bundle-ClassPath: .
|
Bundle-ClassPath: .
|
||||||
|
|||||||
+16
-2
@@ -1200,6 +1200,9 @@ public class CBEmbeddedSecurityController implements SMAdminController, SMAuthen
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SMAuthInfo authenticateAnonymousUser(@NotNull String appSessionId, @NotNull Map<String, Object> sessionParameters, @NotNull SMSessionType sessionType) throws DBException {
|
public SMAuthInfo authenticateAnonymousUser(@NotNull String appSessionId, @NotNull Map<String, Object> sessionParameters, @NotNull SMSessionType sessionType) throws DBException {
|
||||||
|
if (!application.getAppConfiguration().isAnonymousAccessEnabled()) {
|
||||||
|
throw new SMException("Anonymous access restricted");
|
||||||
|
}
|
||||||
try (Connection dbCon = database.openConnection()) {
|
try (Connection dbCon = database.openConnection()) {
|
||||||
try (JDBCTransaction txn = new JDBCTransaction(dbCon)) {
|
try (JDBCTransaction txn = new JDBCTransaction(dbCon)) {
|
||||||
var smSessionId = createSmSession(appSessionId, null, sessionParameters, sessionType, dbCon);
|
var smSessionId = createSmSession(appSessionId, null, sessionParameters, sessionType, dbCon);
|
||||||
@@ -1235,6 +1238,9 @@ public class CBEmbeddedSecurityController implements SMAdminController, SMAuthen
|
|||||||
@Nullable String authProviderConfigurationId,
|
@Nullable String authProviderConfigurationId,
|
||||||
@NotNull Map<String, Object> userCredentials
|
@NotNull Map<String, Object> userCredentials
|
||||||
) throws DBException {
|
) throws DBException {
|
||||||
|
if (isProviderDisabled(authProviderId, authProviderConfigurationId)) {
|
||||||
|
throw new SMException("Unsupported authentication provider: " + authProviderId);
|
||||||
|
}
|
||||||
var authProgressMonitor = new LoggingProgressMonitor(log);
|
var authProgressMonitor = new LoggingProgressMonitor(log);
|
||||||
try (Connection dbCon = database.openConnection()) {
|
try (Connection dbCon = database.openConnection()) {
|
||||||
try (JDBCTransaction txn = new JDBCTransaction(dbCon)) {
|
try (JDBCTransaction txn = new JDBCTransaction(dbCon)) {
|
||||||
@@ -2589,9 +2595,17 @@ public class CBEmbeddedSecurityController implements SMAdminController, SMAuthen
|
|||||||
return activeUserCredentials.getUserId();
|
return activeUserCredentials.getUserId();
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isProviderEnabled(@NotNull String providerId) {
|
private boolean isProviderDisabled(@NotNull String providerId, @Nullable String authConfigurationId) {
|
||||||
WebAuthConfiguration appConfiguration = application.getAuthConfiguration();
|
WebAuthConfiguration appConfiguration = application.getAuthConfiguration();
|
||||||
return appConfiguration.isAuthProviderEnabled(providerId);
|
if (!appConfiguration.isAuthProviderEnabled(providerId)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (authConfigurationId != null) {
|
||||||
|
SMAuthProviderCustomConfiguration configuration =
|
||||||
|
appConfiguration.getAuthProviderConfiguration(authConfigurationId);
|
||||||
|
return configuration == null || configuration.isDisabled();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clearOldAuthAttemptInfo() throws DBException {
|
public void clearOldAuthAttemptInfo() throws DBException {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
composes: theme-background-surface theme-text-on-surface from global;
|
composes: theme-background-surface theme-text-on-surface from global;
|
||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.loader {
|
.loader {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
@@ -34,20 +34,20 @@ export const Main = observer(function Main() {
|
|||||||
mode={leftBarDisabled ? 'minimize' : splitMainState.mode}
|
mode={leftBarDisabled ? 'minimize' : splitMainState.mode}
|
||||||
disable={leftBarDisabled}
|
disable={leftBarDisabled}
|
||||||
>
|
>
|
||||||
<Pane basis="250px" main>
|
<Pane className={s(styles, { pane: true })} basis="250px" main>
|
||||||
<Loader suspense>
|
<Loader suspense>
|
||||||
<SideBarPanel container={leftBarPanelService.tabsContainer} />
|
<SideBarPanel container={leftBarPanelService.tabsContainer} />
|
||||||
</Loader>
|
</Loader>
|
||||||
</Pane>
|
</Pane>
|
||||||
<ResizerControls />
|
<ResizerControls />
|
||||||
<Pane>
|
<Pane className={s(styles, { pane: true })}>
|
||||||
<Split {...splitRightState} mode={sideBarDisabled ? 'minimize' : splitRightState.mode} disable={sideBarDisabled} sticky={30}>
|
<Split {...splitRightState} mode={sideBarDisabled ? 'minimize' : splitRightState.mode} disable={sideBarDisabled} sticky={30}>
|
||||||
<Pane className={s(styles, { pane: true })}>
|
<Pane className={s(styles, { pane: true })}>
|
||||||
<RightArea />
|
<RightArea />
|
||||||
</Pane>
|
</Pane>
|
||||||
<ResizerControls />
|
<ResizerControls />
|
||||||
<Pane basis="250px" main >
|
<Pane className={s(styles, { pane: true })} basis="250px" main>
|
||||||
<Loader suspense className={s(styles, { loader: true })}>
|
<Loader className={s(styles, { loader: true })} suspense>
|
||||||
<SideBarPanel container={sideBarPanelService.tabsContainer} />
|
<SideBarPanel container={sideBarPanelService.tabsContainer} />
|
||||||
</Loader>
|
</Loader>
|
||||||
</Pane>
|
</Pane>
|
||||||
|
|||||||
@@ -4,3 +4,7 @@
|
|||||||
.slideBox {
|
.slideBox {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
.pane {
|
||||||
|
display: flex;
|
||||||
|
composes: theme-background-surface theme-text-on-surface from global;
|
||||||
|
}
|
||||||
|
|||||||
@@ -39,13 +39,13 @@ export const RightArea = observer<Props>(function RightArea({ className }) {
|
|||||||
</SlideElement>
|
</SlideElement>
|
||||||
<SlideElement>
|
<SlideElement>
|
||||||
<Split {...splitState} sticky={30} split="horizontal" mode={toolsDisabled ? 'minimize' : splitState.mode} disable={toolsDisabled} keepRatio>
|
<Split {...splitState} sticky={30} split="horizontal" mode={toolsDisabled ? 'minimize' : splitState.mode} disable={toolsDisabled} keepRatio>
|
||||||
<Pane>
|
<Pane className={s(styles, { pane: true })}>
|
||||||
<Loader className={s(styles, { loader: true })} suspense>
|
<Loader className={s(styles, { loader: true })} suspense>
|
||||||
<NavigationTabsBar />
|
<NavigationTabsBar />
|
||||||
</Loader>
|
</Loader>
|
||||||
</Pane>
|
</Pane>
|
||||||
<ResizerControls />
|
<ResizerControls />
|
||||||
<Pane basis="30%" main>
|
<Pane className={s(styles, { pane: true })} basis="30%" main>
|
||||||
<Loader className={s(styles, { loader: true })} suspense>
|
<Loader className={s(styles, { loader: true })} suspense>
|
||||||
<ToolsPanel container={toolsPanelService.tabsContainer} />
|
<ToolsPanel container={toolsPanelService.tabsContainer} />
|
||||||
</Loader>
|
</Loader>
|
||||||
|
|||||||
@@ -100,11 +100,11 @@ export const Button = observer<ButtonProps>(function Button({
|
|||||||
>
|
>
|
||||||
<div className={s(styles, { ripple: true })} />
|
<div className={s(styles, { ripple: true })} />
|
||||||
{icon && (
|
{icon && (
|
||||||
<div className={s(styles, { buttonIcon: true, disabled }, className)}>
|
<div className={s(styles, { buttonIcon: true, disabled })}>
|
||||||
<IconOrImage icon={icon} viewBox={viewBox} />
|
<IconOrImage icon={icon} viewBox={viewBox} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<span className={s(styles, { buttonLabel: true }, className)}>{children}</span>
|
<span className={s(styles, { buttonLabel: true })}>{children}</span>
|
||||||
<Loader className={s(styles, { loader: true })} small />
|
<Loader className={s(styles, { loader: true })} small />
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,5 +2,4 @@
|
|||||||
flex: 1 1 0%;
|
flex: 1 1 0%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
display: flex;
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-4
@@ -29,10 +29,8 @@ const styles = css`
|
|||||||
actions {
|
actions {
|
||||||
composes: theme-border-color-background from global;
|
composes: theme-border-color-background from global;
|
||||||
border-right: solid 1px;
|
border-right: solid 1px;
|
||||||
|
display: flex;
|
||||||
& Button {
|
gap: 16px;
|
||||||
margin-right: 16px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
actions,
|
actions,
|
||||||
|
|||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
.controls {
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
height: 100%;
|
||||||
|
align-items: center;
|
||||||
|
margin: auto;
|
||||||
|
gap: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fill {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
+7
-23
@@ -6,27 +6,10 @@
|
|||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
*/
|
*/
|
||||||
import { observer } from 'mobx-react-lite';
|
import { observer } from 'mobx-react-lite';
|
||||||
import styled, { css } from 'reshadow';
|
|
||||||
|
|
||||||
import { Button, useTranslate } from '@cloudbeaver/core-blocks';
|
import { Button, useS, useTranslate } from '@cloudbeaver/core-blocks';
|
||||||
|
|
||||||
const styles = css`
|
import style from './ConnectionDialogFooter.m.css';
|
||||||
controls {
|
|
||||||
display: flex;
|
|
||||||
flex: 1;
|
|
||||||
height: 100%;
|
|
||||||
align-items: center;
|
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
fill {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
Button:not(:first-child) {
|
|
||||||
margin-left: 24px;
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
isConnecting: boolean;
|
isConnecting: boolean;
|
||||||
@@ -35,16 +18,17 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const ConnectionDialogFooter = observer<Props>(function ConnectionDialogFooter({ isConnecting, onConnect, onBack }) {
|
export const ConnectionDialogFooter = observer<Props>(function ConnectionDialogFooter({ isConnecting, onConnect, onBack }) {
|
||||||
|
const styles = useS(style);
|
||||||
const translate = useTranslate();
|
const translate = useTranslate();
|
||||||
return styled(styles)(
|
return (
|
||||||
<controls>
|
<div className={styles.controls}>
|
||||||
<fill />
|
<div className={styles.fill} />
|
||||||
<Button type="button" mod={['outlined']} disabled={isConnecting} onClick={onBack}>
|
<Button type="button" mod={['outlined']} disabled={isConnecting} onClick={onBack}>
|
||||||
{translate('ui_stepper_back')}
|
{translate('ui_stepper_back')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="button" mod={['unelevated']} disabled={isConnecting} onClick={onConnect}>
|
<Button type="button" mod={['unelevated']} disabled={isConnecting} onClick={onConnect}>
|
||||||
{isConnecting ? translate('basicConnection_connectionDialog_connecting') : translate('connections_connection_connect')}
|
{isConnecting ? translate('basicConnection_connectionDialog_connecting') : translate('connections_connection_connect')}
|
||||||
</Button>
|
</Button>
|
||||||
</controls>,
|
</div>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -17,15 +17,12 @@ const styles = css`
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
gap: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
fill {
|
fill {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Button:not(:first-child) {
|
|
||||||
margin-left: 24px;
|
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
.logViewWrapper,
|
.logViewWrapper,
|
||||||
.pane {
|
.pane {
|
||||||
z-index: 0;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
composes: theme-background-surface theme-text-on-surface from global;
|
||||||
}
|
}
|
||||||
|
|||||||
+11
@@ -1,3 +1,14 @@
|
|||||||
|
.pane {
|
||||||
|
composes: theme-background-surface theme-text-on-surface from global;
|
||||||
|
}
|
||||||
|
.split {
|
||||||
|
height: 100%;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.resizerControls {
|
||||||
|
width: 100%;
|
||||||
|
height: 2px;
|
||||||
|
}
|
||||||
.textarea > :global(textarea) {
|
.textarea > :global(textarea) {
|
||||||
border: none !important;
|
border: none !important;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -42,8 +42,8 @@ export const ExecutionPlanTreeBlock = observer<Props>(function ExecutionPlanTree
|
|||||||
const state = useExecutionPlanTreeState(nodeList, onNodeSelect);
|
const state = useExecutionPlanTreeState(nodeList, onNodeSelect);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Split {...splitState} sticky={30} split="horizontal" keepRatio>
|
<Split className={s(styles, { split: true }, className)} {...splitState} sticky={30} split="horizontal" keepRatio>
|
||||||
<Pane>
|
<Pane className={styles.pane}>
|
||||||
{state.nodes.length && state.columns.length ? (
|
{state.nodes.length && state.columns.length ? (
|
||||||
<Table selectedItems={state.selectedNodes} onSelect={state.selectNode}>
|
<Table selectedItems={state.selectedNodes} onSelect={state.selectNode}>
|
||||||
<TableHeader fixed>
|
<TableHeader fixed>
|
||||||
@@ -67,8 +67,8 @@ export const ExecutionPlanTreeBlock = observer<Props>(function ExecutionPlanTree
|
|||||||
<TextPlaceholder>{translate('sql_execution_plan_placeholder')}</TextPlaceholder>
|
<TextPlaceholder>{translate('sql_execution_plan_placeholder')}</TextPlaceholder>
|
||||||
)}
|
)}
|
||||||
</Pane>
|
</Pane>
|
||||||
<ResizerControls />
|
<ResizerControls className={styles.resizerControls} />
|
||||||
<Pane basis="30%" main>
|
<Pane className={styles.pane} basis="30%" main>
|
||||||
<Textarea className={s(styles, { textarea: true }, className)} name="value" rows={3} value={query} readOnly embedded />
|
<Textarea className={s(styles, { textarea: true }, className)} name="value" rows={3} value={query} readOnly embedded />
|
||||||
</Pane>
|
</Pane>
|
||||||
</Split>
|
</Split>
|
||||||
|
|||||||
Reference in New Issue
Block a user