diff options
Diffstat (limited to 'catalog-ui/src/app/models/operation.ts')
-rw-r--r-- | catalog-ui/src/app/models/operation.ts | 40 |
1 files changed, 29 insertions, 11 deletions
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<OperationParam>; + listToscaDataDefinition: Array<OperationParameter>; } export class OperationModel { + operationType: string; description: string; + uniqueId: string; + inputParams: IOperationParamsList; - operationType: string; outputParams: IOperationParamsList; - uniqueId: string; + + workflowId: string; + workflowVersionId: string; + + protected OperationTypeEnum: Array<String> = [ + '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<OperationParam>): void { + public createInputParamsList(inputParams: Array<OperationParameter>): void { this.inputParams = { listToscaDataDefinition: inputParams }; } - public createOutputParamsList(outputParams: Array<OperationParam>): void { + public createOutputParamsList(outputParams: Array<OperationParameter>): void { this.outputParams = { listToscaDataDefinition: outputParams }; |