diff --git a/assets/webconfig/js/content_dashboard.js b/assets/webconfig/js/content_dashboard.js index 19813502..cafb3bdd 100644 --- a/assets/webconfig/js/content_dashboard.js +++ b/assets/webconfig/js/content_dashboard.js @@ -80,17 +80,20 @@ $(document).ready( function() { $('#dash_ports').html(window.serverConfig.flatbufServer.port+' | '+window.serverConfig.protoServer.port); $('#dash_versionbranch').html(window.serverConfig.general.versionBranch); - getReleases(function(){ - var cleanLatestVersion = window.latestVersion.tag_name.replace(/\./g, ''); - var cleanCurrentVersion = window.currentVersion.replace(/\./g, ''); + getReleases(function(callback){ + if(callback) + { + var cleanLatestVersion = window.latestVersion.tag_name.replace(/\./g, ''); + var cleanCurrentVersion = window.currentVersion.replace(/\./g, ''); - $('#dash_latev').html(window.currentVersion); - $('#dash_latev').html(window.latestVersion.tag_name + ' (' + (window.latestVersion.prerelease == true ? "Beta" : "Stable") + ')'); + $('#dash_latev').html(window.currentVersion); + $('#dash_latev').html(window.latestVersion.tag_name + ' (' + (window.latestVersion.prerelease == true ? "Beta" : "Stable") + ')'); - if ( cleanCurrentVersion < cleanLatestVersion ) - $('#versioninforesult').html('
'+$.i18n('dashboard_infobox_message_updatewarning', window.latestVersion.tag_name) + ' (' + (window.latestVersion.prerelease == true ? "Beta" : "Stable") + ')
'); - else - $('#versioninforesult').html('
'+$.i18n('dashboard_infobox_message_updatesuccess')+'
'); + if ( cleanCurrentVersion < cleanLatestVersion ) + $('#versioninforesult').html('
'+$.i18n('dashboard_infobox_message_updatewarning', window.latestVersion.tag_name) + ' (' + (window.latestVersion.prerelease == true ? "Beta" : "Stable") + ')
'); + else + $('#versioninforesult').html('
'+$.i18n('dashboard_infobox_message_updatesuccess')+'
'); + } });