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

This commit is contained in:
Ryan Medlyn
2017-09-01 10:27:01 -06:00
committed by Neil Lathwood
parent 2cbee2dc02
commit 6077d3a3db
3 changed files with 6 additions and 3 deletions

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 {

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();
});
}

View File

File diff suppressed because one or more lines are too long