mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Make indexer list sortable/searchable by error message
This commit is contained in:
@@ -131,7 +131,7 @@ function displayConfiguredIndexersList(indexers) {
|
|||||||
prepareSetupButtons(indexersTable);
|
prepareSetupButtons(indexersTable);
|
||||||
prepareDeleteButtons(indexersTable);
|
prepareDeleteButtons(indexersTable);
|
||||||
prepareCopyButtons(indexersTable);
|
prepareCopyButtons(indexersTable);
|
||||||
indexersTable.find("table").DataTable(
|
indexersTable.find("table").dataTable(
|
||||||
{
|
{
|
||||||
"stateSave": true,
|
"stateSave": true,
|
||||||
"pageLength": -1,
|
"pageLength": -1,
|
||||||
@@ -147,8 +147,8 @@ function displayConfiguredIndexersList(indexers) {
|
|||||||
{
|
{
|
||||||
"targets": 1,
|
"targets": 1,
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"searchable": false,
|
"searchable": true,
|
||||||
"orderable": false
|
"orderable": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
@@ -339,9 +339,20 @@ function prepareSetupButtons(element) {
|
|||||||
function updateTestState(id, state, message, parent)
|
function updateTestState(id, state, message, parent)
|
||||||
{
|
{
|
||||||
var btn = parent.find(".indexer-button-test[data-id=" +id + "]");
|
var btn = parent.find(".indexer-button-test[data-id=" +id + "]");
|
||||||
|
|
||||||
|
var sortmsg = message;
|
||||||
|
if (!sortmsg || state == "success")
|
||||||
|
sortmsg = "";
|
||||||
|
|
||||||
|
var td = btn.closest("td");
|
||||||
|
td.attr("data-sort", sortmsg);
|
||||||
|
td.attr("data-filter", sortmsg);
|
||||||
|
|
||||||
if (message) {
|
if (message) {
|
||||||
btn.tooltip("hide");
|
btn.tooltip("hide");
|
||||||
|
btn.attr("title", message);
|
||||||
btn.data('bs.tooltip', false).tooltip({ title: message });
|
btn.data('bs.tooltip', false).tooltip({ title: message });
|
||||||
|
|
||||||
}
|
}
|
||||||
var icon = btn.find("span");
|
var icon = btn.find("span");
|
||||||
icon.removeClass("glyphicon-ok test-success glyphicon-alert test-error glyphicon-refresh spinner test-inprogres");
|
icon.removeClass("glyphicon-ok test-success glyphicon-alert test-error glyphicon-refresh spinner test-inprogres");
|
||||||
@@ -353,6 +364,9 @@ function updateTestState(id, state, message, parent)
|
|||||||
} else if (state == "inprogres") {
|
} else if (state == "inprogres") {
|
||||||
icon.addClass("glyphicon-refresh test-inprogres spinner");
|
icon.addClass("glyphicon-refresh test-inprogres spinner");
|
||||||
}
|
}
|
||||||
|
var dt = $.fn.dataTable.tables({ visible: true, api: true}).rows().invalidate('dom');
|
||||||
|
if (state != "inprogres")
|
||||||
|
dt.draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testIndexer(id, notifyResult) {
|
function testIndexer(id, notifyResult) {
|
||||||
@@ -382,8 +396,9 @@ function prepareTestButtons(element) {
|
|||||||
var $btn = $(btn);
|
var $btn = $(btn);
|
||||||
var id = $btn.data("id");
|
var id = $btn.data("id");
|
||||||
var state = $btn.data("state");
|
var state = $btn.data("state");
|
||||||
|
var title = $btn.attr("title");
|
||||||
$btn.tooltip();
|
$btn.tooltip();
|
||||||
updateTestState(id, state, null, element);
|
updateTestState(id, state, title, element);
|
||||||
$btn.click(function () {
|
$btn.click(function () {
|
||||||
testIndexer(id, true);
|
testIndexer(id, true);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user