Rework the loop state
[clamp.git] / src / main / resources / META-INF / resources / designer / scripts / propertyController.js
index 75c64f3..0323529 100644 (file)
  */
 
 function updateMsProperties(type, newMsProperties) {
-    var newMsProperties = JSON.parse(JSON.stringify(cl_props["microServicePolicies"]));
-    for (p in newMsProperties) {
-        if (newMsProperties[p]["name"] == type) {
-               cl_props["microServicePolicies"][p] = newMsProperties;
+    if (newMsProperties["name"] == type) {
+        for (p in cl_props["microServicePolicies"]) {
+            if (cl_props["microServicePolicies"][p]["name"] == type) {
+                cl_props["microServicePolicies"][p] = newMsProperties;
+            }
         }
     }
 }
@@ -90,36 +91,20 @@ function getMsUI(type) {
     return null;
 }
 
-function getLastUpdatedStatus() {
-    return cl_props["lastComputedState"];
-}
-
-function setLastUpdatedStatus(status) {
-    cl_props["lastComputedState"] =  status;
-}
-
-function getDeploymentID() {
-    return cl_props["dcaeDeploymentId"];
-}
-
-function setDeploymentID(deploymentId) {
-    cl_props["dcaeDeploymentId"] = deploymentId;
-}
-
-function getDeploymentStatusURL() {
-    return cl_props["dcaeDeploymentStatusUrl"];
+function getResourceDetailsVfProperty() {
+       return cl_props["modelPropertiesJson"]["resourceDetails"]["VF"];
 }
 
-function setDeploymentStatusURL(deploymentStatusURL) {
-    cl_props["dcaeDeploymentStatusUrl"] = deploymentStatusURL;
+function getResourceDetailsVfModuleProperty() {
+       return cl_props["modelPropertiesJson"]["resourceDetails"]["VFModule"];
 }
 
-function getResourceDetailsProperty() {
-       return cl_props["modelPropertiesJson"]["resourceDetails"]["VF"];
+function getLoopLogsArray() {
+       return cl_props.loopLogs;
 }
 
-function getResourceDetailsVfcProperty() {
-       return cl_props["modelPropertiesJson"]["resourceDetails"]["VFC"];
+function getComponentStates() {
+       return cl_props.components;
 }
 
-module.exports = { getOperationalPolicyProperty,getGlobalProperty,getMsProperty,getMsUI,getLastUpdatedStatus,getDeploymentID,getDeploymentStatusURL,getResourceDetailsProperty,getResourceDetailsVfcProperty };
\ No newline at end of file
+module.exports = { getOperationalPolicyProperty,getGlobalProperty,getMsProperty,getMsUI,getResourceDetailsVfProperty,getResourceDetailsVfModuleProperty };