make edit and execute buttons optional
This commit is contained in:
parent
3d40deba3c
commit
f8ee97d6b8
|
@ -120,17 +120,16 @@ class CCPMethodList extends HTMLElement{
|
|||
}
|
||||
|
||||
connectedCallback(){
|
||||
|
||||
this.#allowedit = this.getAttribute("allow-edit") === "true"
|
||||
this.#allowexecute = this.getAttribute("allow-execute") === "true"
|
||||
}
|
||||
|
||||
fetchProcesses(){
|
||||
console.log("Calling fetch processes")
|
||||
this.#boot.secureFetch(this.#serviceurl + "/methods").
|
||||
then(resp=>{
|
||||
console.log("Received resp for processes ", resp.status)
|
||||
return resp.json()
|
||||
}).then(data=>{
|
||||
console.log("Processes parsed to json", data)
|
||||
this.#data = data
|
||||
this.updateList()
|
||||
return this.fetchInfrastructures()
|
||||
|
@ -327,7 +326,11 @@ class CCPMethodList extends HTMLElement{
|
|||
},
|
||||
{
|
||||
target: "button[name=executable]",
|
||||
apply : (e,d)=>{ e.style.display = d.executable ? "revert" : "none" }
|
||||
apply : (e,d)=>{ e.style.display = d.executable && this.#allowexecute ? "revert" : "none" }
|
||||
},
|
||||
{
|
||||
target: "button[name=edit]",
|
||||
apply : (e,d)=>{ e.style.display = this.#allowedit ? "revert" : "none" }
|
||||
},
|
||||
{
|
||||
target : "span[name=author]",
|
||||
|
|
Loading…
Reference in New Issue