diff options
author | 2019-01-13 18:31:13 +0200 | |
---|---|---|
committer | 2019-01-14 11:10:24 +0000 | |
commit | 86a37526357337a9143c1f5e27c0976e68b15d1d (patch) | |
tree | 7d531c531d0ef73d4c8c6c8f84c6eaeb18854bdb /catalog-ui/src/app/ng2/services/workflow.service.ts | |
parent | 5b9d9a134778d4dc7bf45474ba13be6ba0c46282 (diff) |
Interface operation screen enhancements
Change-Id: I2b510a4bf27ddf5730ed044cf77aebd955ad5862
Issue-ID: SDC-2044
Signed-off-by: Arielk <Ariel.Kenan@amdocs.com>
Diffstat (limited to 'catalog-ui/src/app/ng2/services/workflow.service.ts')
-rw-r--r-- | catalog-ui/src/app/ng2/services/workflow.service.ts | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/catalog-ui/src/app/ng2/services/workflow.service.ts b/catalog-ui/src/app/ng2/services/workflow.service.ts index 1fc5c7843b..36d56d6fa7 100644 --- a/catalog-ui/src/app/ng2/services/workflow.service.ts +++ b/catalog-ui/src/app/ng2/services/workflow.service.ts @@ -3,7 +3,17 @@ import { Response } from "@angular/http"; import { Observable } from "rxjs/Observable"; import { HttpService } from "./http.service"; import { SdcConfigToken, ISdcConfig } from "../config/sdc-config.config"; -import { Component } from "app/models"; +import { Component, CreateOperationResponse } from "app/models"; + +interface WorkflowOutputParameter { + name: string, + type: string, + mandatory: boolean +} + +interface WorkflowInputParameter extends WorkflowOutputParameter { + property: string; +} @Injectable() export class WorkflowServiceNg2 { @@ -20,9 +30,9 @@ export class WorkflowServiceNg2 { this.catalogBaseUrl = sdcConfig.api.POST_workflow_artifact; } - public associateWorkflowArtifact(component: Component, operationId: string, workflowId: string, workflowVersionId: string, artifactUuid: string): Observable<any> { - return this.http.post(this.baseUrl + '/workflows/' + workflowId + '/versions/' + workflowVersionId + '/artifact-deliveries', { - endpoint: this.catalogBaseUrl + '/' + component.getTypeUrl() + component.uuid + '/interfaces/' + operationId + '/artifacts/' + artifactUuid, + public associateWorkflowArtifact(component: Component, operation: CreateOperationResponse): Observable<any> { + return this.http.post(this.baseUrl + '/workflows/' + operation.workflowId + '/versions/' + operation.workflowVersionId + '/artifact-deliveries', { + endpoint: this.catalogBaseUrl + '/' + component.getTypeUrl() + component.uuid + '/interfaces/' + operation.interfaceId + '/operations/' + operation.uniqueId + '/artifacts/' + operation.artifactUUID, method: 'POST' }) .map((res:Response) => { @@ -40,7 +50,7 @@ export class WorkflowServiceNg2 { public getWorkflowVersions(workflowId: string, filterCertified: boolean = true): Observable<any> { return this.http.get(this.baseUrl + '/workflows/' + workflowId + '/versions' + (filterCertified ? '?state=' + this.VERSION_STATE_CERTIFIED : '')) .map((res:Response) => { - return res.json().items; + return _.map(res.json().items, version => version); }); } |