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

	static buildMapOfComponents(loopCache) {
		var componentsMap = new Map([]);
		if (typeof (loopCache.getMicroServicePolicies()) !== "undefined") {
			loopCache.getMicroServicePolicies().forEach(ms => {
				componentsMap.set(ms.name, "/policyModal/MICRO-SERVICE-POLICY/"+ms.name);
			})
		}
		if (typeof (loopCache.getOperationalPolicies()) !== "undefined") {
			loopCache.getOperationalPolicies().forEach(op => {
				componentsMap.set(op.name, "/policyModal/OPERATIONAL-POLICY/"+op.name);
			})
		}
		return componentsMap;
	}
}