Lidarr/UI/ServerStatus.js

21 lines
525 B
JavaScript
Raw Normal View History

2013-09-14 07:10:19 +00:00
window.NzbDrone = {};
window.NzbDrone.ApiRoot = '/api';
var statusText = $.ajax({
2013-06-22 06:24:24 +00:00
type : 'GET',
2013-09-14 07:10:19 +00:00
url : window.NzbDrone.ApiRoot + '/system/status',
2013-06-21 01:43:58 +00:00
async: false
}).responseText;
2013-09-14 07:10:19 +00:00
window.NzbDrone.ServerStatus = JSON.parse(statusText);
2013-07-10 05:11:57 +00:00
2013-09-14 07:10:19 +00:00
var footerText = window.NzbDrone.ServerStatus.version;
$(document).ready(function () {
2013-09-14 07:10:19 +00:00
if (window.NzbDrone.ServerStatus.branch != 'master') {
footerText += '</br>' + window.NzbDrone.ServerStatus.branch;
}
$('#footer-region .version').html(footerText);
});