cloudstack 3.0 new UI - system - pods page - from actions from listView since they are available in detailView.

This commit is contained in:
Jessica Wang 2012-01-06 15:51:54 -08:00
parent e77373949b
commit 8067713bb1
1 changed files with 1 additions and 106 deletions

View File

@ -4401,112 +4401,7 @@
return 'Added new pod';
}
}
},
enable: {
label: 'Enable pod',
messages: {
confirm: function(args) {
return 'Are you sure you want to enable this pod?';
},
success: function(args) {
return 'This pod is being enabled.';
},
notification: function(args) {
return 'Enabling pod';
},
complete: function(args) {
return 'Pod has been enabled.';
}
},
action: function(args) {
$.ajax({
url: createURL("updatePod&id=" + args.context.pods[0].id + "&allocationstate=Enabled"),
dataType: "json",
async: true,
success: function(json) {
var item = json.updatepodresponse.pod;
args.response.success({
actionFilter: podActionfilter,
data:item
});
}
});
},
notification: {
poll: function(args) {
args.complete();
}
}
},
disable: {
label: 'Disable pod',
messages: {
confirm: function(args) {
return 'Are you sure you want to disable this pod?';
},
success: function(args) {
return 'This pod is being disabled.';
},
notification: function(args) {
return 'Disabling pod';
},
complete: function(args) {
return 'Pod has been disabled.';
}
},
action: function(args) {
$.ajax({
url: createURL("updatePod&id=" + args.context.pods[0].id + "&allocationstate=Disabled"),
dataType: "json",
async: true,
success: function(json) {
var item = json.updatepodresponse.pod;
args.response.success({
actionFilter: podActionfilter,
data:item
});
}
});
},
notification: {
poll: function(args) {
args.complete();
}
}
},
'delete': {
label: 'Delete' ,
messages: {
confirm: function(args) {
return 'Please confirm that you want to delete this pod.';
},
success: function(args) {
return 'pod is being deleted.';
},
notification: function(args) {
return 'Deleting pod';
},
complete: function(args) {
return 'Pod has been deleted.';
}
},
action: function(args) {
$.ajax({
url: createURL("deletePod&id=" + args.context.pods[0].id),
dataType: "json",
async: true,
success: function(json) {
args.response.success({data:{}});
}
});
},
notification: {
poll: function(args) { args.complete(); }
}
}
}
},
detailView: {