Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enh] Upgrade just one app #172

Merged
merged 5 commits into from Oct 6, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 22 additions & 1 deletion src/js/yunohost/controllers/tools.js
Expand Up @@ -95,6 +95,27 @@
);
}
});

// 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) {
Expand Down Expand Up @@ -172,4 +193,4 @@
});
});

})();
})();
1 change: 1 addition & 0 deletions src/locales/en.json
Expand Up @@ -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 %s?",
"confirm_upnp_enable": "Are you sure you want to enable UPnP?",
"confirm_upnp_disable": "Are you sure you want to disable UPnP?",
"connection": "Connection",
Expand Down
11 changes: 8 additions & 3 deletions src/views/update/update.ms
Expand Up @@ -42,9 +42,14 @@
{{#if apps}}
<div class="list-group">
{{#apps}}
<div class="list-group-item">
<h3 class="list-group-item-heading">{{label}} <small>{{id}}</small></h3>
</div>
<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">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

next link should now be "Upgrade all applications" to be more explicit

Expand Down