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/basic.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/basic.model.info.ts')
-rw-r--r-- | vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/basic.model.info.ts | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/basic.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/basic.model.info.ts new file mode 100644 index 000000000..51b6cfacb --- /dev/null +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/basic.model.info.ts @@ -0,0 +1,121 @@ +import {ITreeNode} from "angular-tree-component/dist/defs/api"; +import {AvailableNodeIcons} from "../../available-models-tree/available-models-tree.service"; + +export interface ILevelNodeInfo { + /** Name of the key inside the serviceHierarchy object **/ + name: string; + + /** Type of the object**/ + type: string; + + /** Child name inside the of the serviceHierarchy object (if exist) **/ + childName?: string; + + /** Child type the of object (if exist) **/ + childType?: string; + + /** model type name **/ + typeName?: string; + + /** is instance failed **/ + isFailed?: boolean; + + /** number of failed **/ + numberOfFailed?: number; + + /*********************************************************** + * return node position + * @param instance - instance + ************************************************************/ + getNodePosition(instance, deepNodeName? : string) : number; + + /*********************************************************** + * return if user should provide instance name or not + * @param currentModel - The model of current object + * @param parentModel - The parent model of current object. + ************************************************************/ + isEcompGeneratedNaming(currentModel, parentModel?): boolean; + + + /*********************** + * update node position + ***********************/ + updatePosition(node, that, instanceId, parentStoreKey?) : void; + + /*********************************************************** + * return object instance + * @param modelId - The model id + * @param serviceHierarchy - The serviceHierarchy store + * @param instance - existing instance details + ************************************************************/ + getModel(modelId: string, instance: any, serviceHierarchy): any; + + /*********************************************************** + * return dynamic inputs of current model + * @param currentModel - The model of current object + ************************************************************/ + updateDynamicInputsDataFromModel(currentModel): any; + + /*********************************************************** + * return tree node instance + * @param instance - The model of current object + * @param model - The model of current object + * @param parentModel + * @param storeKey - instance storeKey if exist (for duplicate) + ************************************************************/ + createInstanceTreeNode(instance: any, model: any, parentModel: any, storeKey: string): any + + /*********************************************************** + * return if instance has some missing data + * @param instance - The instance of current object + * @param dynamicInputs + * @param isEcompGeneratedNaming - boolean + ************************************************************/ + hasMissingData(instance, dynamicInputs: any, isEcompGeneratedNaming: boolean): boolean; + + /************************ + * return object tooltip + ************************/ + getTooltip(): string; + + /************************ + * return object type + ************************/ + getType(): string; + + /************************************ + * return child model option object + ***********************************/ + getNextLevelObject(): any; + + /*********************************************************** + * open popup + * @param node - current ITrees node + * @param serviceModelId - service id + ************************************************************/ + onClickAdd(node: ITreeNode, serviceModelId: string): void; + + /*********************************************************** + * get number of existing node instance + * @param node - current ITrees node + * @param serviceModelId - service id + ************************************************************/ + getNodeCount(node: ITreeNode, serviceModelId: string): number; + + /*********************************************************** + * should show node icon + * @param node - current ITrees node + * @param serviceModelId - service id + ************************************************************/ + showNodeIcons(node: ITreeNode, serviceModelId: string): AvailableNodeIcons; + + /*********************************************************** + * should return list of actions and there methods + * @param node - current ITrees node + * @param serviceModelId + ************************************************************/ + getMenuAction(node: ITreeNode, serviceModelId: string): { [methodName: string]: { method: Function, visible: Function, enable: Function } }; + + + onSelectedNode(node : ITreeNode): void +} |