diff options
author | Arielk <Ariel.Kenan@amdocs.com> | 2018-04-16 15:37:39 +0300 |
---|---|---|
committer | Avi Gaffa <avi.gaffa@amdocs.com> | 2018-05-01 03:38:57 +0000 |
commit | 802bd2af2e3c6ba92eb1ce0180a13b11018f6695 (patch) | |
tree | 0906a846aa2c3edc9f2067364ed812bdead9f939 /catalog-ui/src/app/models/operation.ts | |
parent | d0f6cb3ef9600846358a0e7f849759be6f9d917e (diff) |
Interface Operation tab and screens
Change-Id: If03234c783d6ce16fdd0945987ada83b6285f97f
Issue-ID: SDC-1060
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.ts | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/catalog-ui/src/app/models/operation.ts b/catalog-ui/src/app/models/operation.ts new file mode 100644 index 0000000000..55fcd82320 --- /dev/null +++ b/catalog-ui/src/app/models/operation.ts @@ -0,0 +1,51 @@ +'use strict'; + +export class OperationParam { + paramName: string = ''; + paramId: string = ''; + + constructor(param?: OperationParam) { + if (param) { + this.paramId = param.paramId; + this.paramName = param.paramName; + } + } +} + +export interface IOperationParamsList { + listToscaDataDefinition: Array<OperationParam>; +} + +export class OperationModel { + description: string; + inputParams: IOperationParamsList; + operationType: string; + outputParams: IOperationParamsList; + uniqueId: string; + + constructor(operation?: any) { + if (operation) { + this.description = operation.description; + this.inputParams = operation.inputParams; + this.operationType = operation.operationType; + this.outputParams = operation.outputParams; + this.uniqueId = operation.uniqueId; + } + } + + public createInputParamsList(inputParams: Array<OperationParam>): void { + this.inputParams = { + listToscaDataDefinition: inputParams + }; + } + + public createOutputParamsList(outputParams: Array<OperationParam>): void { + this.outputParams = { + listToscaDataDefinition: outputParams + }; + } +} + +export interface CreateOperationResponse extends OperationModel { + artifactUUID: string; +} |