diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2024-12-27 02:21:37 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2024-12-28 00:27:46 +0100 |
commit | a492b3b668c1c9be410a7b126550129fba67025a (patch) | |
tree | 66d1ad7502e7e01028a533a24a038d38f5737d8b /acid.go | |
parent | 280114a5d3a756b820ce74426aa628cf938ccbf4 (diff) | |
download | acid-a492b3b668c1c9be410a7b126550129fba67025a.tar.gz acid-a492b3b668c1c9be410a7b126550129fba67025a.tar.xz acid-a492b3b668c1c9be410a7b126550129fba67025a.zip |
Clean up
Diffstat (limited to 'acid.go')
-rw-r--r-- | acid.go | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -314,9 +314,7 @@ function get(id) { return document.getElementById(id) } function getLog(id) { - const header = document.getElementById(id) - const log = document.getElementById(id + 'log') - const text = log.textContent + const header = get(id), log = get(id + 'log'), text = log.textContent // lines[-1] is an implementation detail of terminalWriter.Serialize, // lines[-2] is the actual last line. const last = Math.max(0, text.split('\n').length - 2) @@ -334,8 +332,7 @@ function refreshLog(log, top, changed) { log.log.hidden = empty } let refresher = setInterval(() => { - let run = getLog('run'), task = getLog('task'), deploy = getLog('deploy') - + const run = getLog('run'), task = getLog('task'), deploy = getLog('deploy') const url = new URL(window.location.href) url.search = '' url.searchParams.set('json', '') @@ -374,8 +371,8 @@ let refresher = setInterval(() => { if (!data.IsRunning) clearInterval(refresher) }).catch(error => { - alert(error) clearInterval(refresher) + alert(error) }) }, 1000 /* For faster updates than this, we should use WebSockets. */) </script> |