From bcc02f680c37aeb087900bb6c088a753d33bd30b Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 9 Feb 2024 11:01:00 +0100 Subject: [PATCH 1/4] fixed missing brackets for value expansions --- ccp/js/outputwidgetcontroller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccp/js/outputwidgetcontroller.js b/ccp/js/outputwidgetcontroller.js index 64ae654..f8661ec 100644 --- a/ccp/js/outputwidgetcontroller.js +++ b/ccp/js/outputwidgetcontroller.js @@ -22,7 +22,7 @@ class CCPOutputWidgetController extends HTMLElement { render(){ return `
- +
` From 6cb7fb7cae73e8500b4a4382897c1be05cd77d13 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 9 Feb 2024 11:42:49 +0100 Subject: [PATCH 2/4] allow user to activate automatic archiving of outputs to workspace --- ccp/js/executionformcontroller.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ccp/js/executionformcontroller.js b/ccp/js/executionformcontroller.js index 6270cc2..73139bd 100644 --- a/ccp/js/executionformcontroller.js +++ b/ccp/js/executionformcontroller.js @@ -77,6 +77,17 @@ class CCPExecutionForm extends HTMLElement{ +
+
+
Options
+
+
+
+ + +
+
+
Outputs
@@ -236,6 +247,13 @@ class CCPExecutionForm extends HTMLElement{ outputs.forEach(o=>{ if(o.enabled) request.outputs[o.name] = { transmissionMode : "value" }; }) + + const autoarchiveoption = this.#rootdoc.querySelector("input[name='auto-archive-outputs']") + if (autoarchiveoption.checked){ + request.subscribers = [ + { successUri : "http://registry:8080/executions/archive-to-folder" } + ] + } return request } @@ -350,6 +368,10 @@ class CCPExecutionForm extends HTMLElement{ target: "p.description", apply : (e,d)=>e.textContent = d.description }, + { + target: "input[name='auto-archive-outputs']", + apply : (e,d)=>e.checked = d.subscribers && d.subscribers.filter(s=>s === "http://registry:8080/executions/archive-to-folder").length === 1 + }, { target: "div.ccp-inputs", in : (e,d)=>d, From 4533b43773254deb9c793888281e7fe21557b2aa Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 9 Feb 2024 11:57:23 +0100 Subject: [PATCH 3/4] fix to correct datasource --- ccp/js/executionformcontroller.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ccp/js/executionformcontroller.js b/ccp/js/executionformcontroller.js index 73139bd..3010a1a 100644 --- a/ccp/js/executionformcontroller.js +++ b/ccp/js/executionformcontroller.js @@ -266,7 +266,7 @@ class CCPExecutionForm extends HTMLElement{ return Array.prototype.slice.call(this.#rootdoc.querySelectorAll("d4s-ccp-output")) } - initValues(inputs){ + initInputValues(inputs){ Object.keys(inputs).forEach(k=>{ const w = this.#rootdoc.querySelector(`d4s-ccp-input[name=${k}]`) if(w){ @@ -274,6 +274,11 @@ class CCPExecutionForm extends HTMLElement{ } }) } + + initOptionValues(request){ + const autoarchiveoption = this.#rootdoc.querySelector("input[name='auto-archive-outputs']") + autoarchiveoption.checked = request.subscribers && request.subscribers.filter(s=>s === "http://registry:8080/executions/archive-to-folder").length === 1 + } prepareFromExecution(exec){ let f1 = @@ -306,7 +311,8 @@ class CCPExecutionForm extends HTMLElement{ this.#data.executable = resp.status === 200 }).then(()=>{ this.showMethod() - this.initValues(requestdata.inputs) + this.initInputValues(requestdata.inputs) + this.initOptionValues(requestdata) }).catch(err=>alert(err)) } @@ -368,10 +374,6 @@ class CCPExecutionForm extends HTMLElement{ target: "p.description", apply : (e,d)=>e.textContent = d.description }, - { - target: "input[name='auto-archive-outputs']", - apply : (e,d)=>e.checked = d.subscribers && d.subscribers.filter(s=>s === "http://registry:8080/executions/archive-to-folder").length === 1 - }, { target: "div.ccp-inputs", in : (e,d)=>d, From d275b087b852d21a6cebc5763667374dad3dcd5b Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 9 Feb 2024 11:59:40 +0100 Subject: [PATCH 4/4] fix to access correct uri --- ccp/js/executionformcontroller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccp/js/executionformcontroller.js b/ccp/js/executionformcontroller.js index 3010a1a..659e1d1 100644 --- a/ccp/js/executionformcontroller.js +++ b/ccp/js/executionformcontroller.js @@ -277,7 +277,7 @@ class CCPExecutionForm extends HTMLElement{ initOptionValues(request){ const autoarchiveoption = this.#rootdoc.querySelector("input[name='auto-archive-outputs']") - autoarchiveoption.checked = request.subscribers && request.subscribers.filter(s=>s === "http://registry:8080/executions/archive-to-folder").length === 1 + autoarchiveoption.checked = request.subscribers && request.subscribers.filter(s=>s.successUri === "http://registry:8080/executions/archive-to-folder").length === 1 } prepareFromExecution(exec){