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 ed671c48..3cfb0fdd 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 @@ -482,12 +482,12 @@ public final class ClientConnectionTable implements FullPageMonitoringGUIUpdate @Override public boolean grantChecked() { - return this.monitoringData.grantChecked; + return !ClientConnectionTable.this.checkSecurityGrant || this.monitoringData.grantChecked; } @Override public boolean grantDenied() { - return this.monitoringData.grantDenied; + return ClientConnectionTable.this.checkSecurityGrant && this.monitoringData.grantDenied; } @Override diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/session/ColorData.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/session/ColorData.java index 8ee8430a..52bf90b6 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/session/ColorData.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/session/ColorData.java @@ -14,7 +14,6 @@ import org.eclipse.swt.widgets.Display; import ch.ethz.seb.sebserver.gbl.Constants; import ch.ethz.seb.sebserver.gbl.model.session.ClientConnection.ConnectionStatus; -import ch.ethz.seb.sebserver.gbl.model.session.ClientMonitoringDataView; import ch.ethz.seb.sebserver.gbl.util.Utils; public class ColorData { @@ -45,15 +44,11 @@ public class ColorData { case CONNECTION_REQUESTED: case AUTHENTICATED: case ACTIVE: { - final int incidentFlag = entry.incidentFlag(); - if (incidentFlag > 0) { - if ((incidentFlag & ClientMonitoringDataView.FLAG_GRANT_DENIED) > 0) { - return this.color3; - } - if ((incidentFlag & (ClientMonitoringDataView.FLAG_GRANT_NOT_CHECKED - | ClientMonitoringDataView.FLAG_MISSING_PING)) > 0) { - return this.color2; - } + if (entry.grantDenied()) { + return this.color3; + } + if (!entry.grantChecked() || entry.hasMissingPing()) { + return this.color2; } return this.color1; } @@ -80,8 +75,9 @@ public class ColorData { return 1; } case ACTIVE: { - if (entry.incidentFlag() > 0) { - return -1; + final int incidentFlag = entry.incidentFlag(); + if (incidentFlag > 0) { + return -incidentFlag; } return 2; }