mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Added commands to delete logs and log files (separately)
This commit is contained in:
parent
e152ecc55d
commit
1274c1c144
12 changed files with 191 additions and 28 deletions
|
@ -53,19 +53,6 @@ define(
|
|||
}
|
||||
],
|
||||
|
||||
leftSideButtons: {
|
||||
type : 'default',
|
||||
storeState: false,
|
||||
items :
|
||||
[
|
||||
{
|
||||
title: 'Files',
|
||||
icon : 'icon-file',
|
||||
route: 'logs/files'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
this.collection = new LogCollection();
|
||||
this.collection.fetch();
|
||||
|
@ -92,13 +79,48 @@ define(
|
|||
},
|
||||
|
||||
_showToolbar: function () {
|
||||
var leftSideButtons = {
|
||||
type : 'default',
|
||||
storeState: false,
|
||||
items :
|
||||
[
|
||||
{
|
||||
title : 'Refresh',
|
||||
icon : 'icon-refresh',
|
||||
ownerContext : this,
|
||||
callback : this._refreshLogs
|
||||
},
|
||||
|
||||
{
|
||||
title : 'Clear Logs',
|
||||
icon : 'icon-trash',
|
||||
command : 'clearLog',
|
||||
successMessage : 'Logs have been cleared',
|
||||
errorMessage : 'Failed to clear logs',
|
||||
ownerContext : this,
|
||||
successCallback: this._refreshLogs
|
||||
},
|
||||
|
||||
{
|
||||
title: 'Files',
|
||||
icon : 'icon-file',
|
||||
route: 'logs/files'
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
this.toolbar.show(new ToolbarLayout({
|
||||
left :
|
||||
[
|
||||
this.leftSideButtons
|
||||
leftSideButtons
|
||||
],
|
||||
context: this
|
||||
}));
|
||||
},
|
||||
|
||||
_refreshLogs: function () {
|
||||
this.collection.fetch({ reset: true });
|
||||
this._showTable();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue