fix to correct datasource

This commit is contained in:
dcore94 2024-02-09 11:57:23 +01:00
parent 6cb7fb7cae
commit 4533b43773
1 changed files with 8 additions and 6 deletions

View File

@ -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,