mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 09:03:49 -07:00
Log file changes
New: Update log files are available in the UI Fixed: UI error after clearing log files
This commit is contained in:
parent
66873b04d4
commit
f5d46ffcd2
20 changed files with 282 additions and 85 deletions
|
@ -3,24 +3,29 @@ define(
|
|||
[
|
||||
'marionette',
|
||||
'System/Logs/Table/LogsTableLayout',
|
||||
'System/Logs/Files/LogFileLayout'
|
||||
], function (Marionette, LogsTableLayout, LogsFileLayout) {
|
||||
'System/Logs/Files/LogFileLayout',
|
||||
'System/Logs/Files/LogFileCollection',
|
||||
'System/Logs/Updates/LogFileCollection'
|
||||
], function (Marionette, LogsTableLayout, LogsFileLayout, LogFileCollection, UpdateLogFileCollection) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'System/Logs/LogsLayoutTemplate',
|
||||
|
||||
ui: {
|
||||
tableTab: '.x-table-tab',
|
||||
filesTab: '.x-files-tab'
|
||||
tableTab : '.x-table-tab',
|
||||
filesTab : '.x-files-tab',
|
||||
updateFilesTab : '.x-update-files-tab'
|
||||
},
|
||||
|
||||
regions: {
|
||||
table: '#table',
|
||||
files: '#files'
|
||||
table : '#table',
|
||||
files : '#files',
|
||||
updateFiles : '#update-files'
|
||||
},
|
||||
|
||||
events: {
|
||||
'click .x-table-tab': '_showTable',
|
||||
'click .x-files-tab': '_showFiles'
|
||||
'click .x-table-tab' : '_showTable',
|
||||
'click .x-files-tab' : '_showFiles',
|
||||
'click .x-update-files-tab' : '_showUpdateFiles'
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
|
@ -42,7 +47,22 @@ define(
|
|||
}
|
||||
|
||||
this.ui.filesTab.tab('show');
|
||||
this.files.show(new LogsFileLayout());
|
||||
this.files.show(new LogsFileLayout({
|
||||
collection: new LogFileCollection(),
|
||||
deleteFilesCommand: 'deleteLogFiles'
|
||||
}));
|
||||
},
|
||||
|
||||
_showUpdateFiles: function (e) {
|
||||
if (e) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
this.ui.updateFilesTab.tab('show');
|
||||
this.updateFiles.show(new LogsFileLayout({
|
||||
collection: new UpdateLogFileCollection(),
|
||||
deleteFilesCommand: 'deleteUpdateLogFiles'
|
||||
}));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue