diff options
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 +} |