summaryrefslogtreecommitdiffstats
path: root/ui-react/src/components/loop_viewer/svg/LoopComponentConverter.js
blob: a409d2cd029f88a381c5db20be67ccf711517c4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
export default class LoopComponentConverter {

	static buildMapOfComponents(loopCache) {
		var componentsMap = new Map([]);
		if (typeof (loopCache.getMicroServicePolicies()) !== "undefined") {
			loopCache.getMicroServicePolicies().forEach(ms => {
				componentsMap.set(ms.name, "/configurationPolicyModal/"+ms.name);
			})
		}
		if (typeof (loopCache.getOperationalPolicies()) !== "undefined") {
			loopCache.getOperationalPolicies().forEach(op => {
				componentsMap.set(op.name, "/operationalPolicyModal");
			})
		}
		componentsMap.set("OperationalPolicy","/operationalPolicyModal");
		return componentsMap;
	}
}