diff --git a/src/main/java/de/tum/cit/ase/service/artemis/ArtemisConfiguration.java b/src/main/java/de/tum/cit/ase/service/artemis/ArtemisConfiguration.java index 1a462cf4..680f4761 100644 --- a/src/main/java/de/tum/cit/ase/service/artemis/ArtemisConfiguration.java +++ b/src/main/java/de/tum/cit/ase/service/artemis/ArtemisConfiguration.java @@ -31,6 +31,12 @@ public class ArtemisConfiguration { @Value("${artemis.staging.cleanup-enabled}") private boolean stagingCleanup; + @Value("${artemis.staging2.url}") + private String staging2Url; + + @Value("${artemis.staging2.cleanup-enabled}") + private boolean staging2Cleanup; + @Value("${artemis.production.url}") private String productionUrl; @@ -43,6 +49,7 @@ public String getUrl(ArtemisServer server) { case TS1 -> test1Url; case TS3 -> test3Url; case STAGING -> stagingUrl; + case STAGING2 -> staging2Url; case PRODUCTION -> productionUrl; }; } @@ -53,6 +60,7 @@ public boolean getCleanup(ArtemisServer server) { case TS1 -> test1Cleanup; case TS3 -> test3Cleanup; case STAGING -> stagingCleanup; + case STAGING2 -> staging2Cleanup; case PRODUCTION -> productionCleanup; }; } diff --git a/src/main/java/de/tum/cit/ase/util/ArtemisServer.java b/src/main/java/de/tum/cit/ase/util/ArtemisServer.java index 9e1372eb..d2ffbc6f 100644 --- a/src/main/java/de/tum/cit/ase/util/ArtemisServer.java +++ b/src/main/java/de/tum/cit/ase/util/ArtemisServer.java @@ -5,5 +5,6 @@ public enum ArtemisServer { TS1, TS3, STAGING, + STAGING2, PRODUCTION, } diff --git a/src/main/resources/config/application.yml b/src/main/resources/config/application.yml index 06fb3998..207950da 100644 --- a/src/main/resources/config/application.yml +++ b/src/main/resources/config/application.yml @@ -222,6 +222,9 @@ artemis: staging: url: https://artemis-staging.artemis.in.tum.de/ cleanup-enabled: false + staging2: + url: https://artemis-staging-localci.artemis.cit.tum.de/ + cleanup-enabled: false production: url: https://artemis.cit.tum.de/ cleanup-enabled: false diff --git a/src/main/webapp/app/core/util/artemisServer.ts b/src/main/webapp/app/core/util/artemisServer.ts index 95c205fd..99ff09a5 100644 --- a/src/main/webapp/app/core/util/artemisServer.ts +++ b/src/main/webapp/app/core/util/artemisServer.ts @@ -3,5 +3,6 @@ export enum ArtemisServer { TS1 = 'TS1', TS3 = 'TS3', STAGING = 'STAGING', + STAGING2 = 'STAGING2', PRODUCTION = 'PRODUCTION', } diff --git a/src/main/webapp/app/layouts/create-simulation-box/create-simulation-box.component.ts b/src/main/webapp/app/layouts/create-simulation-box/create-simulation-box.component.ts index e8e4b7e5..0d154210 100644 --- a/src/main/webapp/app/layouts/create-simulation-box/create-simulation-box.component.ts +++ b/src/main/webapp/app/layouts/create-simulation-box/create-simulation-box.component.ts @@ -29,7 +29,7 @@ export class CreateSimulationBoxComponent implements OnInit { instructorUsername: string = ''; instructorPassword: string = ''; - availableServers = [ArtemisServer.TS1, ArtemisServer.TS3, ArtemisServer.PRODUCTION, ArtemisServer.STAGING]; + availableServers = [ArtemisServer.TS1, ArtemisServer.TS3, ArtemisServer.PRODUCTION, ArtemisServer.STAGING, ArtemisServer.STAGING2]; availableModes = [ Mode.CREATE_COURSE_AND_EXAM, Mode.EXISTING_COURSE_CREATE_EXAM, diff --git a/src/main/webapp/app/layouts/navbar/navbar.component.ts b/src/main/webapp/app/layouts/navbar/navbar.component.ts index 3bcd5b14..f6eec512 100644 --- a/src/main/webapp/app/layouts/navbar/navbar.component.ts +++ b/src/main/webapp/app/layouts/navbar/navbar.component.ts @@ -29,7 +29,7 @@ export default class NavbarComponent implements OnInit { version = ''; account: Account | null = null; entitiesNavbarItems: NavbarItem[] = []; - availableServers = [ArtemisServer.TS1, ArtemisServer.TS3, ArtemisServer.PRODUCTION, ArtemisServer.STAGING]; + availableServers = [ArtemisServer.TS1, ArtemisServer.TS3, ArtemisServer.PRODUCTION, ArtemisServer.STAGING, ArtemisServer.STAGING2]; constructor( private loginService: LoginService, diff --git a/src/main/webapp/app/layouts/server-badge/server-badge.component.html b/src/main/webapp/app/layouts/server-badge/server-badge.component.html index dbdb4204..76d799ae 100644 --- a/src/main/webapp/app/layouts/server-badge/server-badge.component.html +++ b/src/main/webapp/app/layouts/server-badge/server-badge.component.html @@ -3,7 +3,7 @@
class="badge" [ngClass]="{ 'bg-success': server == ArtemisServer.LOCAL, - 'bg-warning text-dark': server == ArtemisServer.STAGING, + 'bg-warning text-dark': server == ArtemisServer.STAGING || server == ArtemisServer.STAGING2, 'bg-danger': server == ArtemisServer.PRODUCTION, 'bg-info': server == ArtemisServer.TS1 || server == ArtemisServer.TS3 }" diff --git a/src/test/resources/config/application.yml b/src/test/resources/config/application.yml index 11b7b80a..61ae69e5 100644 --- a/src/test/resources/config/application.yml +++ b/src/test/resources/config/application.yml @@ -102,6 +102,9 @@ artemis: staging: url: cleanup-enabled: false + staging2: + url: + cleanup-enabled: false production: url: cleanup-enabled: false