1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-22 22:15:17 -04:00

Added Disk space information to system.

(cherry picked from commit 91625019378247b1c6ab85afaee23f2855e3298b)
This commit is contained in:
fzr600dave
2013-10-10 23:31:44 +01:00
committed by Mark McDowall
parent 4510ca8fa1
commit 041e767f3d
9 changed files with 160 additions and 5 deletions
+20 -5
View File
@@ -5,31 +5,36 @@ define(
'marionette',
'System/About/AboutView',
'System/Logs/LogsLayout',
'System/Update/UpdateLayout'
'System/Update/UpdateLayout',
'System/DiskSpace/DiskSpaceLayout'
], function (Backbone,
Marionette,
AboutView,
LogsLayout,
UpdateLayout) {
UpdateLayout,
DiskSpaceLayout) {
return Marionette.Layout.extend({
template: 'System/SystemLayoutTemplate',
regions: {
about : '#about',
logs : '#logs',
updates : '#updates'
updates: '#updates',
diskSpace: '#diskspace'
},
ui: {
aboutTab : '.x-about-tab',
logsTab : '.x-logs-tab',
updatesTab: '.x-updates-tab'
updatesTab: '.x-updates-tab',
diskSpaceTab: '.x-diskspace-tab'
},
events: {
'click .x-about-tab' : '_showAbout',
'click .x-logs-tab' : '_showLogs',
'click .x-updates-tab': '_showUpdates'
'click .x-updates-tab': '_showUpdates',
'click .x-diskspace-tab':'_showDiskSpace'
},
initialize: function (options) {
@@ -46,6 +51,8 @@ define(
case 'updates':
this._showUpdates();
break;
case 'diskspace':
this._showDiskSpace();
default:
this._showAbout();
}
@@ -83,6 +90,14 @@ define(
this.updates.show(new UpdateLayout());
this.ui.updatesTab.tab('show');
this._navigate('system/updates');
},
_showDiskSpace: function (e) {
if (e) {
e.preventDefault();
}
this.diskSpace.show(new DiskSpaceLayout());
this.ui.diskSpaceTab.tab('show');
this._navigate("system/diskspace");
}
});
});