diff options
author | sebdet <sebastien.determe@intl.att.com> | 2019-07-18 15:23:13 +0200 |
---|---|---|
committer | sebdet <sebastien.determe@intl.att.com> | 2019-07-18 15:23:58 +0200 |
commit | 5f6c178c3eaea6fffe7d46ca3c75dcb0ffa92755 (patch) | |
tree | 1712c36074719f4a8eaf3dd601b3cf29a88d685a /ui-react/src/components/loop_viewer/svg/LoopComponentConverter.js | |
parent | 0ce38c26f68efa97f7d16ec9bbba5888982d97ba (diff) |
Add generic svg selection
Add a converter that maps each component to a dialog type, so that each
component in the SVG can be mapped to a dialog if needed
Issue-ID: CLAMP-423
Change-Id: I2dc2517048ffd911f70c64b07216aa988bcb4fe0
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'ui-react/src/components/loop_viewer/svg/LoopComponentConverter.js')
-rw-r--r-- | ui-react/src/components/loop_viewer/svg/LoopComponentConverter.js | 18 |
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 |