1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
import {ITreeNode} from "angular-tree-component/dist/defs/api";
import {AvailableNodeIcons} from "../../available-models-tree/available-models-tree.service";
import {ComponentInfoType} from "../../component-info/component-info-model";
import {ModelInformationItem} from "../../../../shared/components/model-information/model-information.component";
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) **/
childNames?: string[];
/** model type name **/
typeName?: string;
componentInfoType? :ComponentInfoType;
/** 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 a NodeModel object instance
* @param instanceModel - The model of the instance (usually extracted from
* serviceHierarchy store)
************************************************************/
getModel(instanceModel: any): 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)
* @param serviceModelId
************************************************************/
createInstanceTreeNode(instance: any, model: any, parentModel: any, storeKey: string, serviceModelId: 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(type?:string): 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 } };
/*******************************************************************************************
* should generate array of node information
* @param model - node model
* @param node - current ITrees node
*****************************************************************************************/
getInfo?(model, instance): ModelInformationItem[];
}
|