mirror of https://github.com/lidarr/Lidarr
Moved disk space and about to new info tab
New: Disk space visible in the UI under System Info
This commit is contained in:
parent
6c414929c3
commit
43a70f4479
|
@ -22,7 +22,7 @@ define(
|
|||
|
||||
delete xhr.data;
|
||||
}
|
||||
|
||||
|
||||
if (xhr) {
|
||||
xhr.headers = xhr.headers || {};
|
||||
xhr.headers.Authorization = window.NzbDrone.ApiKey;
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<dl class="dl-horizontal">
|
||||
<dt>Version</dt>
|
||||
<dd>{{version}}</dd>
|
||||
<dt>AppData directory</dt>
|
||||
<dd>{{appData}}</dd>
|
||||
<dt>Startup directory</dt>
|
||||
<dd>{{startupPath}}</dd>
|
||||
</dl>
|
|
@ -1,5 +0,0 @@
|
|||
<div class="row">
|
||||
<div class="span10">
|
||||
<div id="x-grid"/>
|
||||
</div>
|
||||
</div>
|
|
@ -5,7 +5,7 @@ define(
|
|||
'System/StatusModel'
|
||||
], function (Marionette, StatusModel) {
|
||||
return Marionette.ItemView.extend({
|
||||
template: 'System/About/AboutViewTemplate',
|
||||
template: 'System/Info/About/AboutViewTemplate',
|
||||
|
||||
initialize: function () {
|
||||
this.model = StatusModel;
|
|
@ -0,0 +1,13 @@
|
|||
<fieldset>
|
||||
<legend>About</legend>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Version</dt>
|
||||
<dd>{{version}}</dd>
|
||||
<dt>AppData directory</dt>
|
||||
<dd>{{appData}}</dd>
|
||||
<dt>Startup directory</dt>
|
||||
<dd>{{startupPath}}</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
define(['backbone', 'System/DiskSpace/DiskSpaceModel'],
|
||||
define(['backbone', 'System/Info/DiskSpace/DiskSpaceModel'],
|
||||
function(Backbone, DiskSpaceModel) {
|
||||
return Backbone.Collection.extend({
|
||||
url:window.NzbDrone.ApiRoot +'/diskspace',
|
|
@ -3,12 +3,12 @@ define([
|
|||
'vent',
|
||||
'marionette',
|
||||
'backgrid',
|
||||
'System/DiskSpace/DiskSpaceCollection',
|
||||
'System/Info/DiskSpace/DiskSpaceCollection',
|
||||
'Shared/LoadingView',
|
||||
'Cells/FileSizeCell'
|
||||
], function (vent,Marionette,Backgrid,DiskSpaceCollection,LoadingView,FileSizeCell) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'System/DiskSpace/DiskSpaceTemplate',
|
||||
template: 'System/Info/DiskSpace/DiskSpaceLayoutTemplate',
|
||||
|
||||
regions: {
|
||||
grid: '#x-grid'
|
|
@ -0,0 +1,5 @@
|
|||
<fieldset>
|
||||
<legend>Disk Space</legend>
|
||||
|
||||
<div id="x-grid"/>
|
||||
</fieldset>
|
|
@ -0,0 +1,26 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'backbone',
|
||||
'marionette',
|
||||
'System/Info/About/AboutView',
|
||||
'System/Info/DiskSpace/DiskSpaceLayout'
|
||||
], function (Backbone,
|
||||
Marionette,
|
||||
AboutView,
|
||||
DiskSpaceLayout) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'System/Info/SystemInfoLayoutTemplate',
|
||||
|
||||
regions: {
|
||||
about : '#about',
|
||||
diskSpace: '#diskspace'
|
||||
},
|
||||
|
||||
onRender: function () {
|
||||
this.about.show(new AboutView());
|
||||
this.diskSpace.show(new DiskSpaceLayout());
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<div class="row">
|
||||
<div class="span12" id="about"></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="span12" id="diskspace"></div>
|
||||
</div>
|
|
@ -3,38 +3,33 @@ define(
|
|||
[
|
||||
'backbone',
|
||||
'marionette',
|
||||
'System/About/AboutView',
|
||||
'System/Info/SystemInfoLayout',
|
||||
'System/Logs/LogsLayout',
|
||||
'System/Update/UpdateLayout',
|
||||
'System/DiskSpace/DiskSpaceLayout'
|
||||
'System/Update/UpdateLayout'
|
||||
], function (Backbone,
|
||||
Marionette,
|
||||
AboutView,
|
||||
SystemInfoLayout,
|
||||
LogsLayout,
|
||||
UpdateLayout,
|
||||
DiskSpaceLayout) {
|
||||
UpdateLayout) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'System/SystemLayoutTemplate',
|
||||
|
||||
regions: {
|
||||
about : '#about',
|
||||
info : '#info',
|
||||
logs : '#logs',
|
||||
updates: '#updates',
|
||||
diskSpace: '#diskspace'
|
||||
updates: '#updates'
|
||||
},
|
||||
|
||||
ui: {
|
||||
aboutTab : '.x-about-tab',
|
||||
infoTab : '.x-info-tab',
|
||||
logsTab : '.x-logs-tab',
|
||||
updatesTab: '.x-updates-tab',
|
||||
diskSpaceTab: '.x-diskspace-tab'
|
||||
updatesTab: '.x-updates-tab'
|
||||
},
|
||||
|
||||
events: {
|
||||
'click .x-about-tab' : '_showAbout',
|
||||
'click .x-info-tab' : '_showInfo',
|
||||
'click .x-logs-tab' : '_showLogs',
|
||||
'click .x-updates-tab': '_showUpdates',
|
||||
'click .x-diskspace-tab':'_showDiskSpace'
|
||||
'click .x-updates-tab': '_showUpdates'
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
|
@ -51,10 +46,8 @@ define(
|
|||
case 'updates':
|
||||
this._showUpdates();
|
||||
break;
|
||||
case 'diskspace':
|
||||
this._showDiskSpace();
|
||||
default:
|
||||
this._showAbout();
|
||||
this._showInfo();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -62,14 +55,14 @@ define(
|
|||
Backbone.history.navigate(route);
|
||||
},
|
||||
|
||||
_showAbout: function (e) {
|
||||
_showInfo: function (e) {
|
||||
if (e) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
this.about.show(new AboutView());
|
||||
this.ui.aboutTab.tab('show');
|
||||
this._navigate('system/about');
|
||||
this.info.show(new SystemInfoLayout());
|
||||
this.ui.infoTab.tab('show');
|
||||
this._navigate('system/info');
|
||||
},
|
||||
|
||||
_showLogs: function (e) {
|
||||
|
@ -90,14 +83,6 @@ 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");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
<ul class="nav nav-tabs">
|
||||
<li><a href="#about" class="x-about-tab no-router">About</a></li>
|
||||
<li><a href="#info" class="x-info-tab no-router">Info</a></li>
|
||||
<li><a href="#logs" class="x-logs-tab no-router">Logs</a></li>
|
||||
<li><a href="#updates" class="x-updates-tab no-router">Updates</a></li>
|
||||
<li><a href="#diskspace" class="x-diskspace-tab no-router">Disk Space</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane" id="about"></div>
|
||||
<div class="tab-pane" id="info"></div>
|
||||
<div class="tab-pane" id="logs"></div>
|
||||
<div class="tab-pane" id="updates"></div>
|
||||
<div class="tab-pane" id="diskspace"></div>
|
||||
</div>
|
Loading…
Reference in New Issue