Remove the RAM usage SVG during reset the web page

Handle the RAM usage SVG like the SWAP usage SVG.
This commit is contained in:
Carsten Grohmann 2017-11-29 20:34:00 +01:00
parent b8ec3c720e
commit 04a202d999

View File

@ -10,7 +10,7 @@ import re
DEBUG=False DEBUG=False
"""Show additional information during the development cycle""" """Show additional information during the development cycle"""
VERSION="0.1" VERSION="0.1.0"
"""Version number""" """Version number"""
def hide_element(element_id): def hide_element(element_id):
@ -438,9 +438,10 @@ Killed process 6576 (java) total-vm:33914892kB, anon-rss:20629004kB, file-rss:0k
hide_element('error_box') hide_element('error_box')
# remove svg charts # remove svg charts
element = document.getElementById('svg_swap') for element_id in ('svg_swap', 'svg_ram'):
while element.firstChild: element = document.getElementById(element_id)
element.removeChild(element.firstChild) while element.firstChild:
element.removeChild(element.firstChild)
def _create_svg_element(self, height, width): def _create_svg_element(self, height, width):
""" """