Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions webapp/packages/core-session-actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@cloudbeaver/core-di": "workspace:*",
"@cloudbeaver/core-dialogs": "workspace:*",
"@cloudbeaver/core-events": "workspace:*",
"@cloudbeaver/core-executor": "workspace:*",
"@cloudbeaver/core-localization": "workspace:*",
"@cloudbeaver/core-root": "workspace:*",
"@cloudbeaver/core-routing": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import { CbServerEventId, type WsOpenUrlEvent } from '@cloudbeaver/core-sdk';

import { SessionActionsEventHandler } from './SessionActionsEventHandler.js';
import { renderUrlConfirmationDetails } from './UrlConfirmationDetails.js';

Check failure on line 17 in webapp/packages/core-session-actions/src/CoreSessionActionsBootstrap.ts

View workflow job for this annotation

GitHub Actions / Frontend / Lint

Don't import/export .tsx files from .ts files directly, use React.lazy()

@injectable(() => [SessionActionsEventHandler, NotificationService, CommonDialogService, WindowsService, SessionResource])
export class CoreSessionActionsBootstrap extends Bootstrap {
Expand All @@ -31,7 +31,7 @@
}

private async handleOpenUrlEvent(event: WsOpenUrlEvent): Promise<void> {
const { url, timestamp } = event;
const { url, timestamp, actionId } = event;

try {
const { status } = await this.commonDialogService.open(ConfirmationDialog, {
Expand All @@ -52,8 +52,15 @@
this.notificationService.logError({
title: 'core_session_actions_popup_blocked',
});

this.sessionActionsEventHandler.cancelAuth(actionId);
return;
}
}

if (status === DialogueStateResult.Rejected) {
this.sessionActionsEventHandler.cancelAuth(actionId);
}
} catch (exception: any) {
this.notificationService.logException(exception, 'core_session_actions_open_url_error');
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2025 DBeaver Corp and others
* Copyright (C) 2020-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
import { injectable } from '@cloudbeaver/core-di';
import { type ISessionEvent, type SessionEventId, SessionEventSource, SessionEventTopic, TopicEventHandler } from '@cloudbeaver/core-root';
import { CbEventTopic, type WsOpenUrlEvent } from '@cloudbeaver/core-sdk';
import {
ClientEventId,
type ISessionEvent,
type SessionEventId,
SessionEventSource,
SessionEventTopic,
TopicEventHandler,
} from '@cloudbeaver/core-root';
import { CbEventTopic, type CbActionCancelledEvent, type WsOpenUrlEvent } from '@cloudbeaver/core-sdk';

@injectable(() => [SessionEventSource])
export class SessionActionsEventHandler extends TopicEventHandler<WsOpenUrlEvent, ISessionEvent, SessionEventId, SessionEventTopic> {
constructor(sessionEventSource: SessionEventSource) {
super(CbEventTopic.CbSessionAction, sessionEventSource);
}

cancelAuth(actionId: string): void {
this.emit<CbActionCancelledEvent>({
id: ClientEventId.CbClientCancelAction,
topicId: SessionEventTopic.CbSessionAction,
actionId,
});
}

map(event: WsOpenUrlEvent): WsOpenUrlEvent {
return event;
}
Expand Down
3 changes: 3 additions & 0 deletions webapp/packages/core-session-actions/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
{
"path": "../core-events"
},
{
"path": "../core-executor"
},
{
"path": "../core-localization"
},
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/plugin-connections/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@cloudbeaver/core-resource": "workspace:*",
"@cloudbeaver/core-root": "workspace:*",
"@cloudbeaver/core-sdk": "workspace:*",
"@cloudbeaver/core-session-actions": "workspace:*",
"@cloudbeaver/core-settings": "workspace:*",
"@cloudbeaver/core-ui": "workspace:*",
"@cloudbeaver/core-utils": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2025 DBeaver Corp and others
* Copyright (C) 2020-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -40,7 +40,7 @@
getConfig: () => ConnectionInitConfig;
}

export function useDatabaseCredentialsAuthDialog(

Check warning on line 43 in webapp/packages/plugin-connections/src/DatabaseAuthDialog/DatabaseCredentialsAuthDialog/useDatabaseCredentialsAuthDialog.ts

View workflow job for this annotation

GitHub Actions / Frontend / Lint

Missing return type on function
key: IConnectionInfoParams,
networkHandlers: string[],
resetCredentials?: boolean,
Expand Down Expand Up @@ -133,7 +133,7 @@
await this.connectionInfoResource.init(this.getConfig());
this.onInit?.();
} catch (exception: any) {
this.authException = exception;
this.authException = exception;
} finally {
this.authenticating = false;
}
Expand Down
3 changes: 3 additions & 0 deletions webapp/packages/plugin-connections/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@
{
"path": "../core-sdk"
},
{
"path": "../core-session-actions"
},
{
"path": "../core-settings"
},
Expand Down
2 changes: 2 additions & 0 deletions webapp/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2037,6 +2037,7 @@ __metadata:
"@cloudbeaver/core-di": "workspace:*"
"@cloudbeaver/core-dialogs": "workspace:*"
"@cloudbeaver/core-events": "workspace:*"
"@cloudbeaver/core-executor": "workspace:*"
"@cloudbeaver/core-localization": "workspace:*"
"@cloudbeaver/core-root": "workspace:*"
"@cloudbeaver/core-routing": "workspace:*"
Expand Down Expand Up @@ -2798,6 +2799,7 @@ __metadata:
"@cloudbeaver/core-resource": "workspace:*"
"@cloudbeaver/core-root": "workspace:*"
"@cloudbeaver/core-sdk": "workspace:*"
"@cloudbeaver/core-session-actions": "workspace:*"
"@cloudbeaver/core-settings": "workspace:*"
"@cloudbeaver/core-ui": "workspace:*"
"@cloudbeaver/core-utils": "workspace:*"
Expand Down
Loading