Skip to content

Commit 2584028

Browse files
committed
ui: fix log display
1 parent b851584 commit 2584028

1 file changed

Lines changed: 18 additions & 17 deletions

File tree

watchbird-source.php

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,23 +1258,6 @@ function showmodule(e){
12581258
await sleep(500);
12591259
}
12601260
async function addlog(doReplay, module, str, id){
1261-
if (module == 'flag_log' && timestampflag_log > 0){
1262-
await sendnoti('深度防御拦截了一次有效攻击', '查看flag_log以获取详细信息');
1263-
}
1264-
if (module == "under_attack_log"){
1265-
if (timestampunder_attack_log > 0){
1266-
await sendnoti('RCE防护拦截了一次有效攻击', '查看under_attack_log以获取详细信息');
1267-
}
1268-
var cpydiv = document.getElementById("web_log" + id).cloneNode(true);
1269-
cpydiv.id = module + id;
1270-
cpydiv.classList.remove("active");
1271-
cpydiv.querySelector("button").onclick = function () { handle_replay(); }
1272-
document.getElementById(module).getElementsByClassName("logcontainer")[0].prepend(cpydiv);
1273-
mdui.mutation();
1274-
await sleep(20);
1275-
cpydiv.classList.add("active");
1276-
return;
1277-
}
12781261
var newdivrow = document.createElement("div");
12791262
newdivrow.id = module+id;
12801263
newdivrow.classList.add("mdui-card")
@@ -1301,6 +1284,24 @@ function showmodule(e){
13011284
mdui.mutation();
13021285
await sleep(20);
13031286
newdivrow.classList.add("active");
1287+
1288+
if (module == 'flag_log' && timestampflag_log > 0){
1289+
await sendnoti('深度防御拦截了一次有效攻击', '查看flag_log以获取详细信息');
1290+
}
1291+
if (module == "under_attack_log"){
1292+
if (timestampunder_attack_log > 0){
1293+
await sendnoti('RCE防护拦截了一次有效攻击', '查看under_attack_log以获取详细信息');
1294+
}
1295+
var cpydiv = document.getElementById("web_log" + id).cloneNode(true);
1296+
cpydiv.id = module + id;
1297+
cpydiv.classList.remove("active");
1298+
cpydiv.querySelector("button").onclick = function () { handle_replay(); }
1299+
document.getElementById(module).getElementsByClassName("logcontainer")[0].prepend(cpydiv);
1300+
mdui.mutation();
1301+
await sleep(20);
1302+
cpydiv.classList.add("active");
1303+
return;
1304+
}
13041305
}
13051306
var timestampflag_eye_to_eye = 0;
13061307
var timestampflag_log = 0;

0 commit comments

Comments
 (0)