log clear add

This commit is contained in:
2023-06-10 14:12:10 +02:00
parent d44a4b8d7e
commit 1bdd87a4ee
2 changed files with 30 additions and 11 deletions

View File

@@ -186,10 +186,22 @@
});
}
function clearlog(){
let id = $("#logid").val();
$.post("api.php",
{
action: "clrlog",
id: id
}, function( data ) {
$("#loglist").html(data);
});
}
$(function() {
$("#submitpwd").click(verifyPassword);
$("#logget").click(getlog);
$("#logclr").click(clearlog);
$.post("api.php",
{
@@ -201,9 +213,7 @@
});
$("#logid").keyup(function(event) {
if (event.keyCode === 13) {
$("#logget").click();
}
$("#logget").click();
});
});
@@ -227,7 +237,7 @@
</div>
<h1>Log manager:</h1>
<input type="text" id="logid" value="*" placeholder="Link ID"><button id="logget">Get log</button><br>
<input type="text" id="logid" value="*" placeholder="Link ID"><button id="logget">Get log</button><button id="logclr">Clear matching</button><br>
<div id="loglist">
</div>