Disable update_toc
Currently not used. Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
parent
6dee66c9c9
commit
d1e4289e9d
@ -4305,7 +4305,7 @@ class OOMDisplay:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.oom = None
|
self.oom = None
|
||||||
self.set_html_defaults()
|
self.set_html_defaults()
|
||||||
self.update_toc()
|
# self.update_toc()
|
||||||
|
|
||||||
element = document.getElementById("version")
|
element = document.getElementById("version")
|
||||||
element.textContent = "v{}".format(VERSION)
|
element.textContent = "v{}".format(VERSION)
|
||||||
@ -4352,27 +4352,27 @@ class OOMDisplay:
|
|||||||
if DEBUG:
|
if DEBUG:
|
||||||
show_element("notify_box")
|
show_element("notify_box")
|
||||||
|
|
||||||
def update_toc(self):
|
# def update_toc(self):
|
||||||
"""
|
# """
|
||||||
Update the TOC to show current headlines only
|
# Update the TOC to show current headlines only
|
||||||
|
#
|
||||||
There are two conditions to show a h2 headline in TOC:
|
# There are two conditions to show a h2 headline in TOC:
|
||||||
* the headline is visible
|
# * the headline is visible
|
||||||
* the id attribute is set
|
# * the id attribute is set
|
||||||
"""
|
# """
|
||||||
new_toc = ""
|
# new_toc = ""
|
||||||
|
#
|
||||||
toc_content = document.querySelectorAll("nav > ul")[0]
|
# toc_content = document.querySelectorAll("nav > ul")[0]
|
||||||
|
#
|
||||||
for element in document.querySelectorAll("h2"):
|
# for element in document.querySelectorAll("h2"):
|
||||||
if not (is_visible(element) and element.id):
|
# if not (is_visible(element) and element.id):
|
||||||
continue
|
# continue
|
||||||
|
#
|
||||||
new_toc += '<li><a href="#{}">{}</a></li>'.format(
|
# new_toc += '<li><a href="#{}">{}</a></li>'.format(
|
||||||
element.id, element.textContent
|
# element.id, element.textContent
|
||||||
)
|
# )
|
||||||
|
#
|
||||||
toc_content.innerHTML = new_toc
|
# toc_content.innerHTML = new_toc
|
||||||
|
|
||||||
def _show_pstable(self):
|
def _show_pstable(self):
|
||||||
"""
|
"""
|
||||||
@ -4514,7 +4514,7 @@ class OOMDisplay:
|
|||||||
def reset_form(self):
|
def reset_form(self):
|
||||||
document.getElementById("textarea_oom").value = ""
|
document.getElementById("textarea_oom").value = ""
|
||||||
self.set_html_defaults()
|
self.set_html_defaults()
|
||||||
self.update_toc()
|
# self.update_toc()
|
||||||
|
|
||||||
def toggle_oom(self, show=False):
|
def toggle_oom(self, show=False):
|
||||||
"""Toggle the visibility of the full OOM message"""
|
"""Toggle the visibility of the full OOM message"""
|
||||||
@ -4541,7 +4541,7 @@ class OOMDisplay:
|
|||||||
if success:
|
if success:
|
||||||
self.oom_result = analyser.oom_result
|
self.oom_result = analyser.oom_result
|
||||||
self.show_oom_details()
|
self.show_oom_details()
|
||||||
self.update_toc()
|
# self.update_toc()
|
||||||
|
|
||||||
def load_from_form(self):
|
def load_from_form(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user