From 32a5fc7a69c8319a00c94701962ea5470be84f50 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 23 Jun 2023 11:55:34 +0200 Subject: [PATCH 01/21] added management of other kind of message --- ccp/js/executionhistorycontroller.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ccp/js/executionhistorycontroller.js b/ccp/js/executionhistorycontroller.js index 9c70943..666db40 100644 --- a/ccp/js/executionhistorycontroller.js +++ b/ccp/js/executionhistorycontroller.js @@ -8,7 +8,7 @@ class CCPExecutionHistory extends HTMLElement { #data = []; #pending = []; #filtered = []; - #socket = null; + #sockets = null; #interval = null; #searchfield = null; #fileupload = null; @@ -271,6 +271,10 @@ class CCPExecutionHistory extends HTMLElement { this.#socket = new WebSocket(this.#broadcasturl + "/executions"); this.#socket.onmessage = event=>{ const data = JSON.parse(event.data) + if(!data.jobID){ + console.log("New logs " + event.data) + return + } let exec = this.#data.filter(e=>e.id === data.jobID)[0] if(exec){ this.refreshExecution(exec.id) From e14bd30796012a773622bc306c432ac80cc1e2fe Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 23 Jun 2023 12:04:53 +0200 Subject: [PATCH 02/21] fix typo --- ccp/js/executionhistorycontroller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccp/js/executionhistorycontroller.js b/ccp/js/executionhistorycontroller.js index 666db40..b94694c 100644 --- a/ccp/js/executionhistorycontroller.js +++ b/ccp/js/executionhistorycontroller.js @@ -8,7 +8,7 @@ class CCPExecutionHistory extends HTMLElement { #data = []; #pending = []; #filtered = []; - #sockets = null; + #socket = null; #interval = null; #searchfield = null; #fileupload = null; From 7e676e6473d09e7ec80a02cb3eee4bc4621db476 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 23 Jun 2023 13:10:22 +0200 Subject: [PATCH 03/21] added terminal for viewing logs --- ccp/js/executionhistorycontroller.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ccp/js/executionhistorycontroller.js b/ccp/js/executionhistorycontroller.js index b94694c..faa01f1 100644 --- a/ccp/js/executionhistorycontroller.js +++ b/ccp/js/executionhistorycontroller.js @@ -38,6 +38,7 @@ class CCPExecutionHistory extends HTMLElement { this.#rootdoc.innerHTML = ` + + +
+ ` + } + + refresh(){ + BSS.apply(this.#terminal_bss) + } + + #terminal_bss = { + template : "#TERMINAL_TEMPLATE", + target : "div[name=terminal]", + in : ()=>this, + recurse : { + target : "div.line", + in: d=>d.#lines, + apply: (e,d,i)=>{ + if(d.source === "stderr") e.classList.add("error"); + e.innerHTML = `${d.line}` + } + } + } +} + +window.customElements.define('d4s-ccp-logterminal', LogTerminal); \ No newline at end of file From 7798657b69e3fcba31a61e9c4375a32e3a18166c Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 23 Jun 2023 13:14:53 +0200 Subject: [PATCH 05/21] fix --- ccp/js/executionhistorycontroller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccp/js/executionhistorycontroller.js b/ccp/js/executionhistorycontroller.js index faa01f1..e5fde3e 100644 --- a/ccp/js/executionhistorycontroller.js +++ b/ccp/js/executionhistorycontroller.js @@ -112,7 +112,7 @@ class CCPExecutionHistory extends HTMLElement { - +
From b8e9ffddefd824d4e7d23b35f3664d7ab0aef263 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 23 Jun 2023 14:00:45 +0200 Subject: [PATCH 06/21] fix --- ccp/js/executionhistorycontroller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccp/js/executionhistorycontroller.js b/ccp/js/executionhistorycontroller.js index e5fde3e..8cdc23e 100644 --- a/ccp/js/executionhistorycontroller.js +++ b/ccp/js/executionhistorycontroller.js @@ -38,7 +38,7 @@ class CCPExecutionHistory extends HTMLElement { this.#rootdoc.innerHTML = ` - +