sonarr-repo-only/UI/ServerStatus.js

23 lines
571 B
JavaScript
Raw Normal View History

2013-09-14 07:10:19 +00:00
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-09-20 07:31:02 +00:00
async: false,
headers: {
2013-09-20 22:19:48 +00:00
Authorization: window.NzbDrone.ApiKey
2013-09-20 07:31:02 +00:00
}
}).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);
});