mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Redirect to #/tools/logs after upgrade
This commit is contained in:
parent
d86ac8ec6a
commit
7068578b6a
1 changed files with 26 additions and 23 deletions
|
@ -60,9 +60,32 @@
|
|||
// confirm_update_apps and confirm_update_packages
|
||||
y18n.t('confirm_update_' + c.params['type'].toLowerCase()),
|
||||
function(){
|
||||
c.api('/upgrade?'+c.params["type"], function(data) {
|
||||
c.view('home', data);
|
||||
}, 'PUT');
|
||||
c.api('/upgrade?'+c.params["type"],
|
||||
function(data) {
|
||||
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(){
|
||||
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
|
||||
app.get('#/tools/ca', function (c) {
|
||||
|
|
Loading…
Reference in a new issue