You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/06/21 00:29:35 UTC
git commit: updated refs/heads/master to 60622d7
Updated Branches:
refs/heads/master 9ed52fd77 -> 60622d7a2
CLOUDSTACK-3045: Fix missing 'array2' from add cluster/add host
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/60622d7a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/60622d7a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/60622d7a
Branch: refs/heads/master
Commit: 60622d7a28c2109c9858b4d9a0f6eb68e1c3aff0
Parents: 9ed52fd
Author: Brian Federle <br...@citrix.com>
Authored: Thu Jun 20 15:29:32 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Thu Jun 20 15:29:32 2013 -0700
----------------------------------------------------------------------
ui/scripts/system.js | 91 +++++++++++++++++++++++------------------------
1 file changed, 45 insertions(+), 46 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/60622d7a/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 387e629..cbced87 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -10275,44 +10275,42 @@
var item = json.addclusterresponse.cluster[0];
clusterId= json.addclusterresponse.cluster[0].id;
- //EXPLICIT DEDICATION
- if(args.$form.find('.form-item[rel=isDedicated]').find('input[type=checkbox]').is(':Checked')== true){
- var array2 = [];
+ //EXPLICIT DEDICATION
+ var array2 = [];
+ if(args.$form.find('.form-item[rel=isDedicated]').find('input[type=checkbox]').is(':Checked')== true){
if(args.data.accountId != "")
array2.push("&account=" +todb(args.data.accountId));
}
if(clusterId != null){
$.ajax({
- url:createURL("dedicateCluster&clusterId=" +clusterId +"&domainId=" +args.data.domainId + array2.join("")),
- dataType:"json",
- success:function(json){
- var jid = json.dedicateclusterresponse.jobid;
- args.response.success({
- _custom:
- { jobId: jid
- },
- notification: {
- poll: pollAsyncJobResult
- },
+ url:createURL("dedicateCluster&clusterId=" +clusterId +"&domainId=" +args.data.domainId + array2.join("")),
+ dataType:"json",
+ success:function(json){
+ var jid = json.dedicateclusterresponse.jobid;
+ args.response.success({
+ _custom:
+ { jobId: jid
+ },
+ notification: {
+ poll: pollAsyncJobResult
+ },
- data:$.extend(item, {state:'Enabled'})
- });
+ data:$.extend(item, {state:'Enabled'})
+ });
- },
+ },
- error:function(json){
- args.response.error(parseXMLHttpResponse(XMLHttpResponse));
- }
- });
- }
+ error:function(json){
+ args.response.error(parseXMLHttpResponse(XMLHttpResponse));
+ }
+ });
+ }
},
error: function(XMLHttpResponse) {
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
args.response.error(errorMsg);
}
-
-
});
},
@@ -11374,42 +11372,43 @@
data: data,
success: function(json) {
var item = json.addhostresponse.host[0];
+
hostId = json.addhostresponse.host[0].id;
+ //EXPLICIT DEDICATION
+ var array2 = [];
- //EXPLICIT DEDICATION
- if(args.$form.find('.form-item[rel=isDedicated]').find('input[type=checkbox]').is(':Checked')== true){
- var array2 = [];
+ if(args.$form.find('.form-item[rel=isDedicated]').find('input[type=checkbox]').is(':Checked')== true){
if(args.data.accountId != "")
array2.push("&account=" +todb(args.data.accountId));
}
if(hostId != null){
$.ajax({
- url:createURL("dedicateHost&hostId=" +hostId +"&domainId=" +args.data.domainId + array2.join("")),
- dataType:"json",
- success:function(json){
- var jid = json.dedicatehostresponse.host.jobid;
- args.response.success({
- _custom:
- { jobId: jid
- },
+ url:createURL("dedicateHost&hostId=" +hostId +"&domainId=" +args.data.domainId + array2.join("")),
+ dataType:"json",
+ success:function(json){
+ var jid = json.dedicatehostresponse.jobid;
+ args.response.success({
+ _custom:
+ { jobId: jid
+ },
notification: {
- poll: pollAsyncJobResult
- },
+ poll: pollAsyncJobResult
+ },
- data:item
+ data:item
- });
+ });
- },
+ },
- error:function(json){
- args.response.error(parseXMLHttpResponse(XMLHttpResponse));
- }
- });
- }
- },
+ error:function(json){
+ args.response.error(parseXMLHttpResponse(XMLHttpResponse));
+ }
+ });
+ }
+ },
error: function(XMLHttpResponse) {
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);