aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSatoshi Fujii <fujii-satoshi@jp.fujitsu.com>2020-11-04 07:14:41 +0000
committerVasyl Razinkov <vasyl.razinkov@est.tech>2020-11-05 11:56:30 +0000
commitaea73f8112b81f95939f9a15dfb3b8ee72852b24 (patch)
treed79409a503ab7f3345ff38db23d478f6b48d28e5
parent6e06402ed0851e578e4ac03d90c602064003567f (diff)
Fix create list input api call failure
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 (cherry picked from commit 92828f955f7c2a6d35c6969f57ffef32a691b59d)
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts2
-rw-r--r--catalog-ui/src/app/ng2/services/component-services/topology-template.service.ts4
2 files changed, 3 insertions, 3 deletions
diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts
index 9fb1a928fe..83174fa87a 100644
--- a/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts
+++ b/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts
@@ -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;
diff --git a/catalog-ui/src/app/ng2/services/component-services/topology-template.service.ts b/catalog-ui/src/app/ng2/services/component-services/topology-template.service.ts
index 1933b3dba8..175069e9a2 100644
--- a/catalog-ui/src/app/ng2/services/component-services/topology-template.service.ts
+++ b/catalog-ui/src/app/ng2/services/component-services/topology-template.service.ts
@@ -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> {