minor fixes
This commit is contained in:
parent
192327a7aa
commit
cdae1583f1
|
@ -199,7 +199,7 @@ class CCPMethodEditorController extends HTMLElement{
|
||||||
this.render()
|
this.render()
|
||||||
}).catch(err=>{
|
}).catch(err=>{
|
||||||
alert(err)
|
alert(err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
saveMethod(){
|
saveMethod(){
|
||||||
|
@ -245,7 +245,7 @@ class CCPMethodEditorController extends HTMLElement{
|
||||||
(resp)=>{
|
(resp)=>{
|
||||||
if(resp.status === 404 || resp.status === 204){
|
if(resp.status === 404 || resp.status === 204){
|
||||||
return null
|
return null
|
||||||
}else throw "Error deleting method"
|
}else throw "Error deleting method: " + resp.status
|
||||||
}).then(data=>{
|
}).then(data=>{
|
||||||
this.unlockRender()
|
this.unlockRender()
|
||||||
}).catch(err=>{
|
}).catch(err=>{
|
||||||
|
@ -259,13 +259,14 @@ class CCPMethodEditorController extends HTMLElement{
|
||||||
initMethod(){
|
initMethod(){
|
||||||
this.#current = JSON.parse(JSON.stringify(this.#method_template))
|
this.#current = JSON.parse(JSON.stringify(this.#method_template))
|
||||||
this.#current.id = Math.abs((Math.random() * 10e11)|0)
|
this.#current.id = Math.abs((Math.random() * 10e11)|0)
|
||||||
|
this.#current.metadata = []
|
||||||
this.#tmp_inputs = []
|
this.#tmp_inputs = []
|
||||||
this.#tmp_outputs = []
|
this.#tmp_outputs = []
|
||||||
}
|
}
|
||||||
|
|
||||||
resetMethod(){
|
resetMethod(){
|
||||||
this.initMethod()
|
this.initMethod()
|
||||||
this.render()
|
this.render()
|
||||||
}
|
}
|
||||||
|
|
||||||
cloneMethod(method){
|
cloneMethod(method){
|
||||||
|
|
Loading…
Reference in New Issue