mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Add more detailed error output recently added to the lists page to the query log action buttons
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@ if(isset($setupVars["API_PRIVACY_MODE"]))
|
||||
</div>
|
||||
<div id="alFailure" class="alert alert-danger alert-dismissible fade in" role="alert" hidden="true">
|
||||
<button type="button" class="close" data-hide="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
Failure! Something went wrong.
|
||||
Failure! Something went wrong.<span id="err"></span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
@@ -107,6 +107,7 @@ function add() {
|
||||
},
|
||||
error: function(jqXHR, exception) {
|
||||
alFailure.show();
|
||||
err.html("");
|
||||
alFailure.delay(1000).fadeOut(2000, function() {
|
||||
alFailure.hide();
|
||||
});
|
||||
|
||||
@@ -22,6 +22,7 @@ function add(domain,list) {
|
||||
alDomain.html(domain);
|
||||
var alSuccess = $("#alSuccess");
|
||||
var alFailure = $("#alFailure");
|
||||
var err = $("#err");
|
||||
|
||||
if(list === "white")
|
||||
{
|
||||
@@ -43,7 +44,8 @@ function add(domain,list) {
|
||||
if (response.indexOf("not a valid argument") >= 0 || response.indexOf("is not a valid domain") >= 0)
|
||||
{
|
||||
alFailure.show();
|
||||
alFailure.delay(1000).fadeOut(2000, function() { alFailure.hide(); });
|
||||
err.html(response);
|
||||
alFailure.delay(4000).fadeOut(2000, function() { alFailure.hide(); });
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -58,6 +60,7 @@ function add(domain,list) {
|
||||
},
|
||||
error: function(jqXHR, exception) {
|
||||
alFailure.show();
|
||||
err.html("");
|
||||
alFailure.delay(1000).fadeOut(2000, function() {
|
||||
alFailure.hide();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user