mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[enh] Warn about delayed upgrades #52.
This commit is contained in:
parent
b8395c4b99
commit
f3c3607558
4 changed files with 16 additions and 0 deletions
|
@ -1411,7 +1411,14 @@ app = Sammy('#main', function (sam) {
|
|||
c.api('/update', function(data) {
|
||||
packagesLength = data.packages.length;
|
||||
for(var i = 0; i < packagesLength; i++) {
|
||||
data.packages[i].delayed = false;
|
||||
data.packages[i].changelog = data.packages[i].changelog.replace(/\n/g, '<br />');
|
||||
|
||||
// Check for special packages that need delayed upgrade.
|
||||
if (["moulinette", "moulinette-yunohost", "yunohost-admin", "yunohost-config-nginx", "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('tools/tools_update', data);
|
||||
}, 'PUT');
|
||||
|
|
|
@ -207,6 +207,8 @@
|
|||
"system_packages_nothing" : "There is no packages to upgrade.",
|
||||
"system_apps_nothing" : "There is no apps to upgrade.",
|
||||
"no_log" : "No log.",
|
||||
"system_delayed_upgrade_warning" : "<b>%s</b> will be upgraded automatically within the next hour.",
|
||||
"system_delayed_upgrade" : "Delayed upgrade",
|
||||
|
||||
"users" : "Users",
|
||||
"users_new" : "New user",
|
||||
|
|
|
@ -209,6 +209,8 @@
|
|||
"system_packages_nothing" : "Il n'y a aucun paquet à mettre à jour.",
|
||||
"system_apps_nothing" : "Il n'y a aucune application à mettre à jour.",
|
||||
"no_log" : "Aucun journal.",
|
||||
"system_delayed_upgrade_warning" : "<b>%s</b> sera mis-à-jour automatiquement durant l'heure suivante.",
|
||||
"system_delayed_upgrade" : "Mise à jour en attente",
|
||||
|
||||
"users" : "Utilisateurs",
|
||||
"users_new" : "Nouvel utilisateur",
|
||||
|
|
|
@ -15,6 +15,11 @@
|
|||
{{#if packages}}
|
||||
{{#packages}}
|
||||
<div class="list-group-item">
|
||||
{{#if delayed}}
|
||||
<span class="text-warning pull-right">
|
||||
<span class="fa-warning"></span> {{t 'system_delayed_upgrade'}}
|
||||
</span>
|
||||
{{/if}}
|
||||
<h3 class="list-group-item-heading">{{name}} <small>{{fullname}}</small></h3>
|
||||
<p class="list-group-item-text">{{{changelog}}}</p>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue