1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2025-03-06 11:40:00 +00:00
Sonarr/UI/ServerStatus.js

21 lines
525 B
JavaScript
Raw Normal View History

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