Redirect to #/tools/logs after upgrade

This commit is contained in:
Alexandre Aubin 2019-04-24 18:10:56 +02:00
parent d86ac8ec6a
commit 7068578b6a

View file

@ -60,9 +60,32 @@
// confirm_update_apps and confirm_update_packages // confirm_update_apps and confirm_update_packages
y18n.t('confirm_update_' + c.params['type'].toLowerCase()), y18n.t('confirm_update_' + c.params['type'].toLowerCase()),
function(){ function(){
c.api('/upgrade?'+c.params["type"], function(data) { c.api('/upgrade?'+c.params["type"],
c.view('home', data); function(data) {
}, 'PUT'); store.clear('slide');
c.redirect('#/tools/logs');
},
'PUT');
},
function(){
store.clear('slide');
c.redirect('#/update');
}
);
});
// Upgrade a specific apps
app.get('#/upgrade/apps/:app', function (c) {
c.confirm(
y18n.t('tools'),
y18n.t('confirm_update_specific_app', [c.params['app']]),
function(){
c.api('/upgrade/apps?app='+c.params['app'].toLowerCase(),
function(data) {
store.clear('slide');
c.redirect('#/tools/logs');
},
'PUT');
}, },
function(){ function(){
store.clear('slide'); store.clear('slide');
@ -121,26 +144,6 @@
}); });
}); });
// Upgrade a specific apps
app.get('#/upgrade/apps/:app', function (c) {
c.confirm(
y18n.t('tools'),
y18n.t('confirm_update_specific_app', [c.params['app']]),
function(){
c.api('/upgrade/apps?app='+c.params['app'].toLowerCase(),
function(data) {
// 'log' is a reserved name, maybe in handlebars
data.logs = data.log;
c.view('upgrade/upgrade', data);
}, 'PUT');
},
function(){
store.clear('slide');
c.redirect('#/update');
}
);
});
// Download SSL Certificate Authority // Download SSL Certificate Authority
app.get('#/tools/ca', function (c) { app.get('#/tools/ca', function (c) {