@eclipse-slm/ui 1.5.0-snapshot.1046 → 1.5.0-snapshot.1071

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -55,7 +55,6 @@ ui
55
55
  │   │   └── vuetify-material
56
56
  │   │   └── _sidebar.sass
57
57
  │   ├── stores
58
- │   └── catalogStore.ts
59
58
  │   └── jobsStore.ts
60
59
  │   └── notificationStore.ts
61
60
  │   └── providerStore.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-slm/ui",
3
- "version": "1.5.0-snapshot.1046",
3
+ "version": "1.5.0-snapshot.1071",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -145,7 +145,6 @@ import {serviceOptionMixin} from '@/utils/serviceOptionUtil'
145
145
  import {Field} from "vee-validate";
146
146
  import {useServiceOfferingsStore} from "@/stores/serviceOfferingsStore";
147
147
  import {useResourceDevicesStore} from "@/stores/resourceDevicesStore";
148
- import {useCatalogStore} from "@/stores/catalogStore";
149
148
  import ResourceManagementClient from "@/api/resource-management/resource-management-client";
150
149
  import logRequestError from "@/api/restApiHelper";
151
150
 
@@ -172,11 +171,11 @@ export default {
172
171
  setup(){
173
172
  const serviceOfferingsStore = useServiceOfferingsStore();
174
173
  const resourceDevicesStore = useResourceDevicesStore();
175
- const catalogStore = useCatalogStore();
176
- return {serviceOfferingsStore, resourceDevicesStore, catalogStore};
174
+ return {serviceOfferingsStore, resourceDevicesStore};
177
175
  },
178
176
  data () {
179
177
  return {
178
+ aasSubmodelTemplates: [],
180
179
  aasSubmodelTemplateInstances: [],
181
180
  }
182
181
  },
@@ -187,11 +186,15 @@ export default {
187
186
  serviceManagementDeploymentVariables () {
188
187
  return this.serviceOfferingsStore.serviceManagementDeploymentVariables
189
188
  },
190
- aasSubmodelTemplates () {
191
- return this.catalogStore.aasSubmodelTemplates
192
- },
193
189
  },
194
190
  created() {
191
+ if (this.serviceOption.valueType === 'AAS_SM_TEMPLATE' && this.definitionMode) {
192
+ // Known submodel templates are configured in the Resource Management (slm.aas.submodel-templates), the list may be empty
193
+ ResourceManagementClient.submodelTemplatesRestControllerApi.getSubmodelTemplates()
194
+ .then(response => {
195
+ this.aasSubmodelTemplates = response.data ?? [];
196
+ }).catch(logRequestError)
197
+ }
195
198
  if (this.serviceOption.valueType === 'AAS_SM_TEMPLATE' && !this.definitionMode) {
196
199
  ResourceManagementClient.submodelTemplatesRestControllerApi.getSubmodelTemplateInstancesBySemanticId(this.serviceOption.defautlValue)
197
200
  .then(response => {
@@ -28,7 +28,6 @@ printf "%-38s %s\n" "PLATFORM_MANAGEMENT_URL:" "$PLATFORM_MANAGEMENT_URL"
28
28
  printf "%-38s %s\n" "RESOURCE_MANAGEMENT_URL:" "$RESOURCE_MANAGEMENT_URL"
29
29
  printf "%-38s %s\n" "SERVICE_MANAGEMENT_URL:" "$SERVICE_MANAGEMENT_URL"
30
30
  printf "%-38s %s\n" "ANSIBLE_SERVICE_URL:" "$ANSIBLE_SERVICE_URL"
31
- printf "%-38s %s\n" "CATALOG_SERVICE_URL:" "$CATALOG_SERVICE_URL"
32
31
  printf "%-38s %s\n" "KEYCLOAK_URL:" "$KEYCLOAK_URL"
33
32
  printf "%-38s %s\n" "KEYCLOAK_REALM:" "$KEYCLOAK_REALM"
34
33
  printf "%-38s %s\n" "KEYCLOAK_CLIENT_ID:" "$KEYCLOAK_CLIENT_ID"
@@ -44,7 +43,6 @@ find /usr/share/nginx/html -type f \( -name '*.js' -o -name '*.html' -o -name '*
44
43
  -e "s|/__ENV_RESOURCE_MANAGEMENT_URL__PLACEHOLDER__/|$RESOURCE_MANAGEMENT_URL|g" \
45
44
  -e "s|/__ENV_SERVICE_MANAGEMENT_URL__PLACEHOLDER__/|$SERVICE_MANAGEMENT_URL|g" \
46
45
  -e "s|/__ENV_ANSIBLE_SERVICE_URL__PLACEHOLDER__/|$ANSIBLE_SERVICE_URL|g" \
47
- -e "s|/__ENV_CATALOG_SERVICE_URL__PLACEHOLDER__/|$CATALOG_SERVICE_URL|g" \
48
46
  -e "s|/__ENV_KEYCLOAK_URL__PLACEHOLDER__/|$KEYCLOAK_URL|g" \
49
47
  -e "s|/__ENV_KEYCLOAK_REALM__PLACEHOLDER__/|$KEYCLOAK_REALM|g" \
50
48
  -e "s|/__ENV_KEYCLOAK_CLIENT_ID__PLACEHOLDER__/|$KEYCLOAK_CLIENT_ID|g" \
package/src/main.ts CHANGED
@@ -23,7 +23,6 @@ import camelCase from 'lodash/camelCase';
23
23
  import NoItemAvailableNote from "@/components/base/NoItemAvailableNote.vue";
24
24
  import {createPinia} from 'pinia';
25
25
  import {useUserStore} from "@/stores/userStore";
26
- import {useCatalogStore} from "@/stores/catalogStore";
27
26
  import {useServiceOfferingsStore} from "@/stores/serviceOfferingsStore";
28
27
  import {useServiceInstancesStore} from "@/stores/serviceInstancesStore";
29
28
  import {useProviderStore} from "@/stores/providerStore";
@@ -85,7 +84,6 @@ app.use(VueKeycloakJs, {
85
84
 
86
85
  // Update stores
87
86
  const userStore = useUserStore();
88
- const catalogStore = useCatalogStore();
89
87
  const serviceOfferingsStore = useServiceOfferingsStore();
90
88
  const serviceInstancesStore = useServiceInstancesStore();
91
89
  const providerStore = useProviderStore();
@@ -98,7 +96,6 @@ app.use(VueKeycloakJs, {
98
96
 
99
97
  Promise.all([
100
98
  userStore.updateStore(),
101
- catalogStore.updateStore(),
102
99
  serviceOfferingsStore.updateStore(),
103
100
  serviceInstancesStore.updateStore(),
104
101
  providerStore.updateStore(),
@@ -15,7 +15,6 @@ export const useEnvStore = defineStore('envStore', () => {
15
15
  const _resourceManagementUrl = ref(import.meta.env.VITE_APP_RESOURCE_MANAGEMENT_URL || (isProduction ? '/__ENV_RESOURCE_MANAGEMENT_URL__PLACEHOLDER__/' : ''));
16
16
  const _serviceManagementUrl = ref(import.meta.env.VITE_APP_SERVICE_MANAGEMENT_URL || (isProduction ? '/__ENV_SERVICE_MANAGEMENT_URL__PLACEHOLDER__/' : ''));
17
17
  const _ansibleServiceUrl = ref(import.meta.env.VITE_APP_ANSIBLE_SERVICE_URL || (isProduction ? '/__ENV_ANSIBLE_SERVICE_URL__PLACEHOLDER__/' : ''));
18
- const _catalogServiceUrl = ref(import.meta.env.VITE_APP_CATALOG_SERVICE_URL || (isProduction ? '/__ENV_CATALOG_SERVICE_URL__PLACEHOLDER__/' : ''));
19
18
 
20
19
  const _keycloakUrl = ref(import.meta.env.VITE_APP_KEYCLOAK_URL || (isProduction ? '/__ENV_KEYCLOAK_URL__PLACEHOLDER__/' : ''));
21
20
  const _keycloakRealm = ref(import.meta.env.VITE_APP_KEYCLOAK_REALM || (isProduction ? '/__ENV_KEYCLOAK_REALM__PLACEHOLDER__/' : ''));
@@ -35,7 +34,6 @@ export const useEnvStore = defineStore('envStore', () => {
35
34
  const resourceManagementUrl = computed(() => _resourceManagementUrl.value);
36
35
  const serviceManagementUrl = computed(() => _serviceManagementUrl.value);
37
36
  const ansibleServiceUrl = computed(() => _ansibleServiceUrl.value);
38
- const catalogServiceUrl = computed(() => _catalogServiceUrl.value);
39
37
 
40
38
  const keycloakUrl = computed(() => _keycloakUrl.value);
41
39
  const keycloakRealm = computed(() => _keycloakRealm.value);
@@ -52,7 +50,6 @@ export const useEnvStore = defineStore('envStore', () => {
52
50
  resourceManagementUrl,
53
51
  serviceManagementUrl,
54
52
  ansibleServiceUrl,
55
- catalogServiceUrl,
56
53
  keycloakUrl,
57
54
  keycloakRealm,
58
55
  keycloakClientId,
@@ -1,17 +0,0 @@
1
- import axios from 'axios';
2
- import logRequestError from '@/api/restApiHelper.js';
3
-
4
- class CatalogRestApi {
5
- API_URL = '/slm-catalog/catalog';
6
-
7
- async getAASSubmodelTemplates () {
8
- return axios
9
- .get(this.API_URL + '/aas/submodels/templates')
10
- .then(response => {
11
- return response.data;
12
- })
13
- .catch(logRequestError);
14
- }
15
- }
16
-
17
- export default new CatalogRestApi();
@@ -1,50 +0,0 @@
1
- import ApiState from '@/api/apiState.js'
2
- import CatalogRestApi from "@/api/catalog/catalogRestApi";
3
- import {defineStore} from 'pinia'
4
-
5
- interface CatalogStoreState{
6
- apiState: number,
7
- aasSubmodelTemplates: [],
8
- }
9
-
10
-
11
- export const useCatalogStore = defineStore('catalogStore', {
12
- persist: true,
13
-
14
- state: (): CatalogStoreState => ({
15
- apiState: ApiState.INIT,
16
- aasSubmodelTemplates: []
17
- }),
18
-
19
- getters:{
20
- },
21
-
22
- actions: {
23
- async getSubmodelTemplates () {
24
- await CatalogRestApi.getAASSubmodelTemplates()
25
- .then(
26
- receivedAasSubmodelTemplates => {
27
- this.aasSubmodelTemplates = receivedAasSubmodelTemplates;
28
- })
29
- },
30
-
31
- async updateStore () {
32
- if (this.apiState === ApiState.INIT) {
33
- this.apiState = ApiState.LOADING;
34
- } else {
35
- this.apiState = ApiState.UPDATING;
36
- }
37
-
38
- return Promise.all([
39
- this.getSubmodelTemplates(),
40
- ]).then(() => {
41
- this.apiState = ApiState.LOADED;
42
- console.log("catalogStore updated")
43
- }).catch((e) => {
44
- this.apiState = ApiState.ERROR;
45
- console.log("Failed to update catalogStore: ", e)
46
- });
47
- },
48
- }
49
-
50
- });