explicit dedication -  dedicatePod API call action item integration

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

Branch: refs/heads/master
Commit: fd72c129674375e911df018ee7e1e0ba99b73586
Parents: 55d3176
Author: Pranav Saxena <pranav.sax...@citrix.com>
Authored: Tue May 28 15:52:53 2013 +0530
Committer: Pranav Saxena <pranav.sax...@citrix.com>
Committed: Thu May 30 21:57:13 2013 +0530

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fd72c129/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 815ed99..c68def0 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -8775,16 +8775,31 @@
                      }
                 },
                 action: function(args) {
+
+                    //EXPLICIT DEDICATION
+                      var array2 = [];
+                      if(args.data.accountId != "")
+                        array2.push("&accountId=" +todb(args.data.accountId));
+
                     $.ajax({
-                    url: createURL("dedicatePod&podId=" + 
args.context.pods[0].id),
+                    url: createURL("dedicatePod&podId=" + 
args.context.pods[0].id + "&domainId=" +args.data.domainId + array2.join("")),
                     dataType: "json",
                     success: function(json) {
-                      var item = json.dedicatepodresponse.pod;
-                      args.response.success({
-                        actionFilter: podActionfilter,
-                        data:item
-                      });
-                    }
+                          var jid = json.dedicatepodresponse.jobid;
+                            args.response.success({
+                               _custom:
+                           {      jobId: jid
+                             },
+                            notification: {
+                                 poll: pollAsyncJobResult
+                              },
+                            actionFilter:podActionfilter
+                          });
+                      },
+                   error:function(json){
+                      
args.response.error(parseXMLHttpResponse(XMLHttpResponse));
+
+                   }
                   });
                 }
 

Reply via email to