diff --git a/src/js/yunohost/controllers/tools.js b/src/js/yunohost/controllers/tools.js index b4bdb475..1e18c72d 100644 --- a/src/js/yunohost/controllers/tools.js +++ b/src/js/yunohost/controllers/tools.js @@ -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) {