mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
dashboard: properly remove charts on widget close action
This commit is contained in:
parent
83fc436065
commit
f075d2d3db
@ -248,4 +248,14 @@ export default class Disk extends BaseWidget {
|
||||
}
|
||||
}
|
||||
|
||||
onWidgetClose() {
|
||||
if (this.simple_chart !== null) {
|
||||
this.simple_chart.destroy();
|
||||
}
|
||||
|
||||
if (this.detailed_chart !== null) {
|
||||
this.detailed_chart.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -288,6 +288,10 @@ export default class Firewall extends BaseTableWidget {
|
||||
if (this.eventSource !== null) {
|
||||
this.eventSource.close();
|
||||
}
|
||||
|
||||
if (this.chart !== null) {
|
||||
this.chart.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
onWidgetResize(elem, width, height) {
|
||||
|
||||
@ -185,4 +185,10 @@ export default class InterfaceStatistics extends BaseWidget {
|
||||
return true;
|
||||
}
|
||||
|
||||
onWidgetClose() {
|
||||
if (this.chart !== null) {
|
||||
this.chart.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -129,4 +129,10 @@ export default class Memory extends BaseWidget {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onWidgetClose() {
|
||||
if (this.chart !== null) {
|
||||
this.chart.destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user