Fix outdated check on dashboard

This commit is contained in:
BenDr0id 2019-03-06 09:53:11 +01:00
parent d6e2621b74
commit f26b9a5a10

View file

@ -407,6 +407,11 @@
latestRelease = release.tag_name
latestVersion = parseInt(release.tag_name.split('.').join(""));
currentVersion = parseInt(json.current_version.split('.').join(""));
if (currentVersion < 1000) {
currentVersion = currentVersion * 10;
}
if (latestVersion > currentVersion) {
$("#updateNotificationBar").html('<div class="alert alert-info alert-dismissable fade in">' +
'<a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>' +
@ -681,6 +686,10 @@
function version( data, type, row ) {
var clientVersion = parseInt(row.client_status.version.split('.').join(""));
if (clientVersion < 1000) {
clientVersion = clientVersion * 10;
}
if (latestVersion > clientVersion) {
return '<span data-toggle="tooltip" title="Outdated"><div class="offline">' + data + '</div></span>';
} else {