[feature] Indexer Test status filter (#11705) Partial solution for #3292

This commit is contained in:
Alessio Gogna
2021-05-15 23:52:12 +02:00
committed by GitHub
parent 51f7d6c306
commit 6dab689533
9 changed files with 170 additions and 39 deletions

View File

@@ -84,6 +84,10 @@ function tag_filter(indexer) {
return indexer.tags.map(t => t.toLowerCase()).indexOf(this.value.toLowerCase()) > -1;
}
function state_filter(indexer) {
return indexer.state == this.value;
}
function getJackettConfig(callback) {
api.getServerConfig(callback).fail(function () {
doNotify("Error loading Jackett settings, request to Jackett server failed, is server running ?", "danger", "glyphicon glyphicon-alert");
@@ -211,6 +215,9 @@ function configureFilters(indexers) {
availableFilters.push(f);
}
availableFilters.push({id: "test:passed", apply: state_filter, value: "success" });
availableFilters.push({id: "test:failed", apply: state_filter, value: "error" });
["public", "private", "semi-private"]
.map(t => { return { id: "type:" + t, apply: type_filter, value: t } })
.forEach(add);
@@ -606,6 +613,10 @@ function updateTestState(id, state, message, parent) {
}).rows().invalidate('dom');
if (state != "inprogres")
dt.draw();
var indexer = configuredIndexers.find(x => x.id == id);
if (indexer)
indexer.state = state;
}
function testIndexer(id, notifyResult) {