1 import {ITreeNode} from "angular-tree-component/dist/defs/api";
2 import {AvailableNodeIcons} from "../../available-models-tree/available-models-tree.service";
4 export interface ILevelNodeInfo {
5 /** Name of the key inside the serviceHierarchy object **/
8 /** Type of the object**/
11 /** Child name inside the of the serviceHierarchy object (if exist) **/
14 /** Child type the of object (if exist) **/
17 /** model type name **/
20 /** is instance failed **/
23 /** number of failed **/
24 numberOfFailed?: number;
26 /***********************************************************
27 * return node position
28 * @param instance - instance
29 ************************************************************/
30 getNodePosition(instance, deepNodeName? : string) : number;
32 /***********************************************************
33 * return if user should provide instance name or not
34 * @param currentModel - The model of current object
35 * @param parentModel - The parent model of current object.
36 ************************************************************/
37 isEcompGeneratedNaming(currentModel, parentModel?): boolean;
40 /***********************
41 * update node position
42 ***********************/
43 updatePosition(node, that, instanceId, parentStoreKey?) : void;
45 /***********************************************************
46 * return object instance
47 * @param modelId - The model id
48 * @param serviceHierarchy - The serviceHierarchy store
49 * @param instance - existing instance details
50 ************************************************************/
51 getModel(modelId: string, instance: any, serviceHierarchy): any;
53 /***********************************************************
54 * return dynamic inputs of current model
55 * @param currentModel - The model of current object
56 ************************************************************/
57 updateDynamicInputsDataFromModel(currentModel): any;
59 /***********************************************************
60 * return tree node instance
61 * @param instance - The model of current object
62 * @param model - The model of current object
64 * @param storeKey - instance storeKey if exist (for duplicate)
65 ************************************************************/
66 createInstanceTreeNode(instance: any, model: any, parentModel: any, storeKey: string): any
68 /***********************************************************
69 * return if instance has some missing data
70 * @param instance - The instance of current object
71 * @param dynamicInputs
72 * @param isEcompGeneratedNaming - boolean
73 ************************************************************/
74 hasMissingData(instance, dynamicInputs: any, isEcompGeneratedNaming: boolean): boolean;
76 /************************
77 * return object tooltip
78 ************************/
81 /************************
83 ************************/
86 /************************************
87 * return child model option object
88 ***********************************/
89 getNextLevelObject(): any;
91 /***********************************************************
93 * @param node - current ITrees node
94 * @param serviceModelId - service id
95 ************************************************************/
96 onClickAdd(node: ITreeNode, serviceModelId: string): void;
98 /***********************************************************
99 * get number of existing node instance
100 * @param node - current ITrees node
101 * @param serviceModelId - service id
102 ************************************************************/
103 getNodeCount(node: ITreeNode, serviceModelId: string): number;
105 /***********************************************************
106 * should show node icon
107 * @param node - current ITrees node
108 * @param serviceModelId - service id
109 ************************************************************/
110 showNodeIcons(node: ITreeNode, serviceModelId: string): AvailableNodeIcons;
112 /***********************************************************
113 * should return list of actions and there methods
114 * @param node - current ITrees node
115 * @param serviceModelId
116 ************************************************************/
117 getMenuAction(node: ITreeNode, serviceModelId: string): { [methodName: string]: { method: Function, visible: Function, enable: Function } };
120 onSelectedNode(node : ITreeNode): void