aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react/src/api
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2020-03-04 15:47:39 -0800
committersebdet <sebastien.determe@intl.att.com>2020-03-09 09:07:45 -0700
commit2dd4e997c1ccf5dab4dfb7665ce74c0fd1f13e49 (patch)
treeddea40175352505c75e8eac343587e62c99a49dc /ui-react/src/api
parent897a3e004a858ef68d989dad15dde91a69e151a5 (diff)
Rework tosca converter
New code to convert the Policy Tosca Yaml to Json Schema for the Clamp UI Issue-ID: CLAMP-647 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: Id15ddedc1910f6a40bf6e407b34e343e00135571
Diffstat (limited to 'ui-react/src/api')
-rw-r--r--ui-react/src/api/LoopCache.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/ui-react/src/api/LoopCache.js b/ui-react/src/api/LoopCache.js
index c8ecca2f..5eaa79a6 100644
--- a/ui-react/src/api/LoopCache.js
+++ b/ui-react/src/api/LoopCache.js
@@ -126,12 +126,14 @@ export default class LoopCache {
return null;
}
- getOperationalPolicySupportedPdpgroup(name) {
+ getOperationalPolicySupportedPdpGroup(name) {
var opConfig=this.getOperationalPolicyForName(name);
if (opConfig !== null) {
- return opConfig["policyModel"]["policyPdpGroup"]["supportedPdpGroups"];
+ if (opConfig["policyModel"]["policyPdpGroup"] !== undefined && opConfig["policyModel"]["policyPdpGroup"]["supportedPdpGroups"] !== undefined) {
+ return opConfig["policyModel"]["policyPdpGroup"]["supportedPdpGroups"];
+ }
}
- return null;
+ return [];
}
getOperationalPolicyPdpGroup(name) {
@@ -150,12 +152,14 @@ export default class LoopCache {
return null;
}
- getMicroServiceSupportedPdpgroup(name) {
+ getMicroServiceSupportedPdpGroup(name) {
var microService=this.getMicroServiceForName(name);
if (microService !== null) {
- return microService["policyModel"]["policyPdpGroup"]["supportedPdpGroups"];
+ if (microService["policyModel"]["policyPdpGroup"] !== undefined && microService["policyModel"]["policyPdpGroup"]["supportedPdpGroups"] !== undefined) {
+ return microService["policyModel"]["policyPdpGroup"]["supportedPdpGroups"];
+ }
}
- return null;
+ return [];
}
getMicroServicePdpGroup(name) {