|
|
|
@ -30,6 +30,7 @@ class CCPExecutionHistory extends HTMLElement {
|
|
|
|
|
"archive_execution_help" : "Archive whole execution to workspace folder",
|
|
|
|
|
"archive_outputs_help" : "Archive only outputs to workspace folder",
|
|
|
|
|
"re-submit_help" : "Re submit this exact execution",
|
|
|
|
|
"re-submit" : "Re-submit",
|
|
|
|
|
"delete_help" : "Delete this execution",
|
|
|
|
|
"generate_code" : "Generate code for",
|
|
|
|
|
"generate_code_help" : "Generate code that replicates this exact execution on a chosen programming language or runtime",
|
|
|
|
@ -41,12 +42,17 @@ class CCPExecutionHistory extends HTMLElement {
|
|
|
|
|
"confirm_import_file" : "Please confirm importing of execution from file",
|
|
|
|
|
"confirm_delete_execution" : "Please confirm deletion of this execution",
|
|
|
|
|
"confirm_delete_archived_execution" : "Please confirm deletion of this archived execution from your workspace.",
|
|
|
|
|
"confirm_archive_execution" : "Confirm archiving of this execution to workspace.",
|
|
|
|
|
"confirm_archive_outputs" : "Confirm archiving of outputs to workspace.",
|
|
|
|
|
"confirm_reexecution" : "Confirm resubmission of this execution",
|
|
|
|
|
"live_executions" : "Live executions",
|
|
|
|
|
"archived_executions" : "Archived executions",
|
|
|
|
|
"restore_execution_help" : "Restore this archived execution back to CCP",
|
|
|
|
|
"infrastructure_help" : "The infrastructure where this execution has been scheduled on",
|
|
|
|
|
"runtime_help" : "The runtime where this execution has been scheduled on",
|
|
|
|
|
"loading_archived_help" : "Loading archived executions from workspace. This can take a while."
|
|
|
|
|
"loading_archived_help" : "Loading archived executions from workspace. This can take a while.",
|
|
|
|
|
"err_reexecute" : "Unable to re-submit the execution. Please check console for further info",
|
|
|
|
|
"err_generate_code_for" : "Unable to generate code for "
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -142,7 +148,7 @@ class CCPExecutionHistory extends HTMLElement {
|
|
|
|
|
<svg viewBox="0 0 48 48"><path d="M7 40q-1.15 0-2.075-.925Q4 38.15 4 37V11q0-1.15.925-2.075Q5.85 8 7 8h14l3 3h17q1.15 0 2.075.925Q44 12.85 44 14v23q0 1.15-.925 2.075Q42.15 40 41 40Zm25-3h9V14h-9v4.6h4.6v4.6H32v4.6h4.6v4.6H32ZM7 37h20.4v-4.6H32v-4.6h-4.6v-4.6H32v-4.6h-4.6V14h-4.65l-3-3H7v26Zm0-23v-3 26-23Z"/></svg>
|
|
|
|
|
</button>
|
|
|
|
|
<button data-index="0" name="reexecute1" title="${this.getLabel("re-submit_help")}" class="btn btn-info ccp-toolbar-button ccp-toolbar-button-small">
|
|
|
|
|
Re-submit
|
|
|
|
|
${this.getLabel("re-submit")}
|
|
|
|
|
</button>
|
|
|
|
|
<button data-index="0" name="delete" title="${this.getLabel("delete_help")}" class="btn btn-danger ccp-toolbar-button ccp-toolbar-button-small">
|
|
|
|
|
<svg viewBox="0 0 24 24">
|
|
|
|
@ -210,6 +216,9 @@ class CCPExecutionHistory extends HTMLElement {
|
|
|
|
|
<span name="version" class="badge badge-primary"></span>
|
|
|
|
|
<span name="status" class="ml-1 badge"></span>
|
|
|
|
|
<div class="d-flex float-right" style="gap: 3px 5px;flex-wrap:wrap;">
|
|
|
|
|
<button data-index="0" name="reexecute2" title="${this.getLabel("re-submit_help")}" class="btn btn-info ccp-toolbar-button ccp-toolbar-button-small">
|
|
|
|
|
${this.getLabel("re-submit")}
|
|
|
|
|
</button>
|
|
|
|
|
<button name="restore" title="${this.getLabel("restore_execution_help")}" class="btn btn-primary ccp-toolbar-button ccp-toolbar-button-small">
|
|
|
|
|
<svg viewBox="0 -960 960 960" width="24px" fill="#5f6368">
|
|
|
|
|
<path d="M480-250q78 0 134-56t56-134q0-78-56-134t-134-56q-38 0-71 14t-59 38v-62h-60v170h170v-60h-72q17-18 41-29t51-11q54 0 92 38t38 92q0 54-38 92t-92 38q-44 0-77-25.5T356-400h-62q14 65 65.5 107.5T480-250ZM240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm0-80h480v-446L526-800H240v640Zm0 0v-640 640Z"/>
|
|
|
|
@ -521,11 +530,27 @@ class CCPExecutionHistory extends HTMLElement {
|
|
|
|
|
}).catch(err=>{ alert(err)})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
reexecuteArchived(data, level){
|
|
|
|
|
this.#boot.secureFetch(`${this.#serviceurl}/executions/level/${level}`, {
|
|
|
|
|
method: "POST",
|
|
|
|
|
headers: {"Content-Type" : "application/json"},
|
|
|
|
|
body: JSON.stringify({ "request" : data.fullrequest, "method" : data.fullmethod, "infrastructure" : data.fullinfrastructure})
|
|
|
|
|
})
|
|
|
|
|
.then(reply =>{
|
|
|
|
|
if (!reply.ok) {
|
|
|
|
|
throw this.getLabel("err_reexecute")
|
|
|
|
|
}
|
|
|
|
|
return reply.json()
|
|
|
|
|
}).then(data=>{
|
|
|
|
|
this.refreshExecution(data.jobID)
|
|
|
|
|
}).catch(err=>{ alert(err)})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
reexecute(id,level){
|
|
|
|
|
this.#boot.secureFetch(`${this.#serviceurl}/executions/${id}/level/${level}`, { method: "POST" })
|
|
|
|
|
.then(reply =>{
|
|
|
|
|
if (!reply.ok) {
|
|
|
|
|
throw "Unable to re-execute. Check console."
|
|
|
|
|
throw this.getLabel("err_reexecute")
|
|
|
|
|
}
|
|
|
|
|
return reply.json()
|
|
|
|
|
}).then(data=>{
|
|
|
|
@ -556,7 +581,7 @@ class CCPExecutionHistory extends HTMLElement {
|
|
|
|
|
this.#boot.secureFetch(`${this.#serviceurl}/executions/${id}/code`,
|
|
|
|
|
{ method: "GET", headers : { "Accept" : mime} }).then(reply =>{
|
|
|
|
|
if (!reply.ok) {
|
|
|
|
|
throw "Unable to generate code for " + mime
|
|
|
|
|
throw this.getLabel("err_generate_code_for") + mime
|
|
|
|
|
}
|
|
|
|
|
return reply.blob()
|
|
|
|
|
}).then(blob => {
|
|
|
|
@ -793,19 +818,19 @@ class CCPExecutionHistory extends HTMLElement {
|
|
|
|
|
this.export(id, "application/prov-o+xml", id + ".xml")
|
|
|
|
|
}
|
|
|
|
|
if(ev.target.getAttribute("name") === "reexecute1"){
|
|
|
|
|
if(window.confirm("Please confirm re-execution?")){
|
|
|
|
|
if(window.confirm(this.getLabel("confirm_reexecution"))){
|
|
|
|
|
const id = ev.currentTarget.getAttribute("data-index")
|
|
|
|
|
this.reexecute(id, 1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(ev.target.getAttribute("name") === "archive"){
|
|
|
|
|
if(confirm(" Please confirm archiving of execution to workspace folder?")){
|
|
|
|
|
if(confirm(this.getLabel("confirm_archive_execution"))){
|
|
|
|
|
const id = ev.currentTarget.getAttribute("data-index")
|
|
|
|
|
this.toArchiveFolder(id)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(ev.target.getAttribute("name") === "archiveoutputs"){
|
|
|
|
|
if(confirm(" Please confirm archiving of execution outputs to workspace folder?")){
|
|
|
|
|
if(confirm(this.getLabel("confirm_archive_outputs"))){
|
|
|
|
|
const id = ev.currentTarget.getAttribute("data-index")
|
|
|
|
|
this.toOutputsArchiveFolder(id)
|
|
|
|
|
}
|
|
|
|
@ -1006,6 +1031,10 @@ class CCPExecutionHistory extends HTMLElement {
|
|
|
|
|
const wsid = ev.currentTarget.getAttribute("data-wsid")
|
|
|
|
|
this.deleteArchiveFolder(wsid)
|
|
|
|
|
}
|
|
|
|
|
}else if(ev.target.getAttribute("name") === "reexecute2"){
|
|
|
|
|
if(window.confirm(this.getLabel("confirm_reexecution"))){
|
|
|
|
|
this.reexecuteArchived(ev.currentTarget.bss_input.data, 1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|