From ae0e4cd105e329d4357d3c6c8a50ee8e5a773bab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 09:23:35 +0100 Subject: [PATCH 1/3] Bump vuetify from 3.7.1 to 3.7.4 in /aas-web-ui (#91) Bumps [vuetify](https://github.com/vuetifyjs/vuetify/tree/HEAD/packages/vuetify) from 3.7.1 to 3.7.4. - [Release notes](https://github.com/vuetifyjs/vuetify/releases) - [Commits](https://github.com/vuetifyjs/vuetify/commits/v3.7.4/packages/vuetify) --- updated-dependencies: - dependency-name: vuetify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- aas-web-ui/package.json | 2 +- aas-web-ui/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/aas-web-ui/package.json b/aas-web-ui/package.json index 38fea244..da563e4b 100644 --- a/aas-web-ui/package.json +++ b/aas-web-ui/package.json @@ -28,7 +28,7 @@ "vue": "^3.5.12", "vue-router": "^4.4.5", "vue3-apexcharts": "^1.7.0", - "vuetify": "^3.7.1", + "vuetify": "^3.7.4", "webfontloader": "^1.0.0" }, "devDependencies": { diff --git a/aas-web-ui/yarn.lock b/aas-web-ui/yarn.lock index fb34d05e..be11a725 100644 --- a/aas-web-ui/yarn.lock +++ b/aas-web-ui/yarn.lock @@ -2459,10 +2459,10 @@ vue@^3.2.25, vue@^3.5.12: "@vue/server-renderer" "3.5.12" "@vue/shared" "3.5.12" -vuetify@^3.7.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/vuetify/-/vuetify-3.7.1.tgz#102dc8b6c8795955d874da85375a98e369c102d6" - integrity sha512-N1XlczbgeGt/O+JUk72QPrqcDaRIXUdptUciJqGyTvZ9cfMoSlEWs6TZO+dOOfXbKvmIMFMycYg4dgSHDpCPhg== +vuetify@^3.7.4: + version "3.7.4" + resolved "https://registry.yarnpkg.com/vuetify/-/vuetify-3.7.4.tgz#52de97ecb4e456c92dc81c723d1e21b1ddccdbc6" + integrity sha512-Y8UU5wUDQXC3oz2uumPb8IOdvB4XMCxtxnmqdOc+LihNuPlkSgxIwf92ndRzbOtJFKHsggFUxpyLqpQp+A+5kg== webfontloader@^1.0.0: version "1.6.28" From 5a4e5900d638d24beda2589260d5602f8fe83760 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 13:12:30 +0100 Subject: [PATCH 2/3] Bump apexcharts from 3.54.1 to 4.0.0 in /aas-web-ui (#81) Bumps [apexcharts](https://github.com/apexcharts/apexcharts.js) from 3.54.1 to 4.0.0. - [Release notes](https://github.com/apexcharts/apexcharts.js/releases) - [Commits](https://github.com/apexcharts/apexcharts.js/compare/v3.54.1...v4.0.0) --- updated-dependencies: - dependency-name: apexcharts dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- aas-web-ui/package.json | 2 +- aas-web-ui/yarn.lock | 103 +++++++++++++++------------------------- 2 files changed, 38 insertions(+), 67 deletions(-) diff --git a/aas-web-ui/package.json b/aas-web-ui/package.json index da563e4b..8d34b39c 100644 --- a/aas-web-ui/package.json +++ b/aas-web-ui/package.json @@ -15,7 +15,7 @@ "@fontsource/roboto": "^5.0.14", "@mdi/font": "^7.4.47", "@vue-leaflet/vue-leaflet": "^0.10.1", - "apexcharts": "^3.54.1", + "apexcharts": "^4.0.0", "keycloak-js": "^25.0.4", "leaflet": "^1.9.4", "lodash": "^4.17.21", diff --git a/aas-web-ui/yarn.lock b/aas-web-ui/yarn.lock index be11a725..dddbf3a6 100644 --- a/aas-web-ui/yarn.lock +++ b/aas-web-ui/yarn.lock @@ -407,6 +407,33 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.5.tgz#f2feb149235a5dc1deb5439758f8871255e5a161" integrity sha512-+lvL/4mQxSV8MukpkKyyvfwhH266COcWlXE/1qxwN08ajovta3459zrjLghYMgDerlzNwLAcFpvU+WWE5y6nAQ== +"@svgdotjs/svg.draggable.js@^3.0.4": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@svgdotjs/svg.draggable.js/-/svg.draggable.js-3.0.4.tgz#505430e86b5e73b5b5abba12ac6002633897324e" + integrity sha512-vWi/Col5Szo74HJVBgMHz23kLVljt3jvngmh0DzST45iO2ubIZ487uUAHIxSZH2tVRyiaaTL+Phaasgp4gUD2g== + +"@svgdotjs/svg.filter.js@^3.0.8": + version "3.0.8" + resolved "https://registry.yarnpkg.com/@svgdotjs/svg.filter.js/-/svg.filter.js-3.0.8.tgz#998cb2481a871fa70d7dbaa891c886b335c562d7" + integrity sha512-YshF2YDaeRA2StyzAs5nUPrev7npQ38oWD0eTRwnsciSL2KrRPMoUw8BzjIXItb3+dccKGTX3IQOd2NFzmHkog== + dependencies: + "@svgdotjs/svg.js" "^3.1.1" + +"@svgdotjs/svg.js@^3.1.1", "@svgdotjs/svg.js@^3.2.4": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@svgdotjs/svg.js/-/svg.js-3.2.4.tgz#4716be92a64c66b29921b63f7235fcfb953fb13a" + integrity sha512-BjJ/7vWNowlX3Z8O4ywT58DqbNRyYlkk6Yz/D13aB7hGmfQTvGX4Tkgtm/ApYlu9M7lCQi15xUEidqMUmdMYwg== + +"@svgdotjs/svg.resize.js@^2.0.2": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@svgdotjs/svg.resize.js/-/svg.resize.js-2.0.4.tgz#a23b2d815d453bccb7a5c38ad547153df7cfa6db" + integrity sha512-TRzYv0xh/eF7dOsse/asi/Bn+O8vvNRPlVUvYwTje2lKpGvT65ncXuqNWDNnhxJKlp5NcgMxfM5VMKL8c1WNTQ== + +"@svgdotjs/svg.select.js@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@svgdotjs/svg.select.js/-/svg.select.js-4.0.1.tgz#cece6e3bde62b44d73d0ab4647db466a4951232b" + integrity sha512-pDFEDN7M6gBXYcx09anniVvI1f08W9UQCVMAt3tUalyL42sbdIP5vVefX0wBY68J1zVtp+F70zIP1mhVTwkedQ== + "@tweenjs/tween.js@~23.1.3": version "23.1.3" resolved "https://registry.yarnpkg.com/@tweenjs/tween.js/-/tween.js-23.1.3.tgz#eff0245735c04a928bb19c026b58c2a56460539d" @@ -773,18 +800,17 @@ ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" -apexcharts@^3.54.1: - version "3.54.1" - resolved "https://registry.yarnpkg.com/apexcharts/-/apexcharts-3.54.1.tgz#9b78a6ee10e4225d5e04309c8e5b379e2c5c9da2" - integrity sha512-E4et0h/J1U3r3EwS/WlqJCQIbepKbp6wGUmaAwJOMjHUP4Ci0gxanLa7FR3okx6p9coi4st6J853/Cb1NP0vpA== - dependencies: +apexcharts@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/apexcharts/-/apexcharts-4.0.0.tgz#d6dffa10a8330d697eed41868f3f30fbd3ef048e" + integrity sha512-6G4Zuph04abbUzzroHXkXARk0LwKdBdQQo5+zRebi+sOoj5Q/toj4z6QMB6e6w/FdkeaO1i3NH3LnCv8hcqczw== + dependencies: + "@svgdotjs/svg.draggable.js" "^3.0.4" + "@svgdotjs/svg.filter.js" "^3.0.8" + "@svgdotjs/svg.js" "^3.2.4" + "@svgdotjs/svg.resize.js" "^2.0.2" + "@svgdotjs/svg.select.js" "^4.0.1" "@yr/monotone-cubic-spline" "^1.0.3" - svg.draggable.js "^2.2.2" - svg.easing.js "^2.0.0" - svg.filter.js "^2.0.2" - svg.pathmorphing.js "^0.1.3" - svg.resize.js "^1.4.3" - svg.select.js "^3.0.1" argparse@^2.0.1: version "2.0.1" @@ -2186,61 +2212,6 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -svg.draggable.js@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/svg.draggable.js/-/svg.draggable.js-2.2.2.tgz#c514a2f1405efb6f0263e7958f5b68fce50603ba" - integrity sha512-JzNHBc2fLQMzYCZ90KZHN2ohXL0BQJGQimK1kGk6AvSeibuKcIdDX9Kr0dT9+UJ5O8nYA0RB839Lhvk4CY4MZw== - dependencies: - svg.js "^2.0.1" - -svg.easing.js@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/svg.easing.js/-/svg.easing.js-2.0.0.tgz#8aa9946b0a8e27857a5c40a10eba4091e5691f12" - integrity sha512-//ctPdJMGy22YoYGV+3HEfHbm6/69LJUTAqI2/5qBvaNHZ9uUFVC82B0Pl299HzgH13rKrBgi4+XyXXyVWWthA== - dependencies: - svg.js ">=2.3.x" - -svg.filter.js@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/svg.filter.js/-/svg.filter.js-2.0.2.tgz#91008e151389dd9230779fcbe6e2c9a362d1c203" - integrity sha512-xkGBwU+dKBzqg5PtilaTb0EYPqPfJ9Q6saVldX+5vCRy31P6TlRCP3U9NxH3HEufkKkpNgdTLBJnmhDHeTqAkw== - dependencies: - svg.js "^2.2.5" - -svg.js@>=2.3.x, svg.js@^2.0.1, svg.js@^2.2.5, svg.js@^2.4.0, svg.js@^2.6.5: - version "2.7.1" - resolved "https://registry.yarnpkg.com/svg.js/-/svg.js-2.7.1.tgz#eb977ed4737001eab859949b4a398ee1bb79948d" - integrity sha512-ycbxpizEQktk3FYvn/8BH+6/EuWXg7ZpQREJvgacqn46gIddG24tNNe4Son6omdXCnSOaApnpZw6MPCBA1dODA== - -svg.pathmorphing.js@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/svg.pathmorphing.js/-/svg.pathmorphing.js-0.1.3.tgz#c25718a1cc7c36e852ecabc380e758ac09bb2b65" - integrity sha512-49HWI9X4XQR/JG1qXkSDV8xViuTLIWm/B/7YuQELV5KMOPtXjiwH4XPJvr/ghEDibmLQ9Oc22dpWpG0vUDDNww== - dependencies: - svg.js "^2.4.0" - -svg.resize.js@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/svg.resize.js/-/svg.resize.js-1.4.3.tgz#885abd248e0cd205b36b973c4b578b9a36f23332" - integrity sha512-9k5sXJuPKp+mVzXNvxz7U0uC9oVMQrrf7cFsETznzUDDm0x8+77dtZkWdMfRlmbkEEYvUn9btKuZ3n41oNA+uw== - dependencies: - svg.js "^2.6.5" - svg.select.js "^2.1.2" - -svg.select.js@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/svg.select.js/-/svg.select.js-2.1.2.tgz#e41ce13b1acff43a7441f9f8be87a2319c87be73" - integrity sha512-tH6ABEyJsAOVAhwcCjF8mw4crjXSI1aa7j2VQR8ZuJ37H2MBUbyeqYr5nEO7sSN3cy9AR9DUwNg0t/962HlDbQ== - dependencies: - svg.js "^2.2.5" - -svg.select.js@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/svg.select.js/-/svg.select.js-3.0.1.tgz#a4198e359f3825739226415f82176a90ea5cc917" - integrity sha512-h5IS/hKkuVCbKSieR9uQCj9w+zLHoPh+ce19bBYyqF53g6mnPB8sAtIbe1s9dh2S2fCmYX2xel1Ln3PJBbK4kw== - dependencies: - svg.js "^2.6.5" - synckit@^0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.9.1.tgz#febbfbb6649979450131f64735aa3f6c14575c88" From 56103dc73a244e743f9e10706108462a1ee7d2e8 Mon Sep 17 00:00:00 2001 From: Sebastian Eicke Date: Mon, 11 Nov 2024 14:30:11 +0100 Subject: [PATCH 3/3] Env variable for disabling path/url configuration to the BaSyx backend components (#74) * Introduced Env variable ENDPOINT_CONFIG_AVAILABLE * Hiding config input fields * Bypass window.localStorage * Fix * Update Readme * Removes commented line --------- Co-authored-by: aaron Zielstorff --- README.md | 3 + aas-web-ui/entrypoint.sh | 4 + aas-web-ui/public/config.json | 33 ++--- .../AppNavigation/AppNavigation.vue | 123 ++++++++++-------- .../src/components/AppNavigation/MainMenu.vue | 47 +++++-- aas-web-ui/src/store/EnvironmentStore.ts | 4 + 6 files changed, 133 insertions(+), 81 deletions(-) diff --git a/README.md b/README.md index 29578b92..1895774f 100644 --- a/README.md +++ b/README.md @@ -172,6 +172,8 @@ docker run -p 3000:3000 eclipsebasyx/aas-ui `-e BASE_PATH=` +`-e ENDPOINT_CONFIG_AVAILABLE=` + 4. If you want to use a custom logo, you can mount a folder containing the logo and the favicon.ico to the container by adding the following argument to the run command: `-v :/usr/src/app/dist/Logo` @@ -202,6 +204,7 @@ aas-web-gui: PRIMARY_COLOR: "" LOGO_PATH: "" BASE_PATH: "" + ENDPOINT_CONFIG_AVAILABLE: "" volumes: - :/usr/src/app/dist/Logo ``` diff --git a/aas-web-ui/entrypoint.sh b/aas-web-ui/entrypoint.sh index 4d4ae7fe..443df256 100644 --- a/aas-web-ui/entrypoint.sh +++ b/aas-web-ui/entrypoint.sh @@ -53,6 +53,10 @@ if [ -n "$KEYCLOAK_CLIENT_ID" ]; then jq '.keycloakClientId = env.KEYCLOAK_CLIENT_ID' /usr/src/app/dist/config.json > /tmp/config.json && mv /tmp/config.json /usr/src/app/dist/config.json fi +if [ -n "$ENDPOINT_CONFIG_AVAILABLE" ]; then + jq '.endpointConfigAvailable = env.ENDPOINT_CONFIG_AVAILABLE' /usr/src/app/dist/config.json > /tmp/config.json && mv /tmp/config.json /usr/src/app/dist/config.json +fi + if [ -n "$BASE_PATH" ]; then echo "=====================" echo "BASE_PATH: $BASE_PATH" diff --git a/aas-web-ui/public/config.json b/aas-web-ui/public/config.json index 193f881a..d0a4d4f5 100644 --- a/aas-web-ui/public/config.json +++ b/aas-web-ui/public/config.json @@ -1,16 +1,17 @@ -{ - "logoPath": "Logo/Logo.svg", - "basePath": "", - "aasDiscoveryPath": "", - "aasRegistryPath": "", - "submodelRegistryPath": "", - "aasRepoPath": "", - "submodelRepoPath": "", - "cdRepoPath": "", - "dashboardServicePath": "", - "primaryColor": "#0cb2f0", - "influxdbToken": "", - "keycloakUrl": "", - "keycloakRealm": "", - "keycloakClientId": "" -} +{ + "logoPath": "Logo/Logo.svg", + "basePath": "", + "aasDiscoveryPath": "", + "aasRegistryPath": "", + "submodelRegistryPath": "", + "aasRepoPath": "", + "submodelRepoPath": "", + "cdRepoPath": "", + "dashboardServicePath": "", + "primaryColor": "#0cb2f0", + "influxdbToken": "", + "keycloakUrl": "", + "keycloakRealm": "", + "keycloakClientId": "", + "endpointConfigAvailable": true +} diff --git a/aas-web-ui/src/components/AppNavigation/AppNavigation.vue b/aas-web-ui/src/components/AppNavigation/AppNavigation.vue index 6970c77b..26b3d03b 100644 --- a/aas-web-ui/src/components/AppNavigation/AppNavigation.vue +++ b/aas-web-ui/src/components/AppNavigation/AppNavigation.vue @@ -251,6 +251,7 @@ mainMenu: false, // Variable to show the Main Menu mobileMenu: false, // Variable to show the Mobile Menu dashboardAvailable: false, // Dashboard Availability + endpointConfigAvailable: true, drawerVisibility: true, // Variable to show the AAS List Drawer }; }, @@ -317,6 +318,10 @@ return this.envStore.getEnvLogoPath; }, + getEndpointConfigAvailable() { + return this.envStore.getEndpointConfigAvailable; + }, + dashboardServicePath() { return this.envStore.getEnvDashboardServicePath; }, @@ -371,6 +376,7 @@ mounted() { this.isDashboardAvailable(); + this.endpointConfigAvailable = this.getEndpointConfigAvailable; // check the local storage for a saved theme preference let theme = localStorage.getItem('theme'); if (theme) { @@ -394,88 +400,97 @@ } // auto connect to aas discovery that was saved in local storage - let aasDiscoveryURL = window.localStorage.getItem('aasDiscoveryURL'); - if (aasDiscoveryURL) { - this.aasDiscoveryURL = aasDiscoveryURL; - this.connectToAASDiscovery(); - // console.log('DiscoveryURL was found in local storage', DiscoveryURL); - } else { - // if no discovery server was saved in local storage, check if an environment variable is set - if (this.EnvAASDiscoveryPath && this.EnvAASDiscoveryPath != '') { - this.aasDiscoveryURL = this.EnvAASDiscoveryPath; + if (this.endpointConfigAvailable) { + let aasDiscoveryURL = window.localStorage.getItem('aasDiscoveryURL'); + if (aasDiscoveryURL) { + this.aasDiscoveryURL = aasDiscoveryURL; this.connectToAASDiscovery(); + // console.log('DiscoveryURL was found in local storage', DiscoveryURL); } } + if (!this.aasDiscoveryURL && this.EnvAASDiscoveryPath && this.EnvAASDiscoveryPath != '') { + this.aasDiscoveryURL = this.EnvAASDiscoveryPath; + this.connectToAASDiscovery(); + } + // auto connect to aas registry that was saved in local storage - let aasRegistryURL = window.localStorage.getItem('aasRegistryURL'); - if (aasRegistryURL) { - this.aasRegistryURL = aasRegistryURL; - this.connectToAASRegistry(); - // console.log('RegistryURL was found in local storage', RegistryURL); - } else { - // if no registry server was saved in local storage, check if an environment variable is set - if (this.EnvAASRegistryPath && this.EnvAASRegistryPath != '') { - this.aasRegistryURL = this.EnvAASRegistryPath; + if (this.endpointConfigAvailable) { + let aasRegistryURL = window.localStorage.getItem('aasRegistryURL'); + if (aasRegistryURL) { + this.aasRegistryURL = aasRegistryURL; this.connectToAASRegistry(); + // console.log('RegistryURL was found in local storage', RegistryURL); } } + if (!this.aasRegistryURL && this.EnvAASRegistryPath && this.EnvAASRegistryPath != '') { + this.aasRegistryURL = this.EnvAASRegistryPath; + this.connectToAASRegistry(); + } + // auto connect to submodel registry that was saved in local storage - let submodelRegistryURL = window.localStorage.getItem('submodelRegistryURL'); - if (submodelRegistryURL) { - this.submodelRegistryURL = submodelRegistryURL; - this.connectToSubmodelRegistry(); - // console.log('SubmodelRegistryURL was found in local storage', SubmodelRegistryURL); - } else { - // if no submodel registry server was saved in local storage, check if an environment variable is set - if (this.EnvSubmodelRegistryPath && this.EnvSubmodelRegistryPath != '') { - this.submodelRegistryURL = this.EnvSubmodelRegistryPath; + if (this.endpointConfigAvailable) { + let submodelRegistryURL = window.localStorage.getItem('submodelRegistryURL'); + if (submodelRegistryURL) { + this.submodelRegistryURL = submodelRegistryURL; this.connectToSubmodelRegistry(); + // console.log('SubmodelRegistryURL was found in local storage', SubmodelRegistryURL); } } + if (!this.submodelRegistryURL && this.EnvSubmodelRegistryPath && this.EnvSubmodelRegistryPath != '') { + this.submodelRegistryURL = this.EnvSubmodelRegistryPath; + this.connectToSubmodelRegistry(); + } // auto connect to AAS Repository that was saved in local storage - let aasRepoURL = window.localStorage.getItem('AASRepoURL'); - if (aasRepoURL) { - this.AASRepoURL = aasRepoURL; - this.connectToEnvironment('AAS'); - // console.log('AASRepoURL was found in local storage', AASRepoURL); - } else { - // if no aas server was saved in local storage, check if an environment variable is set - if (this.EnvAASRepoPath && this.EnvAASRepoPath != '') { - this.AASRepoURL = this.EnvAASRepoPath; + if (this.endpointConfigAvailable) { + let aasRepoURL = window.localStorage.getItem('AASRepoURL'); + if (aasRepoURL) { + this.AASRepoURL = aasRepoURL; this.connectToEnvironment('AAS'); + // console.log('AASRepoURL was found in local storage', AASRepoURL); } } + if (!this.AASRepoURL && this.EnvAASRepoPath && this.EnvAASRepoPath != '') { + this.AASRepoURL = this.EnvAASRepoPath; + this.connectToEnvironment('AAS'); + } + // auto connect to Submodel Repository that was saved in local storage - let submodelRepoURL = window.localStorage.getItem('SubmodelRepoURL'); - if (submodelRepoURL) { - this.SubmodelRepoURL = submodelRepoURL; - this.connectToEnvironment('Submodel'); - // console.log('SubmodelRepoURL was found in local storage', SubmodelRepoURL); - } else { - // if no submodel server was saved in local storage, check if an environment variable is set - if (this.EnvSubmodelRepoPath && this.EnvSubmodelRepoPath != '') { - this.SubmodelRepoURL = this.EnvSubmodelRepoPath; + if (this.endpointConfigAvailable) { + let submodelRepoURL = window.localStorage.getItem('SubmodelRepoURL'); + if (submodelRepoURL) { + this.SubmodelRepoURL = submodelRepoURL; this.connectToEnvironment('Submodel'); + // // console.log('SubmodelRepoURL was found in local storage', SubmodelRepoURL); } } + if (!this.SubmodelRepoURL && this.EnvSubmodelRepoPath && this.EnvSubmodelRepoPath != '') { + this.SubmodelRepoURL = this.EnvSubmodelRepoPath; + this.connectToEnvironment('Submodel'); + } + // auto connect to Concept Description Repository that was saved in local storage - let conceptDescriptionRepoURL = window.localStorage.getItem('ConceptDescriptionRepoURL'); - if (conceptDescriptionRepoURL) { - this.ConceptDescriptionRepoURL = conceptDescriptionRepoURL; - this.connectToEnvironment('ConceptDescription'); - // console.log('ConceptDescriptionRepoURL was found in local storage', ConceptDescriptionRepoURL); - } else { - // if no concept description server was saved in local storage, check if an environment variable is set - if (this.EnvConceptDescriptionRepoPath && this.EnvConceptDescriptionRepoPath != '') { - this.ConceptDescriptionRepoURL = this.EnvConceptDescriptionRepoPath; + if (this.endpointConfigAvailable) { + let conceptDescriptionRepoURL = window.localStorage.getItem('ConceptDescriptionRepoURL'); + if (conceptDescriptionRepoURL) { + this.ConceptDescriptionRepoURL = conceptDescriptionRepoURL; this.connectToEnvironment('ConceptDescription'); + // console.log('ConceptDescriptionRepoURL was found in local storage', ConceptDescriptionRepoURL); } } + + if ( + !this.ConceptDescriptionRepoURL && + this.EnvConceptDescriptionRepoPath && + this.EnvConceptDescriptionRepoPath != '' + ) { + this.ConceptDescriptionRepoURL = this.EnvConceptDescriptionRepoPath; + this.connectToEnvironment('ConceptDescription'); + } }, methods: { diff --git a/aas-web-ui/src/components/AppNavigation/MainMenu.vue b/aas-web-ui/src/components/AppNavigation/MainMenu.vue index c1fbc1cb..9412c52e 100644 --- a/aas-web-ui/src/components/AppNavigation/MainMenu.vue +++ b/aas-web-ui/src/components/AppNavigation/MainMenu.vue @@ -1,18 +1,20 @@