diff options
author | Ittay Stern <ittay.stern@att.com> | 2018-08-29 17:01:32 +0300 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-02-18 18:35:30 +0200 |
commit | 6f900cc45d7dd7f97430812b86b5c1d1693c8ae3 (patch) | |
tree | 936005c364dc5a7264d6304d4777c3d83494db22 /vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/configuration/configuration.model.info.ts | |
parent | 67d99f816cc583643c35193197594cf78d8ce60a (diff) |
merge from ecomp a88f0072 - Modern UI
Issue-ID: VID-378
Change-Id: Ibcb23dd27f550cf32ce2fe0239f0f496ae014ff6
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/configuration/configuration.model.info.ts')
-rw-r--r-- | vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/configuration/configuration.model.info.ts | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/configuration/configuration.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/configuration/configuration.model.info.ts new file mode 100644 index 000000000..dd85ea110 --- /dev/null +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/configuration/configuration.model.info.ts @@ -0,0 +1,87 @@ +import {ILevelNodeInfo} from "../basic.model.info"; +import {DynamicInputsService} from "../../dynamicInputs.service"; +import * as _ from 'lodash'; +import {SharedTreeService} from "../../shared.tree.service"; +import {ITreeNode} from "angular-tree-component/dist/defs/api"; +import {AvailableNodeIcons} from "../../../available-models-tree/available-models-tree.service"; + +export class ConfigurationModelInfo implements ILevelNodeInfo{ + constructor(private _dynamicInputsService : DynamicInputsService, + private _sharedTreeService : SharedTreeService){} + name: string = 'configurations'; + type : string = 'Configuration'; + typeName : string = 'C'; + + isEcompGeneratedNaming = () : boolean => true; + + updateDynamicInputsDataFromModel = () : any => []; + + getNextLevelObject = (): any => null; + + getTooltip = () : string => 'Configuration'; + + getType = () : string => "Configuration"; + + /*********************************************************** + * return configuration model + * @param configurationModelId - current Model id + * @param serviceHierarchy - serviceHierarchy + ************************************************************/ + getModel = (configurationModelId : string, serviceHierarchy) : any =>{ + if(!_.isNil(serviceHierarchy)){ + if(!_.isNil(serviceHierarchy[this.name]) && !_.isNil(serviceHierarchy[this.name][configurationModelId])){ + return serviceHierarchy[this.name][configurationModelId]; + } + } + return {}; + }; + + createInstanceTreeNode(instance: any, model: any, storeKey: string): any {return null;} + + childName: string; + childType: string; + + /*********************************************************** + * return if instance has missing data + * @param instance - vnf instance + * @param dynamicInputs + * @param isEcompGeneratedNaming + ************************************************************/ + hasMissingData(instance, dynamicInputs: any, isEcompGeneratedNaming: boolean): boolean { + return this._sharedTreeService.hasMissingData(instance, dynamicInputs, isEcompGeneratedNaming, []); + } + + onClickAdd(node: ITreeNode, serviceModelId: string): void { + } + + getNodeCount(node: ITreeNode, serviceModelId: string): number { + return 0; + } + + /*********************************************************** + * should show node icon + * @param node - current ITrees node + * @param serviceModelId - service id + ************************************************************/ + showNodeIcons(node: ITreeNode, serviceModelId: string): AvailableNodeIcons { + return null; + } + + getMenuAction(node: ITreeNode, serviceModelId : string){ + return { + + } + } + + updatePosition(that , node, instanceId): void { + // TODO + } + + getNodePosition(instance): number { + return null; + } + + onSelectedNode(node: ITreeNode): void { + } + +} |