Merge "E2E Automation"
[clamp.git] / src / main / resources / META-INF / resources / designer / scripts / propertyController.js
index 2b32f4d..75c64f3 100644 (file)
@@ -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;
@@ -111,4 +113,13 @@ function getDeploymentStatusURL() {
 function setDeploymentStatusURL(deploymentStatusURL) {
     cl_props["dcaeDeploymentStatusUrl"] = deploymentStatusURL;
 }
-module.exports = { getOperationalPolicyProperty,getGlobalProperty,getMsProperty,getMsUI,getLastUpdatedStatus,getDeploymentID,getDeploymentStatusURL };
\ No newline at end of file
+
+function getResourceDetailsProperty() {
+       return cl_props["modelPropertiesJson"]["resourceDetails"]["VF"];
+}
+
+function getResourceDetailsVfcProperty() {
+       return cl_props["modelPropertiesJson"]["resourceDetails"]["VFC"];
+}
+
+module.exports = { getOperationalPolicyProperty,getGlobalProperty,getMsProperty,getMsUI,getLastUpdatedStatus,getDeploymentID,getDeploymentStatusURL,getResourceDetailsProperty,getResourceDetailsVfcProperty };
\ No newline at end of file