cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pran...@apache.org
Subject [15/25] git commit: updated refs/heads/master to 2f29185
Date Fri, 31 May 2013 04:36:05 GMT
explicit Dedication - Pod action filter for release/dedicate action items


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2489d858
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2489d858
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2489d858

Branch: refs/heads/master
Commit: 2489d858f953dd063fdbf19c2a67aaeed10316f8
Parents: cee82ec
Author: Pranav Saxena <pranav.saxena@citrix.com>
Authored: Tue May 28 18:04:22 2013 +0530
Committer: Pranav Saxena <pranav.saxena@citrix.com>
Committed: Thu May 30 21:57:14 2013 +0530

----------------------------------------------------------------------
 ui/scripts/system.js |   22 +++++-----------------
 1 files changed, 5 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2489d858/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 7508e94..6958292 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -12799,26 +12799,14 @@
 
   var podActionfilter = function(args) {
     var podObj = args.context.item;
+    var dedicatedPodObj = args.context.podItem;
     var allowedActions = [];
-    var flag = 0;
-     $.ajax({
-       url:createURL("listDedicatedPods&podId=" + args.context.pods[0].id),
-       success:function(json){
-         if(json.listdedicatedpodsresponse.dedicatedpod != undefined){
-         var dedicatedPodObj = json.listdedicatedpodsresponse.dedicatedpod[0];
-           if(dedicatedPodObj.domainid != null)
-              flag =1;
-           }
-           else
-             flag =0;
-       }
-     });
-
-   // if(flag == 0)
+   
+     if(podObj.domainid != null)
+      allowedActions.push("release");
+     else
       allowedActions.push("dedicate");
 
-   // if(flag == 1)
-      allowedActions.push("release");
 
     allowedActions.push("edit");
     if(podObj.allocationstate == "Disabled")


Mime
View raw message