mirror of
https://github.com/containrrr/watchtower.git
synced 2026-01-07 01:28:49 +01:00
restructure and fix empty report
This commit is contained in:
parent
0776077ac5
commit
3bcc86cd8f
12 changed files with 359 additions and 343 deletions
|
|
@ -89,10 +89,13 @@
|
|||
console.log("Levels: %o", levels);
|
||||
const output = WATCHTOWER.tplprev(input, states, levels);
|
||||
console.log('Output: \n%o', output);
|
||||
document.querySelector('#result').innerText = output;
|
||||
if (output.length) {
|
||||
document.querySelector('#result').innerText = output;
|
||||
} else {
|
||||
document.querySelector('#result').innerHTML = '<i>empty (would not be sent as a notification)</i>';
|
||||
}
|
||||
}
|
||||
const formSubmitted = (e) => {
|
||||
console.log("Event: %o", e);
|
||||
e.preventDefault();
|
||||
updatePreview();
|
||||
}
|
||||
|
|
@ -115,7 +118,7 @@
|
|||
|
||||
|
||||
|
||||
<form id="tplprev" onchange="inputUpdated()" onsubmit="formSubmitted(event)" style="margin: 0;display: flex; flex-direction: column; row-gap: 1rem; box-sizing: border-box; position: relative; margin-right: -13.3rem">
|
||||
<form id="tplprev" onchange="updatePreview()" onsubmit="formSubmitted(event)" style="margin: 0;display: flex; flex-direction: column; row-gap: 1rem; box-sizing: border-box; position: relative; margin-right: -13.3rem">
|
||||
<pre id="loading" style="position: absolute; inset: 0; display: flex; padding: 1rem; box-sizing: border-box; background: var(--md-code-bg-color); margin-top: 0">loading wasm...</pre>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue