diff --git a/src/js/yunohost/controllers/tools.js b/src/js/yunohost/controllers/tools.js index d9afa496..522973ec 100644 --- a/src/js/yunohost/controllers/tools.js +++ b/src/js/yunohost/controllers/tools.js @@ -49,23 +49,13 @@ // System update & upgrade app.get('#/update', function (c) { c.api('/update', function(data) { - var packagesLength = data.packages.length; - for(var i = 0; i < packagesLength; i++) { - data.packages[i].delayed = false; - - // Check for special packages that need delayed upgrade. - if (["moulinette", "yunohost", "yunohost-admin", "ssowat", "python"].indexOf(data.packages[i].name) != -1) { - c.flash('warning', y18n.t('system_delayed_upgrade_warning', [data.packages[i].name])); - data.packages[i].delayed = true; - } - } c.view('update/update', data); }, 'PUT'); }); // Upgrade apps or packages app.get('#/upgrade/:type', function (c) { - if (c.params['type'] !== 'apps' && c.params['type'] !== 'packages') { + if (c.params['type'] !== 'apps' && c.params['type'] !== 'system') { c.flash('fail', y18n.t('unknown_argument', [c.params['type']])); store.clear('slide'); c.redirect('#/update'); @@ -76,16 +66,9 @@ // confirm_update_apps and confirm_update_packages y18n.t('confirm_update_' + c.params['type'].toLowerCase()), function(){ - var endurl = ''; - if (c.params['type'] == 'packages') {endurl = 'ignore_apps';} - else if (c.params['type'] == 'apps') {endurl = 'ignore_packages';} - - c.api('/upgrade?'+endurl, function(data) { - // 'log' is a reserved name, maybe in handlebars - data.logs = data.log; - c.view('upgrade/upgrade', data); + c.api('/upgrade?'+c.params["type"], function(data) { + c.view('home', data); }, 'PUT'); - }, function(){ store.clear('slide'); diff --git a/src/locales/en.json b/src/locales/en.json index cf19f225..255b30a2 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -88,7 +88,7 @@ "confirm_service_disable": "Are you sure you want to disable %s?", "confirm_uninstall": "Are you sure you want to uninstall %s?", "confirm_update_apps": "Are you sure you want to update all applications?", - "confirm_update_packages": "Are you sure you want to update all packages?", + "confirm_update_system": "Are you sure you want to update all system packages?", "confirm_update_specific_app": "Are you sure you want to update %s?", "confirm_upnp_enable": "Are you sure you want to enable UPnP?", "confirm_upnp_disable": "Are you sure you want to disable UPnP?", @@ -306,8 +306,6 @@ "system": "System", "system_apps": "Apps", "system_apps_nothing": "There are no apps to upgrade.", - "system_delayed_upgrade": "Delayed upgrade", - "system_delayed_upgrade_warning": "%s will be upgraded automatically within the next hour.", "system_packages": "Packages", "system_packages_nothing": "There are no packages to upgrade.", "system_update": "System update", diff --git a/src/views/update/update.ms b/src/views/update/update.ms index c3a7a2ee..8da85135 100644 --- a/src/views/update/update.ms +++ b/src/views/update/update.ms @@ -9,23 +9,18 @@