From 43d812900628a870ee122f391b1a40f34f4e9f1f Mon Sep 17 00:00:00 2001 From: anhefti Date: Wed, 14 Sep 2022 09:59:08 +0200 Subject: [PATCH] SEBSERV-163 fixes --- .../ethz/seb/sebserver/gbl/model/exam/ClientGroupData.java | 7 +++++-- .../sebserver/gui/content/exam/ExamClientGroupList.java | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/exam/ClientGroupData.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/exam/ClientGroupData.java index 35fb2586..ef6553d6 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/exam/ClientGroupData.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/exam/ClientGroupData.java @@ -10,23 +10,26 @@ package ch.ethz.seb.sebserver.gbl.model.exam; import ch.ethz.seb.sebserver.gbl.model.Entity; +/** Overall interface for client group data used either for template or real client groups */ public interface ClientGroupData extends Entity { public static final String ATTR_IP_RANGE_START = "ipRangeStart"; public static final String ATTR_IP_RANGE_END = "ipRangeEnd"; public static final String ATTR_CLIENT_OS = "clientOS"; + /** All known and implemented client group types */ public enum ClientGroupType { NONE, IP_V4_RANGE, CLIENT_OS } + /** All known and implemented SEB OS types */ public enum ClientOS { NONE(null), WINDOWS("Windows"), - MAC_OS("TODO"), - I_OS("TODO"); + MAC_OS("macOS"), + I_OS("iOS"); public final String queryString; diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamClientGroupList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamClientGroupList.java index b9e5553d..998e5006 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamClientGroupList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamClientGroupList.java @@ -89,8 +89,8 @@ public class ExamClientGroupList implements TemplateComposer { final EntityTable clientGroupTable = this.pageService .entityTableBuilder(this.restService.getRestCall(GetClientGroupPage.class)) - .withRestCallAdapter(builder -> builder.withURIVariable( - API.PARAM_PARENT_MODEL_ID, + .withRestCallAdapter(builder -> builder.withQueryParam( + ClientGroup.FILTER_ATTR_EXAM_ID, entityKey.modelId)) .withEmptyMessage(CLIENT_GROUP_EMPTY_LIST_MESSAGE) .withMarkup()