diff options
| author | Shulhan <ms@kilabit.info> | 2021-03-22 00:34:56 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-03-22 00:34:56 +0700 |
| commit | 8aae3e4d12d5af082d7183b0f2d199688a356794 (patch) | |
| tree | 53604480d4523e31fad17409d2fc2e64d62fc428 | |
| parent | d57a3da49f842db0a38b2970864c60ea73963fb8 (diff) | |
| download | gorankusu-8aae3e4d12d5af082d7183b0f2d199688a356794.tar.xz | |
_www: ask for confirmation before deleting result
| -rw-r--r-- | _www/index.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/_www/index.js b/_www/index.js index 2bd9162..2a94043 100644 --- a/_www/index.js +++ b/_www/index.js @@ -330,6 +330,12 @@ async function attackCancel() { } async function attackResultDelete(name) { + let msg = `Are you sure you want to delete the result: ${name}?` + let yes = window.confirm(msg) + if (!yes) { + return; + } + let url = "/_trunks/api/target/attack/result?name=" + name let fres = await fetch(url, { method: "DELETE", @@ -355,6 +361,7 @@ async function attackResultDelete(name) { if (result.Name == name) { httpTarget.Results.splice(x, 1) renderHttpAttackResults(target, httpTarget) + notif(`Result file "${name}" has been deleted.`) return } } |
