From 29c09adff98ff8d4a74f2f460a84de8ec6cd2b70 Mon Sep 17 00:00:00 2001 From: anhefti Date: Tue, 5 May 2020 16:26:07 +0200 Subject: [PATCH] Fixed monitoring update bug --- .../sebserver/gui/content/MonitoringRunningExam.java | 2 ++ .../gui/service/session/ClientConnectionTable.java | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/MonitoringRunningExam.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/MonitoringRunningExam.java index 11f4775b..9eb2419d 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/MonitoringRunningExam.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/MonitoringRunningExam.java @@ -324,6 +324,7 @@ public class MonitoringRunningExam implements TemplateComposer { action.pageContext()); clientTable.removeSelection(); + clientTable.forceUpdateAll(); return action; } @@ -340,6 +341,7 @@ public class MonitoringRunningExam implements TemplateComposer { action.pageContext()); clientTable.removeSelection(); + clientTable.forceUpdateAll(); return action; } diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/session/ClientConnectionTable.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/session/ClientConnectionTable.java index 9c305b40..90536b3c 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/session/ClientConnectionTable.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/session/ClientConnectionTable.java @@ -106,6 +106,8 @@ public final class ClientConnectionTable { private final Color darkFontColor; private final Color lightFontColor; + private boolean forceUpdateAll = false; + public ClientConnectionTable( final PageService pageService, final Composite tableRoot, @@ -289,13 +291,17 @@ public final class ClientConnectionTable { updatableTableItem.connectionData.clientConnection.connectionToken); } + public void forceUpdateAll() { + this.forceUpdateAll = true; + } + public void updateValues() { if (this.statusFilterChanged) { this.toDelete.clear(); this.toDelete.addAll(this.tableMapping.keySet()); } this.restCallBuilder - .withHeader(API.EXAM_MONITORING_STATE_FILTER, this.statusFilterParam) + .withHeader(API.EXAM_MONITORING_STATE_FILTER, (this.forceUpdateAll) ? "" : this.statusFilterParam) .call() .get(error -> { log.error("Error poll connection data: ", error); @@ -321,6 +327,8 @@ public final class ClientConnectionTable { }); this.statusFilterChanged = false; } + + this.forceUpdateAll = false; } public void updateGUI() {