mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
System.Logs view can now be filtered by severity.
This commit is contained in:
parent
af4c351428
commit
9df0ad0bf7
7 changed files with 116 additions and 25 deletions
|
@ -4,9 +4,10 @@ define(
|
|||
[
|
||||
'backbone.pageable',
|
||||
'System/Logs/LogsModel',
|
||||
'Mixins/AsFilteredCollection',
|
||||
'Mixins/AsPersistedStateCollection'
|
||||
],
|
||||
function (PagableCollection, LogsModel, AsPersistedStateCollection) {
|
||||
function (PagableCollection, LogsModel, AsFilteredCollection, AsPersistedStateCollection) {
|
||||
var collection = PagableCollection.extend({
|
||||
url : window.NzbDrone.ApiRoot + '/log',
|
||||
model: LogsModel,
|
||||
|
@ -30,6 +31,14 @@ define(
|
|||
}
|
||||
},
|
||||
|
||||
// Filter Modes
|
||||
filterModes: {
|
||||
'all' : [null, null],
|
||||
'info' : ['level', 'Info'],
|
||||
'warn' : ['level', 'Warn'],
|
||||
'error' : ['level', 'Error']
|
||||
},
|
||||
|
||||
parseState: function (resp, queryParams, state) {
|
||||
return {totalRecords: resp.totalRecords};
|
||||
},
|
||||
|
@ -43,5 +52,7 @@ define(
|
|||
}
|
||||
});
|
||||
|
||||
return AsPersistedStateCollection.call(collection);
|
||||
collection = AsFilteredCollection.apply(collection);
|
||||
|
||||
return AsPersistedStateCollection.apply(collection);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue