blob: a409d2cd029f88a381c5db20be67ccf711517c4f [file] [log] [blame]
sebdet5f6c1782019-07-18 15:23:13 +02001export default class LoopComponentConverter {
2
3 static buildMapOfComponents(loopCache) {
4 var componentsMap = new Map([]);
5 if (typeof (loopCache.getMicroServicePolicies()) !== "undefined") {
xuegaob09e7df2019-07-23 14:13:06 +02006 loopCache.getMicroServicePolicies().forEach(ms => {
sebdet5f6c1782019-07-18 15:23:13 +02007 componentsMap.set(ms.name, "/configurationPolicyModal/"+ms.name);
8 })
9 }
10 if (typeof (loopCache.getOperationalPolicies()) !== "undefined") {
xuegaob09e7df2019-07-23 14:13:06 +020011 loopCache.getOperationalPolicies().forEach(op => {
sebdet5f6c1782019-07-18 15:23:13 +020012 componentsMap.set(op.name, "/operationalPolicyModal");
13 })
14 }
15 componentsMap.set("OperationalPolicy","/operationalPolicyModal");
16 return componentsMap;
17 }
xuegaob09e7df2019-07-23 14:13:06 +020018}