cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pran...@apache.org
Subject git commit: updated refs/heads/UI-explicitDedication to 80df36c
Date Mon, 27 May 2013 10:56:02 GMT
Updated Branches:
  refs/heads/UI-explicitDedication d67c5a84c -> 80df36c18


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

Branch: refs/heads/UI-explicitDedication
Commit: 80df36c182b3b9a55e0ee9c4ce349ae1712799a7
Parents: d67c5a8
Author: Pranav Saxena <pranav.saxena@citrix.com>
Authored: Mon May 27 16:05:03 2013 +0530
Committer: Pranav Saxena <pranav.saxena@citrix.com>
Committed: Mon May 27 16:05:03 2013 +0530

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/80df36c1/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 60f2a82..7289f7b 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -8985,7 +8985,12 @@
                          }
                        });
                    }
-                 }
+                 },
+                 error: function(XMLHttpResponse) {
+                    var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
+                    args.response.error(errorMsg);
+                  }
+
 
                 });
               },
@@ -9906,14 +9911,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){
@@ -9927,8 +9924,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
+
+                            });
 
                          },
 
@@ -9937,7 +9945,13 @@
                          }
                        });
                    }
-                 }
+                 },
+
+                   error: function(XMLHttpResponse) {
+                    var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
+                    args.response.error(errorMsg);
+                  }
+
                 });
               },
 


Mime
View raw message