Skip to content

Commit

Permalink
cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
melezhik committed Jan 10, 2024
1 parent 13fe8e0 commit b45c5ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions templates/build.crotmp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

ws.onmessage = function(e) {
console.log('ws - ', e.data);
log.innerHTML = e.data;
log.innerHTML = `<small>${e.data}</small>`;
// log.innerHTML += "<br>";
};

Expand Down Expand Up @@ -121,14 +121,14 @@
console.log(response.status); // Will show you the status
if (!response.ok) {
// document.getElementById('notification').innerHTML += "<br>";
document.getElementById('notification').innerHTML = `Build error: ${response.status} ${response.statusText}`;
document.getElementById('notification').innerHTML = `<small>Build error: ${response.status} ${response.statusText}</small>`;
} else {
return response.text();
}
})
.then(function(job_id) {
// document.getElementById('notification').innerHTML += "<br>";
document.getElementById('notification').innerHTML = `Build queued: ${job_id}`;
document.getElementById('notification').innerHTML = `<small>Build queued: ${job_id}</small>`;
connect(job_id);
})
}
Expand Down
9 changes: 6 additions & 3 deletions templates/report2.crotmp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

ws2.onmessage = function(e) {
console.log('ws - status - ', e.data);
info.innerHTML = e.data;
info.innerHTML = `<small>${e.data}</small>`;
// log.innerHTML += "<br>";
};

Expand All @@ -69,21 +69,23 @@
.then(function(response) {
console.log(response.status); // Will show you the status
if (!response.ok) {
document.getElementById('notification').innerHTML = `Build error: ${response.status} ${response.statusText}`;
document.getElementById('notification').innerHTML = `<small>Build error: ${response.status} ${response.statusText}</small>`;
} else {
return response.text();
}
})
.then(function(job_id) {
// document.getElementById('notification').innerHTML += "<br>";
document.getElementById('notification').innerHTML = `Build queued: ${job_id}`;
document.getElementById('notification').innerHTML = `<small>Build queued: ${job_id}</small>`;
connect2(job_id);
})
}

var log = document.getElementById('log');
var ansi_up = new AnsiUp;

info.innerHTML = '<small>report loading ...</small>';

function connect() {
var ws = new WebSocket("ws://<.sparky-host>:<.sparky-tcp-port>/livereport/<.project>/<.build_id>/<.job_id>");
ws.onopen = function() {
Expand All @@ -101,6 +103,7 @@ function connect() {

ws.onclose = function(e) {
console.log('ws - socket is closed', e.reason);
info.innerHTML = '<small>report loaded</small>';
//setTimeout(function() {
// connect();
//}, 1000);
Expand Down

0 comments on commit b45c5ad

Please sign in to comment.