mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
New: Filter history by event (all/grabbed/imported/failed)
This commit is contained in:
@@ -3,8 +3,9 @@ define(
|
||||
[
|
||||
'History/HistoryModel',
|
||||
'backbone.pageable',
|
||||
'Mixins/AsFilteredCollection',
|
||||
'Mixins/AsPersistedStateCollection'
|
||||
], function (HistoryModel, PageableCollection, AsPersistedStateCollection) {
|
||||
], function (HistoryModel, PageableCollection, AsFilteredCollection, AsPersistedStateCollection) {
|
||||
var collection = PageableCollection.extend({
|
||||
url : window.NzbDrone.ApiRoot + '/history',
|
||||
model: HistoryModel,
|
||||
@@ -27,6 +28,13 @@ define(
|
||||
}
|
||||
},
|
||||
|
||||
filterModes: {
|
||||
'all' : [null, null],
|
||||
'grabbed' : ['eventType', '1'],
|
||||
'imported' : ['eventType', '3'],
|
||||
'failed' : ['eventType', '4']
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
delete this.queryParams.episodeId;
|
||||
|
||||
@@ -50,5 +58,6 @@ define(
|
||||
}
|
||||
});
|
||||
|
||||
return AsPersistedStateCollection.apply(collection);
|
||||
collection = AsFilteredCollection.call(collection);
|
||||
return AsPersistedStateCollection.call(collection);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user