From ed8e2a71029088ecc7f29b484ef1b7a71d536604 Mon Sep 17 00:00:00 2001 From: xg353y Date: Wed, 3 Apr 2019 15:54:21 +0200 Subject: Update Csar handler Update Csar handler, return the content of policies.yaml concatenateed with data.yaml while getting the policy model yaml. Issue-ID: CLAMP-261 Change-Id: I8ef7bcb9b2daaea37f13ca9d3ad9f38b889d6041 Signed-off-by: xg353y --- .../META-INF/resources/designer/scripts/propertyController.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/resources/META-INF') diff --git a/src/main/resources/META-INF/resources/designer/scripts/propertyController.js b/src/main/resources/META-INF/resources/designer/scripts/propertyController.js index 2b32f4d26..507d6bc80 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/propertyController.js +++ b/src/main/resources/META-INF/resources/designer/scripts/propertyController.js @@ -72,7 +72,9 @@ function getMsProperty(type) { var msProperties = cl_props["microServicePolicies"]; for (p in msProperties) { if (msProperties[p]["name"] == type) { - return JSON.parse(JSON.stringify(msProperties[p]["properties"])); + if (msProperties[p]["properties"] !== null && msProperties[p]["properties"] !== undefined) { + return JSON.parse(JSON.stringify(msProperties[p]["properties"])); + } } } return null; @@ -82,7 +84,7 @@ function getMsUI(type) { var msProperties = cl_props["microServicePolicies"]; for (p in msProperties) { if (msProperties[p]["name"] == type) { - return JSON.parse(JSON.stringify(msProperties[p]["jsonRepresentation"])); + return JSON.parse(JSON.stringify(msProperties[p]["jsonRepresentation"])); } } return null; -- cgit 1.2.3-korg