SEBSERV-376 wrong status color when ASK is not enabled
This commit is contained in:
parent
52d41050d2
commit
a99e8fb637
2 changed files with 10 additions and 14 deletions
|
@ -482,12 +482,12 @@ public final class ClientConnectionTable implements FullPageMonitoringGUIUpdate
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean grantChecked() {
|
public boolean grantChecked() {
|
||||||
return this.monitoringData.grantChecked;
|
return !ClientConnectionTable.this.checkSecurityGrant || this.monitoringData.grantChecked;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean grantDenied() {
|
public boolean grantDenied() {
|
||||||
return this.monitoringData.grantDenied;
|
return ClientConnectionTable.this.checkSecurityGrant && this.monitoringData.grantDenied;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -14,7 +14,6 @@ import org.eclipse.swt.widgets.Display;
|
||||||
|
|
||||||
import ch.ethz.seb.sebserver.gbl.Constants;
|
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.ClientConnection.ConnectionStatus;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.session.ClientMonitoringDataView;
|
|
||||||
import ch.ethz.seb.sebserver.gbl.util.Utils;
|
import ch.ethz.seb.sebserver.gbl.util.Utils;
|
||||||
|
|
||||||
public class ColorData {
|
public class ColorData {
|
||||||
|
@ -45,15 +44,11 @@ public class ColorData {
|
||||||
case CONNECTION_REQUESTED:
|
case CONNECTION_REQUESTED:
|
||||||
case AUTHENTICATED:
|
case AUTHENTICATED:
|
||||||
case ACTIVE: {
|
case ACTIVE: {
|
||||||
final int incidentFlag = entry.incidentFlag();
|
if (entry.grantDenied()) {
|
||||||
if (incidentFlag > 0) {
|
return this.color3;
|
||||||
if ((incidentFlag & ClientMonitoringDataView.FLAG_GRANT_DENIED) > 0) {
|
}
|
||||||
return this.color3;
|
if (!entry.grantChecked() || entry.hasMissingPing()) {
|
||||||
}
|
return this.color2;
|
||||||
if ((incidentFlag & (ClientMonitoringDataView.FLAG_GRANT_NOT_CHECKED
|
|
||||||
| ClientMonitoringDataView.FLAG_MISSING_PING)) > 0) {
|
|
||||||
return this.color2;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return this.color1;
|
return this.color1;
|
||||||
}
|
}
|
||||||
|
@ -80,8 +75,9 @@ public class ColorData {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
case ACTIVE: {
|
case ACTIVE: {
|
||||||
if (entry.incidentFlag() > 0) {
|
final int incidentFlag = entry.incidentFlag();
|
||||||
return -1;
|
if (incidentFlag > 0) {
|
||||||
|
return -incidentFlag;
|
||||||
}
|
}
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue