Module: check_mk
Branch: master
Commit: c7c2cb06d1557c9bf5985790f45aa7a2729420e3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c7c2cb06d1557c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Nov 7 12:04:00 2016 +0100
Fixed poping up changes button in sidebar snapin after a change
---
web/htdocs/wato.py | 2 +-
web/htdocs/watolib.py | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index f9e7d76..6c96cd7 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -277,7 +277,7 @@ def page_handler():
html.show_error(traceback.format_exc().replace('\n', '<br
/>'))
html.close_div()
- if g_need_sidebar_reload == id(html):
+ if is_sidebar_reload_needed():
html.reload_sidebar()
if config.wato_use_git and html.is_transaction():
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index 864984b..cf32385 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -4629,6 +4629,10 @@ def need_sidebar_reload():
g_need_sidebar_reload = id(html)
+def is_sidebar_reload_needed():
+ return g_need_sidebar_reload == id(html)
+
+
def folder_preserving_link(add_vars):
return Folder.current().url(add_vars)