summaryrefslogtreecommitdiffstats
path: root/catalog-ui
diff options
context:
space:
mode:
authordavsad <david.sadlier@est.tech>2021-08-26 10:52:12 +0100
committerMichael Morris <michael.morris@est.tech>2021-09-10 13:21:16 +0000
commit009d2b3cfe2d27abd79f47aa076849786327654a (patch)
tree10ed6a7c1adca03f4453f73ae22c7529c58de452 /catalog-ui
parentdd69d6a46433c252128df82d0c9aff5dbd5fafec (diff)
Fail VF download of csar when VF has operation defined with workflow.
Issue-ID: SDC-3689 Signed-off-by: davsad <david.sadlier@est.tech> Change-Id: I207a95e86def05011feaa87847844e6b93b74c5e
Diffstat (limited to 'catalog-ui')
-rw-r--r--catalog-ui/src/app/ng2/services/component-services/component.service.ts9
1 files changed, 3 insertions, 6 deletions
diff --git a/catalog-ui/src/app/ng2/services/component-services/component.service.ts b/catalog-ui/src/app/ng2/services/component-services/component.service.ts
index 5d7b37f0fa..8f23f78c9d 100644
--- a/catalog-ui/src/app/ng2/services/component-services/component.service.ts
+++ b/catalog-ui/src/app/ng2/services/component-services/component.service.ts
@@ -44,6 +44,7 @@ import { ConstraintObject } from "../../components/logic/service-dependencies/se
import { Requirement } from "../../../models/requirement";
import { Capability } from "../../../models/capability";
import { OutputBEModel } from "app/models/attributes-outputs/output-be-model";
+import { HttpHelperService } from '../http-hepler.service';
/*
PLEASE DO NOT USE THIS SERVICE IN ANGULAR2! Use the topology-template.service instead
@@ -235,14 +236,10 @@ export class ComponentServiceNg2 {
payloadData: oldOperation.artifactData
};
-
- JSON.stringify(payload);
- const payloadString = JSON.stringify(payload, null, ' ');
- const md5Result = md5(payloadString).toLowerCase();
- const headers = new HttpHeaders().append('Content-MD5', btoa(md5Result));
+ const headers = new HttpHeaders().append('Content-MD5', HttpHelperService.getHeaderMd5(payload));
return this.http.post(this.baseUrl + component.getTypeUrl() + component.uuid + '/interfaces/' + newOperation.interfaceId + '/operations/' + newOperation.uniqueId + '/artifacts/' + newOperation.implementation.artifactUUID,
- payload, {headers}
+ payload, {headers: headers}
).map((res: any) => {
const fileName = res.artifactDisplayName || res.artifactName;
newOperation.artifactFileName = fileName;