sebdet | 5f6c178 | 2019-07-18 15:23:13 +0200 | [diff] [blame] | 1 | export default class LoopComponentConverter { |
| 2 | |
| 3 | static buildMapOfComponents(loopCache) { |
| 4 | var componentsMap = new Map([]); |
| 5 | if (typeof (loopCache.getMicroServicePolicies()) !== "undefined") { |
xuegao | b09e7df | 2019-07-23 14:13:06 +0200 | [diff] [blame] | 6 | loopCache.getMicroServicePolicies().forEach(ms => { |
sebdet | 5f6c178 | 2019-07-18 15:23:13 +0200 | [diff] [blame] | 7 | componentsMap.set(ms.name, "/configurationPolicyModal/"+ms.name); |
| 8 | }) |
| 9 | } |
| 10 | if (typeof (loopCache.getOperationalPolicies()) !== "undefined") { |
xuegao | b09e7df | 2019-07-23 14:13:06 +0200 | [diff] [blame] | 11 | loopCache.getOperationalPolicies().forEach(op => { |
sebdet | 5f6c178 | 2019-07-18 15:23:13 +0200 | [diff] [blame] | 12 | componentsMap.set(op.name, "/operationalPolicyModal"); |
| 13 | }) |
| 14 | } |
| 15 | componentsMap.set("OperationalPolicy","/operationalPolicyModal"); |
| 16 | return componentsMap; |
| 17 | } |
xuegao | b09e7df | 2019-07-23 14:13:06 +0200 | [diff] [blame] | 18 | } |