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
|
import {ILevelNodeInfo} from "../basic.model.info";
import {DynamicInputsService} from "../../dynamicInputs.service";
import * as _ from 'lodash';
import {SharedTreeService} from "../../shared.tree.service";
import {ITreeNode} from "angular-tree-component/dist/defs/api";
import {AvailableNodeIcons} from "../../../available-models-tree/available-models-tree.service";
export class ConfigurationModelInfo implements ILevelNodeInfo{
constructor(private _dynamicInputsService : DynamicInputsService,
private _sharedTreeService : SharedTreeService){}
name: string = 'configurations';
type : string = 'Configuration';
typeName : string = 'C';
isEcompGeneratedNaming = () : boolean => true;
updateDynamicInputsDataFromModel = () : any => [];
getNextLevelObject = (): any => null;
getTooltip = () : string => 'Configuration';
getType = () : string => "Configuration";
/***********************************************************
* return configuration model
* @param configurationModelId - current Model id
* @param serviceHierarchy - serviceHierarchy
************************************************************/
getModel = (configurationModelId : string, serviceHierarchy) : any =>{
if(!_.isNil(serviceHierarchy)){
if(!_.isNil(serviceHierarchy[this.name]) && !_.isNil(serviceHierarchy[this.name][configurationModelId])){
return serviceHierarchy[this.name][configurationModelId];
}
}
return {};
};
createInstanceTreeNode(instance: any, model: any, storeKey: string): any {return null;}
childName: string;
childType: string;
/***********************************************************
* return if instance has missing data
* @param instance - vnf instance
* @param dynamicInputs
* @param isEcompGeneratedNaming
************************************************************/
hasMissingData(instance, dynamicInputs: any, isEcompGeneratedNaming: boolean): boolean {
return this._sharedTreeService.hasMissingData(instance, dynamicInputs, isEcompGeneratedNaming, []);
}
onClickAdd(node: ITreeNode, serviceModelId: string): void {
}
getNodeCount(node: ITreeNode, serviceModelId: string): number {
return 0;
}
/***********************************************************
* should show node icon
* @param node - current ITrees node
* @param serviceModelId - service id
************************************************************/
showNodeIcons(node: ITreeNode, serviceModelId: string): AvailableNodeIcons {
return null;
}
getMenuAction(node: ITreeNode, serviceModelId : string){
return {
}
}
updatePosition(that , node, instanceId): void {
// TODO
}
getNodePosition(instance): number {
return null;
}
onSelectedNode(node: ITreeNode): void {
}
}
|