Module: check_mk
Branch: master
Commit: 61843f738251e26252ae98483ce073bd4aa3bb3e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=61843f738251e2…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Nov 27 11:08:37 2011 +0100
Reload-button in snapins only for reloable snapins
---
web/htdocs/sidebar.py | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index 48abc0e..eb8677a 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -215,10 +215,12 @@ def render_snapin(name, state):
html.write('<div class="closesnapin">')
iconbutton("closesnapin",
"sidebar_openclose.py?name=%s&state=off" % name, "side",
"removeSnapin", 'snapin_'+name)
html.write('</div>')
- html.write('<div class="reloadsnapin">')
- iconbutton("reloadsnapin", url="sidebar_snapin.py?name=" +
name, handler="updateContents",
- name = "snapin_" + name);
- html.write('</div>')
+ # Show reload button, but only for reloadable Snapins
+ if snapin.get("reload") or snapin.get("restart"):
+ html.write('<div class="reloadsnapin">')
+ iconbutton("reloadsnapin", url="sidebar_snapin.py?name="
+ name, handler="updateContents",
+ name = "snapin_" + name);
+ html.write('</div>')
html.write("<b class=heading
onclick=\"toggle_sidebar_snapin(this,'%s')\"
onmouseover=\"this.style.cursor='pointer'\" "
"onmouseout=\"this.style.cursor='auto'\">%s</b>" %
(url, snapin["title"]))
html.write("</div>")