added extra option for storing whole execution

This commit is contained in:
dcore94 2024-06-04 17:23:02 +02:00
parent ac10c3ba34
commit b982194b73
1 changed files with 11 additions and 6 deletions

View File

@ -86,7 +86,11 @@ class CCPExecutionForm extends HTMLElement{
</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">
<input class="form-check-input" type="checkbox" name="auto-archive" alt="Automatically archive the whole execution with metadata to workspace folder" title="Automatically archive the whole execution with metadata to workspace folder">
<label class="form-check-label">Automatically archive whole execution to workspace</label>
</div>
<div class="col form-check">
<input class="form-check-input" type="checkbox" name="auto-archive-outputs" alt="Automatically archive only the outputs to workspace" title="Automatically archive only the outputs to workspace" checked="checked">
<label class="form-check-label">Automatically archive outputs to workspace</label>
</div>
</div>
@ -254,11 +258,12 @@ class CCPExecutionForm extends HTMLElement{
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" }
]
const autoarchiveoption = this.#rootdoc.querySelector("input[name='auto-archive']")
const autoarchiveoutputsoption = this.#rootdoc.querySelector("input[name='auto-archive-outputs']")
if (autoarchiveoption.checked || autoarchiveoutputoption.checked){
request.subscribers = []
if(autoarchiveoption.checked) request.subscribers.push({ successUri : "http://registry:8080/executions/archive-to-folder" })
if(autoarchiveoutputsoption.checked) request.subscribers.push({ successUri : "http://registry:8080/executions/outputs/archive-to-folder" })
}
return request