Course ID: 234563
+ +{{phase}} Assignment ID: 234563
+-Quality Rubric ID: 34543
+-Git Rubric ID: 34543
+-Main Rubric ID: 34543
+These are the phases are live and open for students to submit to
+{{phase}}
+There is currently no banner message
+ +{{ greeting }} Logout
{{ useAuthStore().user?.repoUrl }}
+Enable student submissions for the following phases:
From d19d9c10587334f2547269ab3237add5dfc42fbe Mon Sep 17 00:00:00 2001 From: DallinFromEarth <112426674+DallinFromEarth@users.noreply.github.com> Date: Tue, 14 May 2024 15:46:02 -0600 Subject: [PATCH 14/16] refactor config change logging --- .../java/edu/byu/cs/controller/ConfigController.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/edu/byu/cs/controller/ConfigController.java b/src/main/java/edu/byu/cs/controller/ConfigController.java index aebc9fe0c..b1adea4eb 100644 --- a/src/main/java/edu/byu/cs/controller/ConfigController.java +++ b/src/main/java/edu/byu/cs/controller/ConfigController.java @@ -16,6 +16,10 @@ public class ConfigController { private static final Logger LOGGER = LoggerFactory.getLogger(SubmissionController.class); + private static void logConfigChange(String changeMessage, String adminNetId) { + LOGGER.info("[CONFIG] Admin %s has %s".formatted(adminNetId, changeMessage)); + } + public static final Route getConfigAdmin = (req, res) -> { JsonObject response = getPublicConfig(); @@ -50,7 +54,7 @@ private static JsonObject getPublicConfig() throws DataAccessException { dao.setConfiguration(ConfigurationDao.Configuration.STUDENT_SUBMISSIONS_ENABLED, phasesArray, ArrayList.class); User user = req.session().attribute("user"); - LOGGER.info("[CONFIG] Admin %s has set the following phases as live: %s".formatted(user.netId(), phasesArray)); + logConfigChange("set the following phases as live: %s".formatted(phasesArray), user.netId()); res.status(200); return ""; @@ -65,9 +69,9 @@ private static JsonObject getPublicConfig() throws DataAccessException { User user = req.session().attribute("user"); if (message.isEmpty()) { - LOGGER.info("[CONFIG] Admin %s has cleared the banner message".formatted(user.netId())); + logConfigChange("cleared the banner message", user.netId()); } else { - LOGGER.info("[CONFIG] Admin %s has set the banner message to: '%s'".formatted(user.netId(), message)); + logConfigChange("set the banner message to: '%s'".formatted(message), user.netId()); } res.status(200); From 3b9c436b04fdc626cf3e4420b2a5f1d899dba4d9 Mon Sep 17 00:00:00 2001 From: DallinFromEarth <112426674+DallinFromEarth@users.noreply.github.com> Date: Tue, 14 May 2024 16:26:43 -0600 Subject: [PATCH 15/16] refactor config storage to appConfig.ts --- src/main/resources/frontend/src/App.vue | 19 +++---- .../frontend/src/services/configService.ts | 6 ++- .../frontend/src/stores/appConfig.ts | 24 ++++++++- .../resources/frontend/src/types/types.ts | 5 -- .../src/views/AdminView/ConfigView.vue | 52 +++++-------------- 5 files changed, 50 insertions(+), 56 deletions(-) diff --git a/src/main/resources/frontend/src/App.vue b/src/main/resources/frontend/src/App.vue index f7b6ed1e8..ccbe7b4f3 100644 --- a/src/main/resources/frontend/src/App.vue +++ b/src/main/resources/frontend/src/App.vue @@ -1,12 +1,12 @@ diff --git a/src/main/resources/frontend/src/services/configService.ts b/src/main/resources/frontend/src/services/configService.ts index 377b4d397..ca763efc6 100644 --- a/src/main/resources/frontend/src/services/configService.ts +++ b/src/main/resources/frontend/src/services/configService.ts @@ -1,5 +1,5 @@ -import { useAppConfigStore } from '@/stores/appConfig' -import { type Config, Phase } from '@/types/types' +import { type Config, useAppConfigStore } from '@/stores/appConfig' +import { Phase } from '@/types/types' import { useAuthStore } from '@/stores/auth' export const getConfig = async ():Promise