Fix outdated check on dashboard
This commit is contained in:
parent
d6e2621b74
commit
f26b9a5a10
1 changed files with 9 additions and 0 deletions
|
@ -407,6 +407,11 @@
|
||||||
latestRelease = release.tag_name
|
latestRelease = release.tag_name
|
||||||
latestVersion = parseInt(release.tag_name.split('.').join(""));
|
latestVersion = parseInt(release.tag_name.split('.').join(""));
|
||||||
currentVersion = parseInt(json.current_version.split('.').join(""));
|
currentVersion = parseInt(json.current_version.split('.').join(""));
|
||||||
|
|
||||||
|
if (currentVersion < 1000) {
|
||||||
|
currentVersion = currentVersion * 10;
|
||||||
|
}
|
||||||
|
|
||||||
if (latestVersion > currentVersion) {
|
if (latestVersion > currentVersion) {
|
||||||
$("#updateNotificationBar").html('<div class="alert alert-info alert-dismissable fade in">' +
|
$("#updateNotificationBar").html('<div class="alert alert-info alert-dismissable fade in">' +
|
||||||
'<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>' +
|
'<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>' +
|
||||||
|
@ -681,6 +686,10 @@
|
||||||
function version( data, type, row ) {
|
function version( data, type, row ) {
|
||||||
var clientVersion = parseInt(row.client_status.version.split('.').join(""));
|
var clientVersion = parseInt(row.client_status.version.split('.').join(""));
|
||||||
|
|
||||||
|
if (clientVersion < 1000) {
|
||||||
|
clientVersion = clientVersion * 10;
|
||||||
|
}
|
||||||
|
|
||||||
if (latestVersion > clientVersion) {
|
if (latestVersion > clientVersion) {
|
||||||
return '<span data-toggle="tooltip" title="Outdated"><div class="offline">' + data + '</div></span>';
|
return '<span data-toggle="tooltip" title="Outdated"><div class="offline">' + data + '</div></span>';
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue