Updated Branches:
  refs/heads/UI-explicitDedication b3e336422 -> 5b2c2109c


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/5b2c2109
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5b2c2109
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5b2c2109

Branch: refs/heads/UI-explicitDedication
Commit: 5b2c2109c892fe3bc2bb73f50f37ebf3bbfecf91
Parents: b3e3364
Author: Pranav Saxena <pranav.sax...@citrix.com>
Authored: Tue May 28 15:52:53 2013 +0530
Committer: Pranav Saxena <pranav.sax...@citrix.com>
Committed: Tue May 28 15:52:53 2013 +0530

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5b2c2109/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 8c11ff8..4755f27 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -8240,16 +8240,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