mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 12:48:29 +00:00
Remove duplicated reply time in child row
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -208,8 +208,7 @@ function parseQueryStatus(data) {
|
||||
};
|
||||
}
|
||||
|
||||
function formatReplyTime(data, type) {
|
||||
const replyTime = data.reply.time;
|
||||
function formatReplyTime(replyTime, type) {
|
||||
if (type === "display") {
|
||||
// Units:
|
||||
// - seconds if replytime >= 1 second
|
||||
@@ -321,16 +320,10 @@ function formatInfo(data) {
|
||||
|
||||
// Always show reply info, add reply delay if applicable
|
||||
var replyInfo = "";
|
||||
if (data.reply.type !== "UNKNOWN") {
|
||||
replyInfo = divStart + "Reply:  " + data.reply.type;
|
||||
if (data.reply.time >= 0 && data.reply.type !== "UNKNOWN") {
|
||||
replyInfo += " (" + formatReplyTime(data, "display") + ")";
|
||||
}
|
||||
|
||||
replyInfo += "</div>";
|
||||
} else {
|
||||
replyInfo = divStart + "Reply: No reply received</div>";
|
||||
}
|
||||
replyInfo =
|
||||
data.reply.type !== "UNKNOWN"
|
||||
? divStart + "Reply:  " + data.reply.type + "</div>"
|
||||
: divStart + "Reply: No reply received</div>";
|
||||
|
||||
// Compile extra info for displaying
|
||||
return (
|
||||
@@ -532,7 +525,7 @@ $(function () {
|
||||
{ data: "type", width: "1%" },
|
||||
{ data: "domain", width: "45%" },
|
||||
{ data: "client.ip", width: "29%", type: "ip-address" },
|
||||
{ data: null, width: "4%", render: formatReplyTime },
|
||||
{ data: "reply.time", width: "4%", render: formatReplyTime },
|
||||
{ data: null, width: "10%", sortable: false, searchable: false },
|
||||
],
|
||||
lengthMenu: [
|
||||
|
||||
Reference in New Issue
Block a user