From eaaf8019188ad99ad2b76e43519c7dae9f4ac592 Mon Sep 17 00:00:00 2001 From: Arielk Date: Tue, 31 Jul 2018 12:59:36 +0300 Subject: Enhance operations to associate workflows Change-Id: Iacf74ee333a3bc2e76e764c28ae660322bc9e6e4 Issue-ID: SDC-1535 Signed-off-by: Arielk --- catalog-ui/src/app/models/operation.ts | 40 ++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 11 deletions(-) (limited to 'catalog-ui/src/app/models') diff --git a/catalog-ui/src/app/models/operation.ts b/catalog-ui/src/app/models/operation.ts index 55fcd82320..2a5298c3b0 100644 --- a/catalog-ui/src/app/models/operation.ts +++ b/catalog-ui/src/app/models/operation.ts @@ -1,27 +1,43 @@ 'use strict'; -export class OperationParam { - paramName: string = ''; - paramId: string = ''; +export class OperationParameter { + name: string; + type: string; + property: string; + mandatory: boolean; - constructor(param?: OperationParam) { + constructor(param?: OperationParameter) { if (param) { - this.paramId = param.paramId; - this.paramName = param.paramName; + this.name = param.name; + this.type = param.type; + this.property = param.property; + this.mandatory = param.mandatory; } } } export interface IOperationParamsList { - listToscaDataDefinition: Array; + listToscaDataDefinition: Array; } export class OperationModel { + operationType: string; description: string; + uniqueId: string; + inputParams: IOperationParamsList; - operationType: string; outputParams: IOperationParamsList; - uniqueId: string; + + workflowId: string; + workflowVersionId: string; + + protected OperationTypeEnum: Array = [ + 'Create', + 'Delete', + 'Instantiate', + 'Start', + 'Stop' + ]; constructor(operation?: any) { if (operation) { @@ -30,16 +46,18 @@ export class OperationModel { this.operationType = operation.operationType; this.outputParams = operation.outputParams; this.uniqueId = operation.uniqueId; + this.workflowId = operation.workflowId; + this.workflowVersionId = operation.workflowVersionId; } } - public createInputParamsList(inputParams: Array): void { + public createInputParamsList(inputParams: Array): void { this.inputParams = { listToscaDataDefinition: inputParams }; } - public createOutputParamsList(outputParams: Array): void { + public createOutputParamsList(outputParams: Array): void { this.outputParams = { listToscaDataDefinition: outputParams }; -- cgit 1.2.3-korg