mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Simpler way to fetch versions
This commit is contained in:
parent
63bfece294
commit
394694e006
1 changed files with 2 additions and 4 deletions
|
@ -181,10 +181,8 @@
|
||||||
sam.store.set('url', window.location.hostname + '/yunohost/api');
|
sam.store.set('url', window.location.hostname + '/yunohost/api');
|
||||||
|
|
||||||
if (sam.store.get('connected')) {
|
if (sam.store.get('connected')) {
|
||||||
this.api('GET', '/diagnosis/show?full', {}, function(data) {
|
this.api('GET', '/versions', {}, function(data) {
|
||||||
basesystem = data.reports.filter(function(r) { return r.id == "basesystem"; })[0];
|
$('#yunohost-version').html(y18n.t('footer_version', [data.yunohost.version, data.yunohost.repo]));
|
||||||
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…
Add table
Reference in a new issue