cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pran...@apache.org
Subject [09/25] git commit: updated refs/heads/master to 2f29185
Date Fri, 31 May 2013 04:35:59 GMT
Explicit Dedication - Host  UI-API Integration code


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

Branch: refs/heads/master
Commit: 6aa2268efb9bc1f45a932c2a8a11b65f3e3215f7
Parents: 9f76c05
Author: Pranav Saxena <pranav.saxena@citrix.com>
Authored: Mon May 27 16:05:03 2013 +0530
Committer: Pranav Saxena <pranav.saxena@citrix.com>
Committed: Thu May 30 21:57:12 2013 +0530

----------------------------------------------------------------------
 ui/scripts/system.js |   38 ++++++++++++++++++++++++++------------
 1 files changed, 26 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6aa2268e/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 45b0f43..e39171a 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -9520,7 +9520,12 @@
                          }
                        });
                    }
-                 }
+                 },
+                 error: function(XMLHttpResponse) {
+                    var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
+                    args.response.error(errorMsg);
+                  }
+
 
                 });
               },
@@ -10441,14 +10446,6 @@
                     var item = json.addhostresponse.host[0];
                     hostId = json.addhostresponse.host[0].id;
 
-               /*     args.response.success({
-                      data: item
-                    });
-                  },
-                  error: function(XMLHttpResponse) {
-                    var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
-                    args.response.error(errorMsg);
-                  }*/
 
                        //EXPLICIT DEDICATION
                 if(args.$form.find('.form-item[rel=isDedicated]').find('input[type=checkbox]').is(':Checked')==
true){
@@ -10462,8 +10459,19 @@
                          url:createURL("dedicateHost&hostId=" +hostId +"&domainId="
+args.data.domainId + array2.join("")),
                          dataType:"json",
                          success:function(json){
-                             var dedicatedObj = json.dedicatehostresponse.host;
-                             args.response.success({  data: $.extend(item, dedicatedObj)
});
+                             var jid = json.dedicatehostresponse.host.jobid;
+                             //args.response.success({  data: $.extend(item, dedicatedObj)
});
+                              args.response.success({
+                                 _custom:
+                           {      jobId: jid
+                             },
+                            notification: {
+                                 poll: pollAsyncJobResult
+                              },
+
+                             data:item
+
+                            });
 
                          },
 
@@ -10472,7 +10480,13 @@
                          }
                        });
                    }
-                 }
+                 },
+
+                   error: function(XMLHttpResponse) {
+                    var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
+                    args.response.error(errorMsg);
+                  }
+
                 });
               },
 


Mime
View raw message