Garfield69
2019-04-21 09:52:09 +12:00
parent c88a213b2e
commit 11e8d4d290
2 changed files with 20 additions and 18 deletions

View File

@@ -222,12 +222,12 @@ function displayUnconfiguredIndexersList() {
doNotify("Configuration failed: " + data.error, "danger", "glyphicon glyphicon-alert"); doNotify("Configuration failed: " + data.error, "danger", "glyphicon glyphicon-alert");
} }
}).fail(function (data) { }).fail(function (data) {
if(data.responseJSON.error !== undefined) { if(data.responseJSON.error !== undefined) {
doNotify("An error occured while configuring this indexer<br /><b>" + data.responseJSON.error + "</b><br /><i><a href=\"https://github.com/Jackett/Jackett/issues/new?title=[" + indexerId + "] " + data.responseJSON.error + " (Config)\" target=\"_blank\">Click here to open an issue on GitHub for this indexer.</a><i>", "danger", "glyphicon glyphicon-alert", false); var indexEnd = 2048 - "https://github.com/Jackett/Jackett/issues/new?title=[".length - indexerId.length - "] ".length - " (Config)".length; // keep url <= 2k #5104
} else { doNotify("An error occured while configuring this indexer<br /><b>" + data.responseJSON.error.substring(0, indexEnd) + "</b><br /><i><a href=\"https://github.com/Jackett/Jackett/issues/new?title=[" + indexerId + "] " + data.responseJSON.error.substring(0, indexEnd) + " (Config)\" target=\"_blank\">Click here to open an issue on GitHub for this indexer.</a><i>", "danger", "glyphicon glyphicon-alert", false);
doNotify("An error occured while configuring this indexer, is Jackett server running ?", "danger", "glyphicon glyphicon-alert"); } else {
} doNotify("An error occured while configuring this indexer, is Jackett server running ?", "danger", "glyphicon glyphicon-alert");
}
}); });
}); });
}); });
@@ -444,12 +444,13 @@ function testIndexer(id, notifyResult) {
doNotify("Test failed for " + id + ": \n" + data.error, "danger", "glyphicon glyphicon-alert"); doNotify("Test failed for " + id + ": \n" + data.error, "danger", "glyphicon glyphicon-alert");
} }
}).fail(function (data) { }).fail(function (data) {
updateTestState(id, "error", data.error, indexers); updateTestState(id, "error", data.error, indexers);
if(data.responseJSON.error !== undefined && notifyResult) { if(data.responseJSON.error !== undefined && notifyResult) {
doNotify("An error occured while testing this indexer<br /><b>" + data.responseJSON.error + "</b><br /><i><a href=\"https://github.com/Jackett/Jackett/issues/new?title=[" + id + "] " + data.responseJSON.error + " (Test)\" target=\"_blank\">Click here to open an issue on GitHub for this indexer.</a><i>", "danger", "glyphicon glyphicon-alert", false); var indexEnd = 2048 - "https://github.com/Jackett/Jackett/issues/new?title=[".length - id.length - "] ".length - " (Test)".length; // keep url <= 2k #5104
} else { doNotify("An error occured while testing this indexer<br /><b>" + data.responseJSON.error.substring(0, indexEnd) + "</b><br /><i><a href=\"https://github.com/Jackett/Jackett/issues/new?title=[" + id + "] " + data.responseJSON.error.substring(0, indexEnd) + " (Test)\" target=\"_blank\">Click here to open an issue on GitHub for this indexer.</a><i>", "danger", "glyphicon glyphicon-alert", false);
doNotify("An error occured while testing indexers, please take a look at indexers with failed test for more informations.", "danger", "glyphicon glyphicon-alert"); } else {
} doNotify("An error occured while testing indexers, please take a look at indexers with failed test for more informations.", "danger", "glyphicon glyphicon-alert");
}
}); });
} }
@@ -651,11 +652,12 @@ function populateSetupForm(indexerId, name, config, caps, link, alternativesitel
doNotify("Configuration failed: " + data.error, "danger", "glyphicon glyphicon-alert"); doNotify("Configuration failed: " + data.error, "danger", "glyphicon glyphicon-alert");
} }
}).fail(function (data) { }).fail(function (data) {
if(data.responseJSON.error !== undefined) { if(data.responseJSON.error !== undefined) {
doNotify("An error occured while updating this indexer<br /><b>" + data.responseJSON.error + "</b><br /><i><a href=\"https://github.com/Jackett/Jackett/issues/new?title=[" + indexerId + "] " + data.responseJSON.error + " (Config)\" target=\"_blank\">Click here to open an issue on GitHub for this indexer.</a><i>", "danger", "glyphicon glyphicon-alert", false); var indexEnd = 2048 - "https://github.com/Jackett/Jackett/issues/new?title=[".length - indexerId.length - "] ".length - " (Config)".length; // keep url <= 2k #5104
} else { doNotify("An error occured while updating this indexer<br /><b>" + data.responseJSON.error.substring(0, indexEnd) + "</b><br /><i><a href=\"https://github.com/Jackett/Jackett/issues/new?title=[" + indexerId + "] " + data.responseJSON.error.substring(0, indexEnd) + " (Config)\" target=\"_blank\">Click here to open an issue on GitHub for this indexer.</a><i>", "danger", "glyphicon glyphicon-alert", false);
doNotify("An error occured while updating this indexer, request to Jackett server failed, is server running ?", "danger", "glyphicon glyphicon-alert"); } else {
} doNotify("An error occured while updating this indexer, request to Jackett server failed, is server running ?", "danger", "glyphicon glyphicon-alert");
}
}).always(function () { }).always(function () {
$goButton.html(originalBtnText); $goButton.html(originalBtnText);
$goButton.prop('disabled', false); $goButton.prop('disabled', false);

View File

@@ -671,6 +671,6 @@
</script> </script>
<script type="text/javascript" src="../libs/api.js?changed=2017083001"></script> <script type="text/javascript" src="../libs/api.js?changed=2017083001"></script>
<script type="text/javascript" src="../custom.js?changed=20190401"></script> <script type="text/javascript" src="../custom.js?changed=20190421"></script>
</body> </body>
</html> </html>