Fix: Remove Prom. metrics on delete monitor

This commit is contained in:
Nelson Chan
2022-01-07 11:57:24 +08:00
parent a48176bd48
commit f6ef390c76
3 changed files with 16 additions and 0 deletions

View File

@@ -468,6 +468,11 @@ class Monitor extends BeanModel {
this.isStop = true;
}
onDelete() {
let prometheus = new Prometheus(this);
prometheus.remove();
}
/**
* Helper Method:
* returns URL object for further usage