diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/session/monitor/TaskWithEventsProgressMonitor.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/session/monitor/TaskWithEventsProgressMonitor.java index 11810132d2..475c3bc76f 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/session/monitor/TaskWithEventsProgressMonitor.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/session/monitor/TaskWithEventsProgressMonitor.java @@ -22,7 +22,6 @@ import org.jkiss.dbeaver.Log; import org.jkiss.dbeaver.model.exec.DBCException; import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor; -import org.jkiss.dbeaver.model.websocket.event.session.WSSessionSubTaskInfoEvent; import org.jkiss.dbeaver.model.websocket.event.session.WSSessionTaskInfoEvent; import java.util.ArrayList; @@ -62,7 +61,14 @@ public void subTask(String name) { } else { ProgressState progressState = states.get(states.size() - 1); progressState.subTask = name; - webSession.addSessionEvent(WSSessionSubTaskInfoEvent.start(progressState.id, name)); + webSession.addSessionEvent( + WSSessionTaskInfoEvent.update( + progressState.id, + name, + progressState.progress, + progressState.totalWork + ) + ); } } @@ -74,7 +80,12 @@ public void worked(int work) { } else { ProgressState progressState = states.get(states.size() - 1); progressState.progress += work; - webSession.addSessionEvent(WSSessionSubTaskInfoEvent.finish(progressState.id, progressState.subTask)); + webSession.addSessionEvent(WSSessionTaskInfoEvent.update( + progressState.id, + progressState.taskName, + progressState.progress, + progressState.totalWork + )); } } @@ -85,7 +96,7 @@ public void done() { } else { ProgressState progressState = states.get(states.size() - 1); states.remove(states.size() - 1); - webSession.addSessionEvent(WSSessionTaskInfoEvent.finish(progressState.id)); + webSession.addSessionEvent(WSSessionTaskInfoEvent.finish(progressState.id, progressState.progress)); } super.done(); // Restore previous state