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