CLOUDSTACK-4793: UI > Virtual Routers > Select View > group by zone > detailView > add action "upgrade all routers in this zone to use newer template".

This commit is contained in:
Jessica Wang 2013-11-25 13:32:46 -08:00
parent a5cff1dfd5
commit 5a9b4ee843
1 changed files with 35 additions and 1 deletions

View File

@ -8737,7 +8737,41 @@
});
},
detailView: {
name: 'Virtual Routers group by zone',
name: 'Virtual Routers group by zone',
actions: {
upgradeRouterToUseNewerTemplate: {
label: 'Upgrade Router to Use Newer Template',
messages: {
confirm: function(args) {
return 'Please confirm that you want to upgrade all routers in this zone to use newer template';
},
notification: function (args) {
return 'Upgrade Router to Use Newer Template';
}
},
action: function (args) {
$.ajax({
url: createURL('upgradeRouterTemplate'),
data: {
zoneid: args.context.routerGroupByZone[0].id
},
success: function (json) {
var jobs = json.upgraderoutertemplateresponse.asyncjobs;
if (jobs != undefined) {
args.response.success({
_custom: {
jobId: jobs[0].jobid
}
});
}
}
});
},
notification: {
poll: pollAsyncJobResult
}
}
},
tabs: {
details: {
title: 'Virtual Routers group by zone',