diff options
author | sebdet <sebastien.determe@intl.att.com> | 2020-02-25 15:13:31 -0800 |
---|---|---|
committer | sebdet <sebastien.determe@intl.att.com> | 2020-02-26 07:25:24 -0800 |
commit | c11160ecfdce03091917e2728f80848f4d8feb95 (patch) | |
tree | 21554251f47912e5d2cb35152a0ac42adaa02575 /ui-react/src/api/LoopCache.js | |
parent | 3a26471260e56f7a87533f0147fc63530d6ea08c (diff) |
Add new dialog for policy
Add a new dialog component for tosca based policy, config/op should use that dialog now.
Issue-ID: CLAMP-653
Change-Id: I57523bc2d4bfbf5ca5a3acf5c59823df06fd4cd9
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'ui-react/src/api/LoopCache.js')
-rw-r--r-- | ui-react/src/api/LoopCache.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ui-react/src/api/LoopCache.js b/ui-react/src/api/LoopCache.js index c73ed62b..b1772308 100644 --- a/ui-react/src/api/LoopCache.js +++ b/ui-react/src/api/LoopCache.js @@ -78,6 +78,33 @@ export default class LoopCache { return this.loopJsonCache["microServicePolicies"]; } + getOperationalPolicyForName(name) { + var opProperties=this.getOperationalPolicies(); + for (var policy in opProperties) { + if (opProperties[policy]["name"] === name) { + return opProperties[policy]; + } + } + return null; + } + + getOperationalPolicyPropertiesForName(name) { + var opConfig = this.getOperationalPolicyForName(name); + if (opConfig !== null) { + return opConfig["properties"]; + } + return null; + } + + getOperationalPolicyJsonRepresentationForName(name) { + var opConfig = this.getOperationalPolicyForName(name); + if (opConfig !== null) { + return opConfig["jsonRepresentation"]; + } + return null; + } + + getMicroServiceForName(name) { var msProperties=this.getMicroServicePolicies(); for (var policy in msProperties) { |