From b13e82895acf45401051b6d8ae0b4e54835e5f25 Mon Sep 17 00:00:00 2001 From: Ruben van Leeuwen Date: Mon, 19 Feb 2024 21:39:23 +0100 Subject: [PATCH 1/2] 417-websockets: Add websocket URL to configuration --- .env.example | 1 + configuration/configuration.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.env.example b/.env.example index e79dfc7c..0e736dd6 100644 --- a/.env.example +++ b/.env.example @@ -5,6 +5,7 @@ ORCHESTRATOR_API_HOST=http://localhost:8080 ORCHESTRATOR_API_PATH=/api ORCHESTRATOR_GRAPHQL_HOST=http://localhost:8080 ORCHESTRATOR_GRAPHQL_PATH=/api/graphql +ORCHESTRATOR_WEBSOCKET_URL=ws://localhost:8080 AUTH_ACTIVE=true NEXTAUTH_ID="keycloak" diff --git a/configuration/configuration.ts b/configuration/configuration.ts index 3da0ee75..b606149b 100644 --- a/configuration/configuration.ts +++ b/configuration/configuration.ts @@ -8,6 +8,7 @@ import { export const DEFAULT_GRAPHQL_CORE_ENDPOINT = 'http://localhost:8080/api/graphql'; export const DEFAULT_ORCHESTRATOR_API_BASE_URL = 'http://localhost:8080/api'; +export const DEFAULT_ORCHESTRATOR_WEBSOCKET_URL = 'ws://localhost:8080'; export const ENGINE_STATUS_ENDPOINT = '/settings/status'; export const PROCESS_STATUS_COUNTS_ENDPOINT = '/processes/status-counts'; @@ -41,6 +42,9 @@ export const getInitialOrchestratorConfig = (): OrchestratorConfig => { orchestratorApiBaseUrl + SUBSCRIPTION_ACTIONS_ENDPOINT, subscriptionProcessesEndpoint: orchestratorApiBaseUrl + SUBSCRIPTION_PROCESSES_ENDPOINT, + orchestratorWebsocketUrl: + process.env.ORCHESTRATOR_WEBSOCKET_URL || + DEFAULT_ORCHESTRATOR_WEBSOCKET_URL, authActive: process.env.AUTH_ACTIVE?.toLowerCase() != 'false', }; }; From 5ea979bdf90454a157a6c19a7301c7d11abf18de Mon Sep 17 00:00:00 2001 From: Ruben van Leeuwen Date: Thu, 22 Feb 2024 11:56:53 +0100 Subject: [PATCH 2/2] 417-websockets: Add some env vars to env.example --- .env.example | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.env.example b/.env.example index 0e736dd6..f3f5dcfa 100644 --- a/.env.example +++ b/.env.example @@ -20,3 +20,6 @@ NEXTAUTH_URL=http://localhost:3000/api/auth KEYCLOAK_ADMIN=admin KEYCLOAK_ADMIN_PASSWORD=admin KEYCLOAK_PORT=8085 + +NEXT_PUBLIC_USE_WEBSOCKET=false +NEXT_PUBLIC_USE_THEME_TOGGLE=false \ No newline at end of file