fix bug with sync and deleting instance
This commit is contained in:
parent
89f0b14c21
commit
4806d7f18f
@ -233,8 +233,10 @@ class InstanceCard extends HTMLElement {
|
|||||||
|
|
||||||
const result = await requestAPI(`/cluster/${this.node.name}/${this.type}/${this.vmid}/delete`, "DELETE");
|
const result = await requestAPI(`/cluster/${this.node.name}/${this.type}/${this.vmid}/delete`, "DELETE");
|
||||||
if (result.status === 200) {
|
if (result.status === 200) {
|
||||||
|
if (this.parentElement) {
|
||||||
this.parentElement.removeChild(this);
|
this.parentElement.removeChild(this);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
alert(result.error);
|
alert(result.error);
|
||||||
this.status = this.prevStatus;
|
this.status = this.prevStatus;
|
||||||
|
Loading…
Reference in New Issue
Block a user