allow user to activate automatic archiving of outputs to workspace
This commit is contained in:
parent
bcc02f680c
commit
6cb7fb7cae
|
@ -77,6 +77,17 @@ class CCPExecutionForm extends HTMLElement{
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5>Options</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="col form-check">
|
||||
<input class="form-check-input" type="checkbox" name="auto-archive-outputs" alt="Automatically archive outputs to workspace" title="Automatically archive outputs to workspace" checked="checked">
|
||||
<label class="form-check-label">Automatically archive outputs to workspace</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5>Outputs</h5>
|
||||
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue