Fix create list input api call failure 77/114577/2
authorSatoshi Fujii <fujii-satoshi@jp.fujitsu.com>
Wed, 4 Nov 2020 07:14:41 +0000 (07:14 +0000)
committerS�bastien Determe <sebastien.determe@intl.att.com>
Thu, 5 Nov 2020 08:51:47 +0000 (08:51 +0000)
Changed to use proper resource type in url on create list input
api call to avoid component type mismatch error.

Issue-ID: SDC-3336
Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com>
Change-Id: I31f4c6641df9fc067797c4a88d43789df0cf367e

catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts
catalog-ui/src/app/ng2/services/component-services/topology-template.service.ts

index 9fb1a92..83174fa 100644 (file)
@@ -605,7 +605,7 @@ export class PropertiesAssignmentComponent {
                         console.log("save button clicked. input=", input);
 
                         this.topologyTemplateService
-                        .createListInput(this.component.uniqueId, input, this.isSelf())
+                        .createListInput(this.component, input, this.isSelf())
                         .subscribe(response => {
                             this.setInputTabIndication(response.length);
                             this.checkedPropertiesCount = 0;
index 1933b3d..175069e 100644 (file)
@@ -421,7 +421,7 @@ export class TopologyTemplateService {
         return this.http.put<PolicyInstance>(this.baseUrl + component.getTypeUrl() + component.uniqueId + '/policies/' + policy.uniqueId + '/undeclare', policy)
     }
 
-    createListInput(componentId: string, input: any, isSelf: boolean): Observable<any> {
+    createListInput(component: Component, input: any, isSelf: boolean): Observable<any> {
         let inputs: any;
         if (isSelf) {
             // change componentInstanceProperties -> serviceProperties
@@ -434,7 +434,7 @@ export class TopologyTemplateService {
         } else {
             inputs = input;
         }
-        return this.http.post<any>(this.baseUrl + 'services/' + componentId + '/create/listInput', inputs);
+        return this.http.post<any>(this.baseUrl + component.getTypeUrl() + component.uniqueId + '/create/listInput', inputs);
     }
 
     createPolicy(component: Component, policiesToCreate: InstancePropertiesAPIMap, isSelf: boolean): Observable<any> {