summaryrefslogtreecommitdiffstats
path: root/ui-react/src/components/loop_viewer/svg/LoopComponentConverter.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui-react/src/components/loop_viewer/svg/LoopComponentConverter.js')
-rw-r--r--ui-react/src/components/loop_viewer/svg/LoopComponentConverter.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/ui-react/src/components/loop_viewer/svg/LoopComponentConverter.js b/ui-react/src/components/loop_viewer/svg/LoopComponentConverter.js
new file mode 100644
index 000000000..b737f3e19
--- /dev/null
+++ b/ui-react/src/components/loop_viewer/svg/LoopComponentConverter.js
@@ -0,0 +1,18 @@
+export default class LoopComponentConverter {
+
+ static buildMapOfComponents(loopCache) {
+ var componentsMap = new Map([]);
+ if (typeof (loopCache.getMicroServicePolicies()) !== "undefined") {
+ loopCache.getMicroServicePolicies().map(ms => {
+ componentsMap.set(ms.name, "/configurationPolicyModal/"+ms.name);
+ })
+ }
+ if (typeof (loopCache.getOperationalPolicies()) !== "undefined") {
+ loopCache.getOperationalPolicies().map(op => {
+ componentsMap.set(op.name, "/operationalPolicyModal");
+ })
+ }
+ componentsMap.set("OperationalPolicy","/operationalPolicyModal");
+ return componentsMap;
+ }
+} \ No newline at end of file