Hide table rows w/o values instead of showing "<not found>"

This commit is contained in:
Carsten Grohmann 2018-04-16 21:06:20 +02:00
parent 0b3beb07c6
commit e3558a911f
2 changed files with 8 additions and 4 deletions

View File

@ -30,8 +30,8 @@
content: " pages"; content: " pages";
} }
.notfound { .hide_tablerow {
text-align: right; display: none;
} }
table { table {

View File

@ -464,8 +464,8 @@ Killed process 6576 (java) total-vm:33914892kB, anon-rss:20629004kB, file-rss:0k
element.textContent = content element.textContent = content
if content == '<not found>': if content == '<not found>':
element.classList.remove('kbytes', 'pages') row = element.parentNode
element.classList.add('notfound') row.classList.add('hide_tablerow')
elif item.endswith('_kb'): elif item.endswith('_kb'):
element.classList.add('kbytes') element.classList.add('kbytes')
elif item.endswith('_pages'): elif item.endswith('_pages'):
@ -485,6 +485,10 @@ Killed process 6576 (java) total-vm:33914892kB, anon-rss:20629004kB, file-rss:0k
hide_element("notify_box") hide_element("notify_box")
show_element("input") show_element("input")
# show hidden rows
for element in document.getElementsByClassName('hide_tablerow'):
element.classList.remove('hide_tablerow')
self.lines = [] self.lines = []
self.details = {} self.details = {}
for item in self.mem_modinfo_entries: for item in self.mem_modinfo_entries: