mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Repurposed the Missing page to include filter options and display episodes that haven't reached cutoff.
--HG-- rename : src/NzbDrone.Api/Missing/MissingModule.cs => src/NzbDrone.Api/Wanted/MissingModule.cs rename : src/UI/Missing/ControlsColumnTemplate.html => src/UI/Wanted/ControlsColumnTemplate.html rename : src/UI/Missing/MissingCollection.js => src/UI/Wanted/Missing/MissingCollection.js rename : src/UI/Missing/MissingLayout.js => src/UI/Wanted/WantedLayout.js rename : src/UI/Missing/MissingLayoutTemplate.html => src/UI/Wanted/WantedLayoutTemplate.html extra : source : 2c76f3e423d39446f3bd7799b7344d7be63c70f5
This commit is contained in:

committed by
Mark McDowall

parent
935c26d03e
commit
d416dd4177
54
src/UI/Wanted/Cutoff/CutoffUnmetCollection.js
Normal file
54
src/UI/Wanted/Cutoff/CutoffUnmetCollection.js
Normal file
@@ -0,0 +1,54 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'underscore',
|
||||
'Series/EpisodeModel',
|
||||
'backbone.pageable',
|
||||
'Mixins/AsFilteredCollection',
|
||||
'Mixins/AsPersistedStateCollection'
|
||||
], function (_, EpisodeModel, PagableCollection, AsFilteredCollection, AsPersistedStateCollection) {
|
||||
var collection = PagableCollection.extend({
|
||||
url : window.NzbDrone.ApiRoot + '/wanted/cutoff',
|
||||
model: EpisodeModel,
|
||||
tableName: 'wanted.cutoff',
|
||||
|
||||
state: {
|
||||
pageSize : 15,
|
||||
sortKey : 'airDateUtc',
|
||||
order : 1
|
||||
},
|
||||
|
||||
queryParams: {
|
||||
totalPages : null,
|
||||
totalRecords: null,
|
||||
pageSize : 'pageSize',
|
||||
sortKey : 'sortKey',
|
||||
order : 'sortDir',
|
||||
directions : {
|
||||
'-1': 'asc',
|
||||
'1' : 'desc'
|
||||
}
|
||||
},
|
||||
|
||||
// Filter Modes
|
||||
filterModes: {
|
||||
'monitored' : ['monitored', 'true'],
|
||||
'unmonitored' : ['monitored', 'false'],
|
||||
},
|
||||
|
||||
parseState: function (resp) {
|
||||
return {totalRecords: resp.totalRecords};
|
||||
},
|
||||
|
||||
parseRecords: function (resp) {
|
||||
if (resp) {
|
||||
return resp.records;
|
||||
}
|
||||
|
||||
return resp;
|
||||
}
|
||||
});
|
||||
|
||||
collection = AsFilteredCollection.call(collection);
|
||||
return AsPersistedStateCollection.call(collection);
|
||||
});
|
Reference in New Issue
Block a user