[enh] Upgrade just one app

This commit is contained in:
ljf 2017-08-28 17:35:21 +02:00
parent b3a4419a3d
commit 8b726186ea
3 changed files with 33 additions and 4 deletions

View file

@ -96,6 +96,29 @@
}
});
// Upgrade a specific apps
app.get('#/upgrade/apps/:app', function (c) {
c.confirm(
y18n.t('tools'),
// confirm_update_apps and confirm_update_packages
y18n.t('confirm_update_specific_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) {
c.view('tools/tools_ca');

View file

@ -76,6 +76,7 @@
"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_specific_app": "Are you sure you want to update this application ?",
"confirm_upnp_enable": "Are you sure you want to enable UPnP?",
"confirm_upnp_disable": "Are you sure you want to disable UPnP?",
"connection": "Connection",

View file

@ -42,9 +42,14 @@
{{#if apps}}
<div class="list-group">
{{#apps}}
<div class="list-group-item">
<div class="list-group-item"><div class="row"><div class="col-md-12">
<div class="pull-left">
<h3 class="list-group-item-heading">{{label}} <small>{{id}}</small></h3>
</div>
<div class="pull-right">
<a href="#/upgrade/apps/{{id}}" class="btn btn-success">{{t 'system_upgrade_btn'}}</a>
</div>
</div></div></div>
{{/apps}}
</div>
<div class="panel-footer">