parent
ab4e1edac0
commit
6b418276b6
@ -1,25 +0,0 @@
|
||||
window.NzbDrone.ApiRoot = '/api';
|
||||
|
||||
var statusText = window.$.ajax({
|
||||
type : 'GET',
|
||||
url : window.NzbDrone.ApiRoot + '/system/status',
|
||||
async: false,
|
||||
headers: {
|
||||
Authorization: window.NzbDrone.ApiKey
|
||||
}
|
||||
}).responseText;
|
||||
|
||||
window.NzbDrone.ServerStatus = JSON.parse(statusText);
|
||||
|
||||
var footerText = window.NzbDrone.ServerStatus.version;
|
||||
|
||||
window.$(document).ready(function () {
|
||||
if (window.NzbDrone.ServerStatus.branch !== 'master') {
|
||||
footerText += '</br>' + window.NzbDrone.ServerStatus.branch;
|
||||
}
|
||||
window.$('#footer-region .version').html(footerText);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'backbone'
|
||||
], function (Backbone) {
|
||||
'backbone',
|
||||
'api!system/status'
|
||||
], function (Backbone, statusData) {
|
||||
|
||||
var StatusModel = Backbone.Model.extend({
|
||||
url: window.NzbDrone.ApiRoot + '/system/status'
|
||||
});
|
||||
|
||||
var instance = new StatusModel();
|
||||
instance.fetch();
|
||||
var instance = new StatusModel(statusData);
|
||||
return instance;
|
||||
});
|
||||
|
Loading…
Reference in new issue