diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2023-06-21 08:13:48 +0000 |
---|---|---|
committer | Fiete Ostkamp <fiete.ostkamp@telekom.de> | 2023-06-21 08:16:29 +0000 |
commit | eefbbf1e920764a0244f77a80262d9f682d34963 (patch) | |
tree | 5f04aad4ca12ca6f62ae9951174a9f7107b3fc41 /src/assets | |
parent | d68841d9f75636575cd778838a8ceea5fd5aada3 (diff) |
Make ui configurable via environment variables
Issue-ID: PORTALNG-4
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Change-Id: I31b968cef23c7727cfd8cfb2ba65691745a0b8f3
Diffstat (limited to 'src/assets')
-rw-r--r-- | src/assets/env.js | 10 | ||||
-rw-r--r-- | src/assets/env.template.js | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/assets/env.js b/src/assets/env.js new file mode 100644 index 0000000..154ed3b --- /dev/null +++ b/src/assets/env.js @@ -0,0 +1,10 @@ +(function(window) { + window["env"] = window["env"] || {}; + window["env"]["keycloak"] = window["env"]["keycloak"] || {}; + + // Environment variables + window["env"]["customStyleEnabled"]; + window["env"]["keycloak"]["hostname"]; + window["env"]["keycloak"]["realm"]; + window["env"]["keycloak"]["clientId"]; +})(this); diff --git a/src/assets/env.template.js b/src/assets/env.template.js new file mode 100644 index 0000000..037014b --- /dev/null +++ b/src/assets/env.template.js @@ -0,0 +1,10 @@ +(function(window) { + window["env"] = window["env"] || {}; + window["env"]["keycloak"] = window["env"]["keycloak"] || {}; + + // Environment variables + window["env"]["customStyleEnabled"] = "${CUSTOM_STYLE_ENABLED}"; + window["env"]["keycloak"]["hostname"] = "${KEYCLOAK_HOSTNAME}"; + window["env"]["keycloak"]["realm"] = "${KEYCLOAK_REALM}"; + window["env"]["keycloak"]["clientId"] = "${KEYCLOAK_CLIENT_ID}"; +})(this); |