1 import {ITreeNode} from "angular-tree-component/dist/defs/api";
2 import {AvailableNodeIcons} from "../../available-models-tree/available-models-tree.service";
3 import {ComponentInfoModel, ComponentInfoType} from "../../component-info/component-info-model";
4 import {ModelInformationItem} from "../../../../shared/components/model-information/model-information.component";
6 export interface ILevelNodeInfo {
7 /** Name of the key inside the serviceHierarchy object **/
10 /** Type of the object**/
13 /** Child name inside the of the serviceHierarchy object (if exist) **/
14 childNames?: string[];
16 /** model type name **/
19 componentInfoType? :ComponentInfoType;
21 /** is instance failed **/
24 /** number of failed **/
25 numberOfFailed?: number;
27 /***********************************************************
28 * return node position
29 * @param instance - instance
30 ************************************************************/
31 getNodePosition(instance, deepNodeName? : string) : number;
33 /***********************************************************
34 * return if user should provide instance name or not
35 * @param currentModel - The model of current object
36 * @param parentModel - The parent model of current object.
37 ************************************************************/
38 isEcompGeneratedNaming(currentModel, parentModel?): boolean;
41 /***********************
42 * update node position
43 ***********************/
44 updatePosition(node, that, instanceId, parentStoreKey?) : void;
46 /***********************************************************
47 * return object instance
48 * @param modelId - The model id
49 * @param serviceHierarchy - The serviceHierarchy store
50 * @param instance - existing instance details
51 ************************************************************/
52 getModel(modelId: string, instance: any, serviceHierarchy): any;
54 /***********************************************************
55 * return dynamic inputs of current model
56 * @param currentModel - The model of current object
57 ************************************************************/
58 updateDynamicInputsDataFromModel(currentModel): any;
60 /***********************************************************
61 * return tree node instance
62 * @param instance - The model of current object
63 * @param model - The model of current object
65 * @param storeKey - instance storeKey if exist (for duplicate)
66 * @param serviceModelId
67 ************************************************************/
68 createInstanceTreeNode(instance: any, model: any, parentModel: any, storeKey: string, serviceModelId: string): any
70 /***********************************************************
71 * return if instance has some missing data
72 * @param instance - The instance of current object
73 * @param dynamicInputs
74 * @param isEcompGeneratedNaming - boolean
75 ************************************************************/
76 hasMissingData(instance, dynamicInputs: any, isEcompGeneratedNaming: boolean): boolean;
78 /************************
79 * return object tooltip
80 ************************/
83 /************************
85 ************************/
88 /************************************
89 * return child model option object
90 ***********************************/
91 getNextLevelObject(type?:string): any;
93 /***********************************************************
95 * @param node - current ITrees node
96 * @param serviceModelId - service id
97 ************************************************************/
98 onClickAdd(node: ITreeNode, serviceModelId: string): void;
100 /***********************************************************
101 * get number of existing node instance
102 * @param node - current ITrees node
103 * @param serviceModelId - service id
104 ************************************************************/
105 getNodeCount(node: ITreeNode, serviceModelId: string): number;
107 /***********************************************************
108 * should show node icon
109 * @param node - current ITrees node
110 * @param serviceModelId - service id
111 ************************************************************/
112 showNodeIcons(node: ITreeNode, serviceModelId: string): AvailableNodeIcons;
114 /***********************************************************
115 * should return list of actions and there methods
116 * @param node - current ITrees node
117 * @param serviceModelId
118 ************************************************************/
119 getMenuAction(node: ITreeNode, serviceModelId: string): { [methodName: string]: { method: Function, visible: Function, enable: Function } };
121 /*******************************************************************************************
122 * should generate array of node information
123 * @param model - node model
124 * @param node - current ITrees node
125 *****************************************************************************************/
126 getInfo?(model, instance): ModelInformationItem[];