You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by is...@apache.org on 2013/07/05 09:44:48 UTC
git commit: updated refs/heads/master to d1adefe
Updated Branches:
refs/heads/master 1f54e647f -> d1adefe28
CLOUDSTACK-3081: Even a dedicate pod operation fails, the system shows "Task Complete"
Dedicate zone/pod/cluster/host operations have been fixed
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d1adefe2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d1adefe2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d1adefe2
Branch: refs/heads/master
Commit: d1adefe284a38cc194005defc7b38bdde623a180
Parents: 1f54e64
Author: Isaac Chiang <is...@gmail.com>
Authored: Fri Jul 5 15:41:09 2013 +0800
Committer: Isaac Chiang <is...@gmail.com>
Committed: Fri Jul 5 15:41:09 2013 +0800
----------------------------------------------------------------------
ui/scripts/system.js | 726 ++++++++++++++++++++++------------------------
1 file changed, 353 insertions(+), 373 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d1adefe2/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index e00cb76..70b4f8d 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -5946,116 +5946,113 @@
}
},
- dedicateZone:{
- label: 'Dedicate Zone',
- messages: {
- confirm: function(args) {
- return 'Do you really want to dedicate this zone to a domain/account? ';
- },
- notification: function(args) {
- return 'Zone Dedicated';
- }
+ dedicateZone:{
+ label: 'Dedicate Zone',
+ messages: {
+ confirm: function(args) {
+ return 'Do you really want to dedicate this zone to a domain/account? ';
},
- createForm:{
- title:'Dedicate Zone',
- fields:{
- domainId:{
- label:'Domain',
- validation:{required:true},
- select:function(args){
- $.ajax({
- url:createURL("listDomains&listAll=true"),
- dataType:"json",
- async:false,
- success: function(json) {
- var domainObjs= json.listdomainsresponse.domain;
- var items=[];
-
- $(domainObjs).each(function() {
- items.push({id:this.id ,description:this.name });
- });
-
- args.response.success({
- data: items
- });
- }
-
-
- });
+ notification: function(args) {
+ return 'Zone Dedicated';
}
},
-
- accountId:{
- label:'Account',
- docID:'helpAccountForDedication',
- validation:{required:false}
+ createForm:{
+ title:'Dedicate Zone',
+ fields:{
+ domainId:{
+ label:'Domain',
+ validation:{required:true},
+ select:function(args){
+ $.ajax({
+ url:createURL("listDomains&listAll=true"),
+ dataType:"json",
+ async:false,
+ success: function(json) {
+ var domainObjs= json.listdomainsresponse.domain;
+ var items=[];
- }
- }
- },
-
- action: function(args) {
- //EXPLICIT DEDICATION
- var array2 = [];
- if(args.data.accountId != "")
- array2.push("&account=" +todb(args.data.accountId));
-
- $.ajax({
- url: createURL("dedicateZone&zoneId=" + args.context.physicalResources[0].id + "&domainId=" +args.data.domainId + array2.join("") ),
- dataType: "json",
- success: function(json) {
- var jid = json.dedicatezoneresponse.jobid;
- args.response.success({
- _custom:
- { jobId: jid
- },
- notification: {
- poll: pollAsyncJobResult
- },
- actionFilter:zoneActionfilter
+ $(domainObjs).each(function() {
+ items.push({id:this.id ,description:this.name });
+ });
- });
+ args.response.success({
+ data: items
+ });
+ }
+ });
+ }
+ },
+ accountId:{
+ label:'Account',
+ docID:'helpAccountForDedication',
+ validation:{required:false}
+ }
}
- });
- }
-
- },
-
- releaseDedicatedZone:{
- label:'Release Dedicated Zone',
- messages:{
- confirm: function(args) {
- return 'Do you want to release this dedicated zone ?';
},
- notification: function(args) {
- return 'Zone dedication released';
+ action: function(args) {
+ //EXPLICIT DEDICATION
+ var array2 = [];
+ if(args.data.accountId != "")
+ array2.push("&account=" +todb(args.data.accountId));
+
+ $.ajax({
+ url: createURL("dedicateZone&zoneId=" +
+ args.context.physicalResources[0].id +
+ "&domainId=" +args.data.domainId + array2.join("")),
+ dataType: "json",
+ success: function(json) {
+ var jid = json.dedicatezoneresponse.jobid;
+ args.response.success({
+ _custom:{
+ jobId: jid,
+ getActionFilter: function() {
+ return zoneActionfilter;
+ }
+ }
+ });
+ }
+ });
+ },
+ notification: {
+ poll: pollAsyncJobResult
}
},
- action:function(args){
- $.ajax({
- url:createURL("releaseDedicatedZone&zoneid=" + args.context.physicalResources[0].id),
- dataType:"json",
- async:true,
+ releaseDedicatedZone:{
+ label:'Release Dedicated Zone',
+ messages:{
+ confirm: function(args) {
+ return 'Do you want to release this dedicated zone ?';
+ },
+ notification: function(args) {
+ return 'Zone dedication released';
+ }
+ },
+ action:function(args){
+ $.ajax({
+ url:createURL("releaseDedicatedZone&zoneid="+
+ args.context.physicalResources[0].id),
+ dataType:"json",
+ async:true,
success:function(json){
- var jid = json.releasededicatedzoneresponse.jobid;
+ var jid = json.releasededicatedzoneresponse.jobid;
args.response.success({
- _custom:
- { jobId: jid
- },
- notification: {
- poll: pollAsyncJobResult
- },
- actionFilter:zoneActionfilter
-
- });
- },
- error:function(json){
- args.response.error(parseXMLHttpResponse(json));
- }
- });
-
- }
- },
+ _custom:{
+ jobId: jid,
+ getActionFilter: function() {
+ return zoneActionfilter;
+ }
+ }
+ });
+ },
+ error:function(json){
+ args.response.error(parseXMLHttpResponse(json));
+ }
+ });
+ },
+ notification: {
+ poll: pollAsyncJobResult
+ }
+ },
'remove': {
label: 'label.action.delete.zone',
@@ -9569,120 +9566,115 @@
},
dedicate:{
- label: 'Dedicate Pod',
- messages: {
- confirm: function(args) {
- return 'Do you really want to dedicate this pod to a domain/account? ';
+ label: 'Dedicate Pod',
+ messages: {
+ confirm: function(args) {
+ return 'Do you really want to dedicate this pod to a domain/account? ';
+ },
+ notification: function(args) {
+ return 'Pod Dedicated';
+ }
},
- notification: function(args) {
- return 'Pod Dedicated';
- }
- },
- createForm:{
- title:'Dedicate Pod',
- fields:{
- domainId:{
- label:'Domain',
- validation:{required:true},
- select:function(args){
- $.ajax({
- url:createURL("listDomains&listAll=true"),
- dataType:"json",
- async:false,
- success: function(json) {
- var domainObjs= json.listdomainsresponse.domain;
- var items=[];
+ createForm:{
+ title:'Dedicate Pod',
+ fields:{
+ domainId:{
+ label:'Domain',
+ validation:{required:true},
+ select:function(args){
+ $.ajax({
+ url:createURL("listDomains&listAll=true"),
+ dataType:"json",
+ async:false,
+ success: function(json) {
+ var domainObjs= json.listdomainsresponse.domain;
+ var items=[];
- $(domainObjs).each(function() {
- items.push({id:this.id ,description:this.name });
- });
+ $(domainObjs).each(function() {
+ items.push({id:this.id ,description:this.name });
+ });
- args.response.success({
- data: items
- });
- }
+ args.response.success({
+ data: items
+ });
+ }
+ });
+ }
+ },
+ accountId:{
+ label:'Account',
+ docID:'helpAccountForDedication',
+ validation:{required:false}
+ }
+ }
+ },
+ action: function(args) {
+ //EXPLICIT DEDICATION
+ var array2 = [];
+ if(args.data.accountId != "")
+ array2.push("&account=" +todb(args.data.accountId));
+ $.ajax({
+ url: createURL("dedicatePod&podId=" +
+ args.context.pods[0].id +
+ "&domainId=" +args.data.domainId + array2.join("")),
+ dataType: "json",
+ success: function(json) {
+ var jid = json.dedicatepodresponse.jobid;
+ args.response.success({
+ _custom: {
+ jobId: jid,
+ getActionFilter: function() {
+ return podActionfilter;
+ }
+ },
});
- }
- },
-
- accountId:{
- label:'Account',
- docID:'helpAccountForDedication',
- validation:{required:false}
-
+ },
+ error:function(json){
+ args.response.error(parseXMLHttpResponse(XMLHttpResponse));
+ }
+ });
+ },
+ notification: {
+ poll: pollAsyncJobResult
}
-
-
- }
},
- action: function(args) {
-
- //EXPLICIT DEDICATION
- var array2 = [];
- if(args.data.accountId != "")
- array2.push("&account=" +todb(args.data.accountId));
-
+ release:{
+ label:'Release Dedicated Pod',
+ messages:{
+ confirm: function(args) {
+ return 'Do you want to release this dedicated pod ?';
+ },
+ notification: function(args) {
+ return 'Pod dedication released';
+ }
+ },
+ action:function(args){
$.ajax({
- url: createURL("dedicatePod&podId=" + args.context.pods[0].id + "&domainId=" +args.data.domainId + array2.join("")),
- dataType: "json",
- success: function(json) {
- var jid = json.dedicatepodresponse.jobid;
- args.response.success({
- _custom:
- { jobId: jid
- },
- notification: {
- poll: pollAsyncJobResult
- },
- actionFilter:podActionfilter
- });
+ url:createURL("releaseDedicatedPod&podid=" + args.context.pods[0].id),
+ dataType:"json",
+ async:true,
+ success:function(json){
+ var jid = json.releasededicatedpodresponse.jobid;
+ args.response.success({
+ _custom: {
+ jobId: jid,
+ getActionFilter: function() {
+ return podActionfilter;
+ }
+ }
+ });
},
- error:function(json){
- args.response.error(parseXMLHttpResponse(XMLHttpResponse));
-
- }
- });
- }
-
- },
-
- release:{
- label:'Release Dedicated Pod',
- messages:{
- confirm: function(args) {
- return 'Do you want to release this dedicated pod ?';
+ error:function(json){
+ args.response.error(parseXMLHttpResponse(json));
+ }
+ });
},
- notification: function(args) {
- return 'Pod dedication released';
+ notification: {
+ poll: pollAsyncJobResult
}
},
- action:function(args){
- $.ajax({
- url:createURL("releaseDedicatedPod&podid=" + args.context.pods[0].id),
- dataType:"json",
- async:true,
- success:function(json){
- var jid = json.releasededicatedpodresponse.jobid;
- args.response.success({
- _custom:
- { jobId: jid
- },
- notification: {
- poll: pollAsyncJobResult
- },
- actionFilter:podActionfilter
-
- });
- },
- error:function(json){
- args.response.error(parseXMLHttpResponse(json));
- }
- });
-
- }
- },
disable: {
@@ -10550,116 +10542,111 @@
}
},
- dedicate:{
- label: 'Dedicate Cluster',
- messages: {
- confirm: function(args) {
- return 'Do you really want to dedicate this cluster to a domain/account? ';
- },
- notification: function(args) {
- return 'Cluster Dedicated';
- }
+ dedicate:{
+ label: 'Dedicate Cluster',
+ messages: {
+ confirm: function(args) {
+ return 'Do you really want to dedicate this cluster to a domain/account? ';
},
- createForm:{
- title:'Dedicate Cluster',
- fields:{
- domainId:{
- label:'Domain',
- validation:{required:true},
- select:function(args){
- $.ajax({
- url:createURL("listDomains&listAll=true"),
- dataType:"json",
- async:false,
- success: function(json) {
- var domainObjs= json.listdomainsresponse.domain;
- var items=[];
-
- $(domainObjs).each(function() {
- items.push({id:this.id ,description:this.name });
- });
-
- args.response.success({
- data: items
- });
- }
-
-
- });
- }
- },
-
- accountId:{
- label:'Account',
- docID:'helpAccountForDedication',
- validation:{required:false}
-
- }
-
- }
- },
- action: function(args) {
- //EXPLICIT DEDICATION
+ notification: function(args) {
+ return 'Cluster Dedicated';
+ }
+ },
+ createForm:{
+ title:'Dedicate Cluster',
+ fields:{
+ domainId:{
+ label:'Domain',
+ validation:{required:true},
+ select:function(args){
+ $.ajax({
+ url:createURL("listDomains&listAll=true"),
+ dataType:"json",
+ async:false,
+ success: function(json) {
+ var domainObjs= json.listdomainsresponse.domain;
+ var items=[];
- var array2 = [];
- if(args.data.accountId != "")
- array2.push("&account=" +todb(args.data.accountId));
+ $(domainObjs).each(function() {
+ items.push({id:this.id ,description:this.name });
+ });
- $.ajax({
- url: createURL("dedicateCluster&clusterId=" + args.context.clusters[0].id + "&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
- },
- actionFilter:clusterActionfilter
+ args.response.success({
+ data: items
});
+ }
+ });
}
- });
+ },
+ accountId:{
+ label:'Account',
+ docID:'helpAccountForDedication',
+ validation:{required:false}
+ }
}
-
},
-
- release:{
- label:'Release Dedicated Cluster',
- messages:{
- confirm: function(args) {
- return 'Do you want to release this dedicated cluster ?';
- },
- notification: function(args) {
- return 'Cluster dedication released';
+ action: function(args) {
+ //EXPLICIT DEDICATION
+ var array2 = [];
+ if(args.data.accountId != "")
+ array2.push("&account=" +todb(args.data.accountId));
+ $.ajax({
+ url: createURL("dedicateCluster&clusterId=" +
+ args.context.clusters[0].id +
+ "&domainId=" +args.data.domainId + array2.join("") ),
+ dataType: "json",
+ success: function(json) {
+ var jid = json.dedicateclusterresponse.jobid;
+ args.response.success({
+ _custom: {
+ jobId: jid,
+ getActionFilter: function() {
+ return clusterActionfilter;
+ }
+ }
+ });
}
+ });
+ },
+ notification: {
+ poll: pollAsyncJobResult
+ }
+ },
+ release:{
+ label:'Release Dedicated Cluster',
+ messages:{
+ confirm: function(args) {
+ return 'Do you want to release this dedicated cluster ?';
},
- action:function(args){
- $.ajax({
- url:createURL("releaseDedicatedCluster&clusterid=" + args.context.clusters[0].id),
- dataType:"json",
- async:true,
- success:function(json){
- var jid = json.releasededicatedclusterresponse.jobid;
- args.response.success({
- _custom:
- { jobId: jid
- },
- notification: {
- poll: pollAsyncJobResult
- },
- actionFilter:clusterActionfilter
-
- });
- },
- error:function(json){
- args.response.error(parseXMLHttpResponse(json));
- }
- });
-
- }
+ notification: function(args) {
+ return 'Cluster dedication released';
+ }
},
+ action:function(args){
+ $.ajax({
+ url:createURL("releaseDedicatedCluster&clusterid=" + args.context.clusters[0].id),
+ dataType:"json",
+ async:true,
+ success:function(json){
+ var jid = json.releasededicatedclusterresponse.jobid;
+ args.response.success({
+ _custom: {
+ jobId: jid,
+ getActionFilter: function() {
+ return clusterActionfilter;
+ }
+ }
+ });
+ },
+ error:function(json){
+ args.response.error(parseXMLHttpResponse(json));
+ }
+ });
+ },
+ notification: {
+ poll: pollAsyncJobResult
+ }
+ },
manage: {
@@ -11568,9 +11555,8 @@
}
},
-
- dedicate:{
- label: 'Dedicate Host',
+ dedicate:{
+ label: 'Dedicate Host',
messages: {
confirm: function(args) {
return 'Do you really want to dedicate this host to a domain/account? ';
@@ -11580,107 +11566,101 @@
}
},
createForm:{
- title:'Dedicate Host',
- fields:{
- domainId:{
+ title:'Dedicate Host',
+ fields:{
+ domainId:{
label:'Domain',
validation:{required:true},
select:function(args){
- $.ajax({
- url:createURL("listDomains&listAll=true"),
- dataType:"json",
- async:false,
- success: function(json) {
- var domainObjs= json.listdomainsresponse.domain;
- var items=[];
-
- $(domainObjs).each(function() {
- items.push({id:this.id ,description:this.name });
- });
-
- args.response.success({
- data: items
- });
- }
+ $.ajax({
+ url:createURL("listDomains&listAll=true"),
+ dataType:"json",
+ async:false,
+ success: function(json) {
+ var domainObjs= json.listdomainsresponse.domain;
+ var items=[];
+ $(domainObjs).each(function() {
+ items.push({id:this.id ,description:this.name });
+ });
+ args.response.success({
+ data: items
+ });
+ }
});
- }
- },
- accountId:{
- label:'Account',
- docID:'helpAccountForDedication',
- validation:{required:false}
-
+ }
+ },
+ accountId:{
+ label:'Account',
+ docID:'helpAccountForDedication',
+ validation:{required:false}
+ }
}
-
-
- }
},
-
action: function(args) {
- //EXPLICIT DEDICATION
- var array2 = [];
- if(args.data.accountId != "")
- array2.push("&account=" +todb(args.data.accountId));
+ //EXPLICIT DEDICATION
+ var array2 = [];
+ if(args.data.accountId != "")
+ array2.push("&account=" +todb(args.data.accountId));
- $.ajax({
- url: createURL("dedicateHost&hostId=" + args.context.hosts[0].id + "&domainId=" +args.data.domainId + array2.join("") ),
+ $.ajax({
+ url: createURL("dedicateHost&hostId=" +
+ args.context.hosts[0].id +
+ "&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
- },
- actionFilter:hostActionfilter
-
+ var jid = json.dedicatehostresponse.jobid;
- });
+ args.response.success({
+ _custom: {
+ jobId: jid,
+ getActionFilter: function() {
+ return hostActionfilter;
+ }
+ }
+ });
}
});
+ },
+ notification: {
+ poll: pollAsyncJobResult
}
-
},
-
-
- release:{
+ release:{
label:'Release Dedicated Host',
messages:{
- confirm: function(args) {
+ confirm: function(args) {
return 'Do you want to release this dedicated host ?';
},
notification: function(args) {
return 'Host dedication released';
}
},
- action:function(args){
+ action:function(args){
$.ajax({
- url:createURL("releaseDedicatedHost&hostid=" + args.context.hosts[0].id),
- dataType:"json",
- async:true,
- success:function(json){
- var jid = json.releasededicatedhostresponse.jobid;
- args.response.success({
- _custom:
- { jobId: jid
- },
- notification: {
- poll: pollAsyncJobResult
- },
- actionFilter:hostActionfilter
-
- });
+ url:createURL("releaseDedicatedHost&hostid=" + args.context.hosts[0].id),
+ dataType:"json",
+ async:true,
+ success:function(json){
+ var jid = json.releasededicatedhostresponse.jobid;
+ args.response.success({
+ _custom: {
+ jobId: jid,
+ getActionFilter: function() {
+ return hostActionfilter;
+ }
+ }
+ });
},
error:function(json){
args.response.error(parseXMLHttpResponse(json));
}
});
-
- }
+ },
+ notification: {
+ poll: pollAsyncJobResult
+ }
},