SEBSERV-240 implementation and fixes
This commit is contained in:
parent
5b3648bcee
commit
1cd6fb1888
3 changed files with 29 additions and 18 deletions
|
@ -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<ClientConnectionData> table = tableBuilder.compose(pageContext.copyOf(content));
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue