added outcome message
This commit is contained in:
parent
841c47ab46
commit
a5d8dc603e
|
@ -108,13 +108,26 @@ class CCPExecutionForm extends HTMLElement{
|
||||||
}
|
}
|
||||||
|
|
||||||
lockRender(){
|
lockRender(){
|
||||||
this.#rootdoc.querySelector(".plexiglass").classList.toggle("d-none")
|
const plexi = this.#rootdoc.querySelector(".plexiglass")
|
||||||
|
plexi.innerHTML = ``
|
||||||
|
plexi.classList.toggle("d-none")
|
||||||
}
|
}
|
||||||
|
|
||||||
unlockRender(){
|
unlockRender(){
|
||||||
this.#rootdoc.querySelector(".plexiglass").classList.toggle("d-none")
|
this.#rootdoc.querySelector(".plexiglass").classList.toggle("d-none")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
writeToPlexi(message){
|
||||||
|
const plexi = this.#rootdoc.querySelector(".plexiglass")
|
||||||
|
plexi.innerHTML = `
|
||||||
|
<div class="d-flex" style="flex-direction: column;justify-content:center;position:relative;height:100%;align-items: center;">
|
||||||
|
<div class="mx-2 p-4 bg-success text-white border" style="border-radius: 5px;box-shadow: 2px 2px 2px darkgray;">
|
||||||
|
<div>${message}</h5></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
}
|
||||||
|
|
||||||
loadMethod(){
|
loadMethod(){
|
||||||
return this.#boot.secureFetch(this.#serviceurl + "/processes/" + this.#method).then(
|
return this.#boot.secureFetch(this.#serviceurl + "/processes/" + this.#method).then(
|
||||||
(resp)=>{
|
(resp)=>{
|
||||||
|
@ -163,7 +176,8 @@ class CCPExecutionForm extends HTMLElement{
|
||||||
}
|
}
|
||||||
const event = new CustomEvent('newexecution', { detail: data.jobID });
|
const event = new CustomEvent('newexecution', { detail: data.jobID });
|
||||||
document.dispatchEvent(event)
|
document.dispatchEvent(event)
|
||||||
this.unlockRender()
|
this.writeToPlexi("Execution request accepted with id: " + data.jobID)
|
||||||
|
window.setTimeout(()=>this.unlockRender(), 3000)
|
||||||
}).catch(err => {alert("Unable to call execute: " + err); this.unlockRender()})
|
}).catch(err => {alert("Unable to call execute: " + err); this.unlockRender()})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue