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
Original file line number Diff line number Diff line change
Expand Up @@ -607,11 +607,13 @@ public List<WebAsyncTaskInfo> findTasksByJob(@NotNull Class<? extends AbstractJo
}
}

@NotNull
public WebAsyncTaskInfo createAndRunAsyncTask(@NotNull String taskName, @NotNull WebAsyncTaskProcessor<?> runnable) {
WebAsyncTaskInfo asyncTask = createAsyncTask(taskName);
return runAsyncTask(asyncTask, runnable);
}

@NotNull
public WebAsyncTaskInfo runAsyncTask(@NotNull WebAsyncTaskInfo asyncTask, @NotNull WebAsyncTaskProcessor<?> runnable) {
AbstractJob job = new AbstractCancelableJob(asyncTask.getName()) {
@NotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.model.websocket.WSUtils;
import org.jkiss.dbeaver.model.websocket.event.WSClientEvent;
import org.jkiss.dbeaver.model.websocket.registry.WSClientEventDescriptor;
import org.jkiss.dbeaver.model.websocket.registry.WSEventRegistry;
import org.jkiss.utils.CommonUtils;

public class CBClientEventProcessor {
Expand All @@ -50,6 +52,17 @@
return;
}

// Handle with custom handlers

Check warning on line 55 in server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/websockets/CBClientEventProcessor.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 Comment has incorrect indentation level 8, expected is 9, indentation should be the same level as line 56. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/websockets/CBClientEventProcessor.java:55:9: warning: Comment has incorrect indentation level 8, expected is 9, indentation should be the same level as line 56. (com.puppycrawl.tools.checkstyle.checks.indentation.CommentsIndentationCheck)
WSClientEventDescriptor ced = WSEventRegistry.getInstance().getClientEvent(clientEvent.getId());

Check warning on line 56 in server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/websockets/CBClientEventProcessor.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 'method def' child has incorrect indentation level 9, expected level should be 8. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/websockets/CBClientEventProcessor.java:56:10: warning: 'method def' child has incorrect indentation level 9, expected level should be 8. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)
if (ced != null && ced.getHandler() != null) {
try {
ced.getHandler().handleEvent(webSession, clientEvent);
} catch (Exception e) {
log.error("Error handling event '" + clientEvent.getId() + "'", e);
}
return;
}

switch (clientEvent.getId()) {
case WSSubscribeOnTopicClientEvent.ID: {
webSession.getEventsFilter().subscribeOnEventTopic(clientEvent.getTopicId());
Expand Down
11 changes: 6 additions & 5 deletions webapp/packages/core-blocks/src/Expand/Expandable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,28 @@ import { observer } from 'mobx-react-lite';
import { type ReactNode } from 'react';

import { IconOrImage } from '../IconOrImage.js';
import { DisclosureProvider, Disclosure, DisclosureContent } from '@dbeaver/ui-kit';
import { DisclosureProvider, Disclosure, DisclosureContent, clsx } from '@dbeaver/ui-kit';
import './Expandable.css';

interface Props {
label: string;
label: string | ReactNode;
children: ReactNode;
defaultExpanded?: boolean;
disabled?: boolean;
className?: string;
}

export const Expandable = observer(function Expandable({ label, defaultExpanded, disabled, children }: Props) {
export const Expandable = observer(function Expandable({ label, defaultExpanded, disabled, children, className }: Props) {
return (
<div>
<DisclosureProvider defaultOpen={defaultExpanded}>
<Disclosure disabled={disabled}>
<IconOrImage className="disclosure-icon" icon="arrow" />
<h2 className="theme-typography--body2 disclosure-label">{label}</h2>
{typeof label === 'string' ? <h2 className="theme-typography--body2 disclosure-label">{label}</h2> : label}
</Disclosure>
<DisclosureContent>
<div>
<div className="disclosure-content-inner"> {children}</div>
<div className={clsx('disclosure-content-inner', className)}> {children}</div>
</div>
</DisclosureContent>
</DisclosureProvider>
Expand Down
4 changes: 2 additions & 2 deletions webapp/packages/core-root/src/SessionEventSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ export { ServerEventId, SessionEventTopic, ClientEventId };

export type SessionEventId = ServerEventId | ClientEventId | string;

export interface ISessionEvent extends IBaseServerEvent<SessionEventId, SessionEventTopic> {
export interface ISessionEvent<T extends string = SessionEventTopic> extends IBaseServerEvent<SessionEventId, T> {
id: SessionEventId;
topicId?: SessionEventTopic;
topicId?: T;
[key: string]: any;
}

Expand Down
Loading