summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/models/operation.ts
diff options
context:
space:
mode:
authorArielk <Ariel.Kenan@amdocs.com>2018-07-31 12:59:36 +0300
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-08-02 08:56:34 +0000
commiteaaf8019188ad99ad2b76e43519c7dae9f4ac592 (patch)
tree3f42e4ea4bee6c2735395f61bb9f6f1623f64570 /catalog-ui/src/app/models/operation.ts
parentdecd2dff3b5b8aff53be52c825e45186d5c16e99 (diff)
Enhance operations to associate workflows
Change-Id: Iacf74ee333a3bc2e76e764c28ae660322bc9e6e4 Issue-ID: SDC-1535 Signed-off-by: Arielk <Ariel.Kenan@amdocs.com>
Diffstat (limited to 'catalog-ui/src/app/models/operation.ts')
-rw-r--r--catalog-ui/src/app/models/operation.ts40
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
};