Fixed monitoring update bug

This commit is contained in:
anhefti 2020-05-05 16:26:07 +02:00
parent 7fe3e5f6db
commit 29c09adff9
2 changed files with 11 additions and 1 deletions

View file

@ -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;
}

View file

@ -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() {