summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/services
diff options
context:
space:
mode:
authorfranciscovila <javier.paradela.vila@est.tech>2022-09-15 14:20:35 +0100
committerMichael Morris <michael.morris@est.tech>2022-09-16 08:41:58 +0000
commit70c17bb345b6ed957290eec776c026d3a25f48a1 (patch)
tree17773429de2c965a275ff53aa6938837206d0146 /catalog-ui/src/app/ng2/services
parent38d98f8852f3e1e15300946aef95c65d3fca70b4 (diff)
Fix types not refreshing after model change
Loads the capability, requirement and node types based on the current VFC model. Removes the frontend cache that was being hold by the ReqAndCapabilitiesService. Issue-ID: SDC-4175 Signed-off-by: franciscovila <javier.paradela.vila@est.tech> Change-Id: I6ab9d1781c6d65e0d78ff69baf468fb9d24f9afd
Diffstat (limited to 'catalog-ui/src/app/ng2/services')
-rw-r--r--catalog-ui/src/app/ng2/services/tosca-types.service.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/catalog-ui/src/app/ng2/services/tosca-types.service.ts b/catalog-ui/src/app/ng2/services/tosca-types.service.ts
index fc728111bd..151e975f23 100644
--- a/catalog-ui/src/app/ng2/services/tosca-types.service.ts
+++ b/catalog-ui/src/app/ng2/services/tosca-types.service.ts
@@ -46,7 +46,10 @@ export class ToscaTypesServiceNg2 {
return this.http.get<RelationshipTypesMap>(this.baseUrl + 'relationshipTypes').toPromise();
}
- async fetchNodeTypes(): Promise<NodeTypesMap> {
+ async fetchNodeTypes(modelName: string): Promise<NodeTypesMap> {
+ if(modelName) {
+ return this.http.get<NodeTypesMap>(this.baseUrl + 'nodeTypes', {params: {model: modelName}}).toPromise();
+ }
return this.http.get<NodeTypesMap>(this.baseUrl + 'nodeTypes').toPromise();
}