webui: Greatly reduces application memory leak for dashboard (#7215)

This commit is contained in:
Ryan Medlyn
2017-09-01 17:27:01 +01:00
committed by Neil Lathwood
co-authored by Neil Lathwood
parent 2cbee2dc02
commit 6077d3a3db
3 changed files with 6 additions and 3 deletions
+3
View File
@@ -591,6 +591,9 @@ if (strpos($dash_config, 'globe') !== false) {
}
function widget_reload(id,data_type) {
$(".bootgrid-table").bootgrid("destroy");
$("#widget_body_"+id+" *").off();
$("#widget_body_"+id).empty();
if( $("#widget_body_"+id).parent().data('settings') == 1 ) {
settings = 1;
} else {
+1 -1
View File
@@ -883,7 +883,7 @@
placeholder.each(function (index, item)
{
// todo: check how append is implemented. Perhaps cloning here is superfluous.
$(item).before(element.clone(true)).remove();
$(item).before(element).remove();
});
}
File diff suppressed because one or more lines are too long