From 935955b78557b5569ed720018c2f17f90e89263d Mon Sep 17 00:00:00 2001 From: Vasilis Kefalas Date: Mon, 26 Aug 2024 14:41:02 +0300 Subject: [PATCH 1/2] Dev (#18) * Synchronizing code from bitbucket repository * Removing TomSelect because it is no longer updated * Metric template remove restriction * Multiple environment variables fix --------- Co-authored-by: Fotis Paraskevopoulos --- gui/src/components/Application/Details.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gui/src/components/Application/Details.vue b/gui/src/components/Application/Details.vue index ab64d53..9e4d93c 100644 --- a/gui/src/components/Application/Details.vue +++ b/gui/src/components/Application/Details.vue @@ -127,9 +127,9 @@
@@ -210,9 +210,9 @@ const environmentVariablesCollectionRules = { } const state = reactive({ - yamlValue: ref(props.payload.content), - variables: ref>(props.payload.variables), - environmentVariables: ref>(props.payload.environmentVariables) + yamlValue: props.payload.content, + variables: props.payload.variables, + environmentVariables: props.payload.environmentVariables }) const autocompleteOptions = ref>([]) @@ -234,7 +234,7 @@ const removeVariable = (index: number) => { const addEnvironment = () => { console.log("Adding environment",state) - state.environmentVariables.push({ name: "", value:"", secret:true }) + state.environmentVariables.push({ name: "", value: "", secret: false }) } const removeEnvironment = (index: number) => { @@ -251,6 +251,7 @@ queryParsedOptionsList() defineExpose({ variables: computed(() => state.variables), + environmentVariables: computed(() => state.environmentVariables), content: computed(() => state.yamlValue), componentV$: computed(() => v$) }) From 360a7a39bff516a5d9acd691d33281cc4bbc0c63 Mon Sep 17 00:00:00 2001 From: Fotis Paraskevopoulos Date: Tue, 27 Aug 2024 22:47:55 +0300 Subject: [PATCH 2/2] Dev (#19) * Synchronizing code from bitbucket repository * Removing TomSelect because it is no longer updated * Metric template remove restriction * Multiple environment variables fix * - Setting dark mode by default in the login window - Providing better view of current build id and build environment for debugging - Added environment variables to set_env.sh so that they can be set during build --------- Co-authored-by: Vasilis Kefalas --- gui/.env.docker | 4 +++- gui/.env.production | 3 --- gui/index.html | 2 +- gui/set_env.sh | 12 +++++++++--- gui/src/Master.vue | 4 +--- gui/src/components/DebugInfo/DebugInfo.vue | 21 ++++++++++----------- gui/src/components/Header/Header.vue | 19 +++++-------------- gui/src/containers/Login/index.vue | 15 +++++++-------- gui/src/store/modules/dark-mode.ts | 13 +++++++------ 9 files changed, 43 insertions(+), 50 deletions(-) delete mode 100644 gui/.env.production diff --git a/gui/.env.docker b/gui/.env.docker index 6529b96..2f64177 100644 --- a/gui/.env.docker +++ b/gui/.env.docker @@ -1,2 +1,4 @@ VITE_API_URL=VITE_API_URL_PLACEHOLDER -CFSB_API_URL=CFSB_API_URL_PLACEHOLDER \ No newline at end of file +VITE_CFSB_API_URL=VITE_CFSB_API_URL_PLACEHOLDER +VITE_BUILD_ID=VITE_BUILD_ID_PLACEHOLDER +VITE_CONTEXT=VITE_CONTEXT_PLACEHOLDER \ No newline at end of file diff --git a/gui/.env.production b/gui/.env.production deleted file mode 100644 index 6911199..0000000 --- a/gui/.env.production +++ /dev/null @@ -1,3 +0,0 @@ -NODE_ENV=production -VITE_API_URL=https://exz-nebulous-backend-staging-2003f98f736b.herokuapp.com - diff --git a/gui/index.html b/gui/index.html index eea4cbe..4b1340e 100644 --- a/gui/index.html +++ b/gui/index.html @@ -1,5 +1,5 @@ - + diff --git a/gui/set_env.sh b/gui/set_env.sh index a36f127..8c257a9 100644 --- a/gui/set_env.sh +++ b/gui/set_env.sh @@ -8,9 +8,15 @@ do echo "Setting VITE_API_URL_PLACEHOlDER environment variables ${VITE_API_URL}" sed -i 's|VITE_API_URL_PLACEHOLDER|'${VITE_API_URL}'|g' $file - echo "Setting CFSB_API_URL_PLACEHOLDER environment variables ${CFSB_API_URL}" - sed -i 's|CFSB_API_URL_PLACEHOLDER|'${CFSB_API_URL}'|g' $file - # Your other variables here... + echo "Setting VITE_CFSB_API_URL_PLACEHOLDER environment variables ${VITE_CFSB_API_URL}" + sed -i 's|VITE_CFSB_API_URL_PLACEHOLDER|'${VITE_CFSB_API_URL}'|g' $file + + echo "Setting VITE_BUILD_ID_PLACEHOLDER environment variables ${VITE_BUILD_ID}" + sed -i 's|VITE_BUILD_ID_PLACEHOLDER|'${VITE_BUILD_ID}'|g' $file + + echo "Setting VITE_CONTEXT_PLACEHOLDER environment variables ${VITE_CONTEXT}" + sed -i 's|VITE_CONTEXT_PLACEHOLDER|'${VITE_CONTEXT}'|g' $file + done diff --git a/gui/src/Master.vue b/gui/src/Master.vue index 6714f88..505f367 100644 --- a/gui/src/Master.vue +++ b/gui/src/Master.vue @@ -23,7 +23,7 @@ diff --git a/gui/src/components/DebugInfo/DebugInfo.vue b/gui/src/components/DebugInfo/DebugInfo.vue index 453dd6b..6abbce6 100644 --- a/gui/src/components/DebugInfo/DebugInfo.vue +++ b/gui/src/components/DebugInfo/DebugInfo.vue @@ -8,20 +8,18 @@
App Information
- -
- {{ backend }}
- {{ environment }}
- {{ build_id }}
- {{ context }}
-
+ + Backend + Environment: {{ environment }} + Build: {{ build_id }} + Context: {{ context }}
@@ -30,11 +28,12 @@ import {Menu} from "@/base-components/Headless"; import Lucide from "@/base-components/Lucide"; + const backend = import.meta.env.VITE_API_URL const environment = import.meta.env.NODE_VERSION -const build_id = import.meta.env.BUILD_ID -const context = import.meta.env.CONTEXT - +const build_id = import.meta.env.VITE_BUILD_ID +const context = import.meta.env.VITE_CONTEXT +console.log(import.meta); \ No newline at end of file diff --git a/gui/src/components/Header/Header.vue b/gui/src/components/Header/Header.vue index e117b23..733caac 100644 --- a/gui/src/components/Header/Header.vue +++ b/gui/src/components/Header/Header.vue @@ -33,12 +33,7 @@ Application Dashboard - - - - -