mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Use the new diagnosis system to display the version number
This commit is contained in:
parent
3c9c3fc926
commit
e39d00956b
3 changed files with 8 additions and 11 deletions
|
@ -54,7 +54,6 @@
|
|||
// We want filter_args to be something like "dnsrecords,domain=yolo.test,category=xmpp"
|
||||
data.reports[i].items[j].filter_args = data.reports[i].id;
|
||||
for (prop in data.reports[i].items[j].meta) {
|
||||
console.log(prop)
|
||||
data.reports[i].items[j].filter_args = data.reports[i].items[j].filter_args + ","+prop+"="+data.reports[i].items[j].meta[prop];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -69,13 +69,10 @@
|
|||
c.flash('fail', y18n.t('error_retrieve_feed', [securityFeed]));
|
||||
});
|
||||
|
||||
c.api("GET", "/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'));
|
||||
}
|
||||
c.hideLoader();
|
||||
c.api("GET", "/diagnosis/show?full", {}, function(data) {
|
||||
basesystem = data.reports.filter(function(r) { return r.id == "basesystem"; })[0];
|
||||
version_info = basesystem.items.filter(function(i) { return (i.meta && i.meta.test && i.meta.test == "ynh_versions"); })[0];
|
||||
$('#yunohost-version').html(y18n.t('footer_version', [version_info.data.main_version, version_info.data.repo]));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -181,9 +181,10 @@
|
|||
sam.store.set('url', window.location.hostname + '/yunohost/api');
|
||||
|
||||
if (sam.store.get('connected')) {
|
||||
this.api('GET', '/diagnosis', {}, function(diagnosis) {
|
||||
versions = diagnosis.packages;
|
||||
$('#yunohost-version').html(y18n.t('footer_version', [versions.yunohost.version, versions.yunohost.repo]));
|
||||
this.api('GET', '/diagnosis/show?full', {}, function(data) {
|
||||
basesystem = data.reports.filter(function(r) { return r.id == "basesystem"; })[0];
|
||||
version_info = basesystem.items.filter(function(i) { return (i.meta && i.meta.test && i.meta.test == "ynh_versions"); })[0];
|
||||
$('#yunohost-version').html(y18n.t('footer_version', [version_info.data.main_version, version_info.data.repo]));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue