From 642859d0f75278e07e24d9b69afaafcfd6eb4d15 Mon Sep 17 00:00:00 2001 From: Alexey Melezhik Date: Fri, 12 Jan 2024 11:10:13 +0300 Subject: [PATCH] new helper --- .tom/restart.raku | 1 + templates/build.crotmp | 4 ++-- templates/report2.crotmp | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 .tom/restart.raku diff --git a/.tom/restart.raku b/.tom/restart.raku new file mode 100644 index 0000000..87c14f4 --- /dev/null +++ b/.tom/restart.raku @@ -0,0 +1 @@ +bash "sparman.raku worker_ui stop && sparman.raku worker_ui start"; diff --git a/templates/build.crotmp b/templates/build.crotmp index e896442..ca3d7a9 100644 --- a/templates/build.crotmp +++ b/templates/build.crotmp @@ -74,7 +74,7 @@ ws.onmessage = function(e) { console.log('ws - ', e.data); - log.innerHTML = `${e.data}`; + log.innerHTML = `${e.data}`; // log.innerHTML += "
"; }; @@ -130,7 +130,7 @@ }) .then(function(job_id) { // document.getElementById('notification').innerHTML += "
"; - document.getElementById('notification').innerHTML = `Build queued: ${job_id}`; + document.getElementById('notification').innerHTML = `Build queued: ${job_id}`; connect(job_id); }) } diff --git a/templates/report2.crotmp b/templates/report2.crotmp index f4125e5..44beed6 100644 --- a/templates/report2.crotmp +++ b/templates/report2.crotmp @@ -45,7 +45,7 @@ ws2.onmessage = function(e) { console.log('ws - status - ', e.data); - info.innerHTML = `${e.data}`; + info.innerHTML = `${e.data}`; // log.innerHTML += "
"; }; @@ -77,7 +77,7 @@ }) .then(function(job_id) { // document.getElementById('notification').innerHTML += "
"; - document.getElementById('notification').innerHTML = `Build queued: ${job_id}`; + document.getElementById('notification').innerHTML = `Build queued: ${job_id}`; connect2(job_id); }) } @@ -85,7 +85,7 @@ var log = document.getElementById('log'); var ansi_up = new AnsiUp; -info.innerHTML = 'report loading ...'; +info.innerHTML = 'report loading ...'; function connect() { var ws = new WebSocket(`ws://${ip}/livereport/<.project>/<.build_id>/<.job_id>`); @@ -104,7 +104,7 @@ function connect() { ws.onclose = function(e) { console.log('ws - socket is closed', e.reason); - info.innerHTML = 'report loaded'; + info.innerHTML = 'report loaded'; //setTimeout(function() { // connect(); //}, 1000);