mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-13 16:43:58 -07:00
System page added, with link to logs
This commit is contained in:
parent
625acef635
commit
a9ac2500d5
9 changed files with 132 additions and 5 deletions
74
UI/System/Layout.js
Normal file
74
UI/System/Layout.js
Normal file
|
@ -0,0 +1,74 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'app',
|
||||
'marionette',
|
||||
'System/StatusModel',
|
||||
'System/About/View',
|
||||
'Logs/Layout',
|
||||
'Shared/Toolbar/ToolbarLayout',
|
||||
'Shared/LoadingView'
|
||||
], function (App,
|
||||
Marionette,
|
||||
StatusModel,
|
||||
AboutView,
|
||||
LogsLayout,
|
||||
ToolbarLayout,
|
||||
LoadingView) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'System/LayoutTemplate',
|
||||
|
||||
regions: {
|
||||
toolbar : '#toolbar',
|
||||
about : '#about',
|
||||
loading : '#loading'
|
||||
},
|
||||
|
||||
leftSideButtons: {
|
||||
type : 'default',
|
||||
storeState: false,
|
||||
items :
|
||||
[
|
||||
{
|
||||
title: 'Logs',
|
||||
icon : 'icon-book',
|
||||
route: 'logs'
|
||||
},
|
||||
// {
|
||||
// title : 'Restart',
|
||||
// icon : 'icon-repeat',
|
||||
// command : 'restart',
|
||||
// successMessage: 'NzbDrone restart has been triggered',
|
||||
// errorMessage : 'Failed to restart NzbDrone'
|
||||
// },
|
||||
// {
|
||||
// title : 'Shutdown',
|
||||
// icon : 'icon-power-off',
|
||||
// command : 'shutdown',
|
||||
// successMessage: 'NzbDrone shutdown has started',
|
||||
// errorMessage : 'Failed to shutdown NzbDrone'
|
||||
// }
|
||||
]
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
this.statusModel = StatusModel;
|
||||
},
|
||||
|
||||
onRender: function () {
|
||||
this._showToolbar();
|
||||
this.about.show(new AboutView({ model: this.statusModel }));
|
||||
},
|
||||
|
||||
_showToolbar: function () {
|
||||
this.toolbar.show(new ToolbarLayout({
|
||||
left :
|
||||
[
|
||||
this.leftSideButtons
|
||||
],
|
||||
context: this
|
||||
}));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue