mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Remove calls to /version, use /diagnosis instead
This commit is contained in:
parent
5beb60d9cb
commit
28c788f38e
5 changed files with 7 additions and 15 deletions
|
@ -78,6 +78,8 @@
|
|||
});
|
||||
|
||||
c.api("/diagnosis", function(data) {
|
||||
versions = data.packages;
|
||||
$('#yunohost-version').html(y18n.t('footer_version', [versions.yunohost.version, versions.yunohost.repo]));
|
||||
if (data.security["CVE-2017-5754"].vulnerable) {
|
||||
c.flash('danger', y18n.t('meltdown'));
|
||||
}
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
delete monitorData.network.usage.lo;
|
||||
|
||||
// Get YunoHost versions too
|
||||
c.api('/version', function(versions) {
|
||||
monitorData.versions = versions;
|
||||
c.api('/diagnosis', function(diagnosis) {
|
||||
monitorData.versions = diagnosis.packages;
|
||||
c.view('tools/tools_monitoring', monitorData);
|
||||
});
|
||||
});
|
||||
|
@ -47,4 +47,4 @@
|
|||
}, 'GET');
|
||||
});
|
||||
|
||||
})();
|
||||
})();
|
||||
|
|
|
@ -223,8 +223,8 @@
|
|||
|
||||
// Packages version
|
||||
app.get('#/tools/versions', function (c) {
|
||||
c.api('/version', function(versions) {
|
||||
c.view('tools/tools_versions', {'versions' : versions});
|
||||
c.api('/diagnosis', function(diagnosis) {
|
||||
c.view('tools/tools_versions', {'versions' : diagnosis.packages });
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
*
|
||||
*/
|
||||
app.bind('login', function(e, data) {
|
||||
this.api('/version', function(versions) {
|
||||
$('#yunohost-version').html(y18n.t('footer_version', [versions.yunohost.version, versions.yunohost.repo]));
|
||||
});
|
||||
});
|
||||
|
||||
app.bind('logout', function(e, data) {
|
||||
|
|
|
@ -149,13 +149,6 @@
|
|||
// Store url
|
||||
sam.store.set('url', window.location.hostname + '/yunohost/api');
|
||||
|
||||
// Get YunoHost version
|
||||
if (sam.store.get('connected')) {
|
||||
this.api('/version', function(versions) {
|
||||
$('#yunohost-version').html(y18n.t('footer_version', [versions.yunohost.version, versions.yunohost.repo]));
|
||||
});
|
||||
}
|
||||
|
||||
// Flash messages
|
||||
var flashMessage = $('#flashMessage');
|
||||
$('#toggle-btn', flashMessage).click(function(e) {
|
||||
|
|
Loading…
Reference in a new issue