}
.alert {
margin-bottom: 4px;
+ color: #c09853;
}
.alert.alert-modal {
top: 0;
display: inline-block;
padding-left: 35px;
}
-.alert,
-.alert h4 {
- color: #c09853;
-}
-.alert h4 {
- margin: 0;
-}
.alert-success {
color: #468847;
background: #dff0d8;
border-color: #d6e9c6;
}
-.alert-success h4 {
- color: #468847;
-}
-.alert-danger,
-.alert-error {
+.alert-danger {
color: #b94a48;
background: #f2dede;
border-color: #eed3d7;
}
-.alert-danger h4,
-.alert-error h4 {
- color: #b94a48;
-}
.alert-info {
color: #3a87ad;
background: #d9edf7;
border-color: #bce8f1;
}
-.alert-info h4 {
- color: #3a87ad;
-}
#authInvalidCharFeedback,
#authUnauthorizedFeedback {
<div class="notification-area">
<noscript>
- <div class="alert alert-error"><strong>Please enable JavaScript</strong></div>
+ <div class="alert alert-danger"><strong>Please enable JavaScript</strong></div>
</noscript>
</div>
error: function (jqXHR, textStatus, errorThrown) {
neighbours_status[ind].checked = true;
function errorMessage() {
- alertMessage("alert-error", neighbours_status[ind].name + " > " +
+ alertMessage("alert-danger", neighbours_status[ind].name + " > " +
(o.errorMessage ? o.errorMessage : "Request failed") +
(errorThrown ? ": " + errorThrown : ""));
}
alertMessage("alert-success", "Request completed");
}
} else {
- alertMessage("alert-error", "Request failed");
+ alertMessage("alert-danger", "Request failed");
}
if (o.complete) o.complete();
NProgress.done();
readFile(files, callback, index = 0) {
const file = files[index];
const reader = new FileReader();
- reader.onerror = () => alertMessage("alert-error", `Error reading file: ${file.name}`);
+ reader.onerror = () => alertMessage("alert-danger", `Error reading file: ${file.name}`);
reader.onloadend = () => callback(reader.result);
reader.readAsText(file);
},
// String to array for comparison
const eltsArray = JSON.parse(elts);
if (eltsArray[0] < 0) {
- common.alertMessage("alert-modal alert-error", "Spam can not be negative");
+ common.alertMessage("alert-modal alert-danger", "Spam can not be negative");
} else if (eltsArray[1] < 0) {
- common.alertMessage("alert-modal alert-error", "Rewrite subject can not be negative");
+ common.alertMessage("alert-modal alert-danger", "Rewrite subject can not be negative");
} else if (eltsArray[2] < 0) {
- common.alertMessage("alert-modal alert-error", "Probable spam can not be negative");
+ common.alertMessage("alert-modal alert-danger", "Probable spam can not be negative");
} else if (eltsArray[3] < 0) {
- common.alertMessage("alert-modal alert-error", "Greylist can not be negative");
+ common.alertMessage("alert-modal alert-danger", "Greylist can not be negative");
} else if (descending(eltsArray)) {
common.query("saveactions", {
method: "POST",
server: server
});
} else {
- common.alertMessage("alert-modal alert-error", "Incorrect order of actions thresholds");
+ common.alertMessage("alert-modal alert-danger", "Incorrect order of actions thresholds");
}
};
if ((curr[0][0].x !== res[0][0].x) ||
(curr[0][curr[0].length - 1].x !== res[0][res[0].length - 1].x)) {
time_match = false;
- common.alertMessage("alert-error",
+ common.alertMessage("alert-danger",
"Neighbours time extents do not match. Check if time is synchronized on all servers.");
arr.splice(1); // Break out of .reduce() by mutating the source array
}
function differentVersions(neighbours_data) {
const dv = neighbours_data.some((e) => e.version !== neighbours_data[0].version);
if (dv) {
- common.alertMessage("alert-error",
+ common.alertMessage("alert-danger",
"Neighbours history backend versions do not match. Cannot display history.");
return true;
}
if (textStatus.statusText === "Unauthorized") {
invalidFeedback("#authUnauthorizedFeedback");
} else {
- common.alertMessage("alert-modal alert-error", textStatus.statusText);
+ common.alertMessage("alert-modal alert-danger", textStatus.statusText);
}
$("#connectPassword").val("");
$("#connectPassword").focus();
$("#selectorsResArea")
.val(Object.prototype.hasOwnProperty.call(json, "data") ? json.data.toString() : "");
} else {
- common.alertMessage("alert-error", "Unexpected error processing message");
+ common.alertMessage("alert-danger", "Unexpected error processing message");
}
},
server: common.getServer()
error: function (jqXHR, textStatus, errorThrown) {
if (!(alerted in sessionStorage)) {
sessionStorage.setItem(alerted, true);
- common.alertMessage("alert-error", neighbours_status[e].name + " > " +
+ common.alertMessage("alert-danger", neighbours_status[e].name + " > " +
"Cannot receive legacy stats data" + (errorThrown ? ": " + errorThrown : ""));
}
process_node_stat(e);
});
}
} else {
- common.alertMessage("alert-error", "Cannot scan data");
+ common.alertMessage("alert-danger", "Cannot scan data");
}
},
error: enable_disable_scan_btn,
errorMessage: "Cannot upload data",
statusCode: {
404: function () {
- common.alertMessage("alert-error", "Cannot upload data, no server found");
+ common.alertMessage("alert-danger", "Cannot upload data, no server found");
},
500: function () {
- common.alertMessage("alert-error", "Cannot tokenize message: no text data");
+ common.alertMessage("alert-danger", "Cannot tokenize message: no text data");
},
503: function () {
- common.alertMessage("alert-error", "Cannot tokenize message: no text data");
+ common.alertMessage("alert-danger", "Cannot tokenize message: no text data");
}
},
server: common.getServer()
common.alertMessage("alert-success", "Message successfully processed");
fillHashTable(json.hashes);
} else {
- common.alertMessage("alert-error", "Unexpected error processing message");
+ common.alertMessage("alert-danger", "Unexpected error processing message");
}
},
server: common.getServer()
uploadText(data, source, headers);
}
} else {
- common.alertMessage("alert-error", "Message source field cannot be blank");
+ common.alertMessage("alert-danger", "Message source field cannot be blank");
}
return false;
});
"use strict";
document.getElementById("loading").classList.add("d-none");
document.getElementsByClassName("notification-area")[0].innerHTML =
- "<div class=\"alert alert-error\">" +
+ "<div class=\"alert alert-danger\">" +
"<strong>Module loading error: " + e.requireType + ", module: " + e.requireModules + "</strong>" +
"<button type=\"button\" class=\"btn btn-info btn-xs float-end\" " +
"onClick=\"window.location.reload(); this.parentNode.parentNode.removeChild(this.parentNode);\" " +
page.waitForResponse((resp) => resp.url().includes("/notfound") && !resp.ok()),
page.evaluate(() => fetch("/notfound"))
]);
- // WebUI shows alert-error only for errors handled via AJAX (common.query)
+ // WebUI shows alert-danger only for errors handled via AJAX (common.query)
// If alert is not shown, the test should not fail
- await expect(page.locator(".alert-error, .alert-modal.alert-error")).not.toBeVisible({timeout: 2000});
+ await expect(page.locator(".alert-danger, .alert-modal.alert-danger")).not.toBeVisible({timeout: 2000});
});
});
await expect(page.locator("#actionsFormField")).toBeVisible({timeout: 10000});
function getInputs() { return page.locator("#actionsFormField input[data-id='action']"); }
- const alert = page.locator(".alert-error, .alert-modal.alert-error");
+ const alert = page.locator(".alert-danger, .alert-modal.alert-danger");
const inputs = getInputs();
const count = await inputs.count();