diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/monitoring/FinishedExam.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/monitoring/FinishedExam.java index 4dae0d35..19f173d9 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/monitoring/FinishedExam.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/monitoring/FinishedExam.java @@ -147,15 +147,19 @@ public class FinishedExam implements TemplateComposer { .withDefaultAction(t -> actionBuilder .newAction(ActionDefinition.VIEW_FINISHED_EXAM_CLIENT_CONNECTION) .withParentEntityKey(examKey) - .create()); + .create()) + .withSelectionListener(this.pageService.getSelectionPublisher( + pageContext, + ActionDefinition.VIEW_FINISHED_EXAM_CLIENT_CONNECTION)); indicators.stream().forEach(indicator -> { - if (indicator.type != IndicatorType.LAST_PING) { - tableBuilder.withColumn(new ColumnDefinition<>( - indicator.name, - new LocTextKey(indicator.name), - indicatorValueFunction(indicator))); + if (indicator.type == IndicatorType.LAST_PING || indicator.type == IndicatorType.NONE) { + return; } + tableBuilder.withColumn(new ColumnDefinition<>( + indicator.name, + new LocTextKey(indicator.name), + indicatorValueFunction(indicator))); }); final EntityTable table = tableBuilder.compose(pageContext.copyOf(content)); diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/monitoring/FinishedExamClientConnection.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/monitoring/FinishedExamClientConnection.java index e5a1936e..03a042e4 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/monitoring/FinishedExamClientConnection.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/monitoring/FinishedExamClientConnection.java @@ -23,6 +23,7 @@ import ch.ethz.seb.sebserver.gbl.model.Domain; import ch.ethz.seb.sebserver.gbl.model.EntityKey; import ch.ethz.seb.sebserver.gbl.model.exam.Exam; import ch.ethz.seb.sebserver.gbl.model.exam.Indicator; +import ch.ethz.seb.sebserver.gbl.model.exam.Indicator.IndicatorType; import ch.ethz.seb.sebserver.gbl.model.exam.QuizData; import ch.ethz.seb.sebserver.gbl.model.session.ClientConnection; import ch.ethz.seb.sebserver.gbl.model.session.ClientConnectionData; @@ -170,18 +171,23 @@ public class FinishedExamClientConnection implements TemplateComposer { .asColorBox()) .addEmptyCell(); - indicators.forEach(indicator -> formBuilder.addField(FormBuilder.text( - indicator.name, - new LocTextKey(indicator.name), - connectionData.indicatorValues - .stream() - .filter(indicatorValue -> indicatorValue.getIndicatorId().equals(indicator.id)) - .findFirst() - .map(iv -> IndicatorValue.getDisplayValue(iv, indicator.type)) - .orElse(Constants.EMPTY_NOTE)) - .asColorBox() - .withDefaultLabel(indicator.name)) - .addEmptyCell()); + indicators.forEach(indicator -> { + if (indicator.type == IndicatorType.LAST_PING || indicator.type == IndicatorType.NONE) { + return; + } + formBuilder.addField(FormBuilder.text( + indicator.name, + new LocTextKey(indicator.name), + connectionData.indicatorValues + .stream() + .filter(indicatorValue -> indicatorValue.getIndicatorId().equals(indicator.id)) + .findFirst() + .map(iv -> IndicatorValue.getDisplayValue(iv, indicator.type)) + .orElse(Constants.EMPTY_NOTE)) + .asColorBox() + .withDefaultLabel(indicator.name)) + .addEmptyCell(); + }); formBuilder.build(); diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties index a7225916..4be4b3a8 100644 --- a/src/main/resources/messages.properties +++ b/src/main/resources/messages.properties @@ -1894,6 +1894,7 @@ sebserver.finished.exam.connections.name=Session or User Name sebserver.finished.exam.connections.info=Connection Info sebserver.finished.exam.connections.status=Status sebserver.finished.exam.connection.emptySelection=At first please select a Connection from the list +sebserver.finished.exam.connection.action.view=View Details sebserver.finished.exam.connection.title=SEB Client Connection sebserver.finished.connection.form.id=User Name or Session