Module: check_mk
Branch: master
Commit: 1c8dad1806f2ccdcd5ab1fbcdb64cd35cc581b67
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1c8dad1806f2cc…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Nov 25 12:57:55 2011 +0100
New (hidden) button for reloading a snapin
---
ChangeLog | 1 +
web/htdocs/check_mk.css | 6 ++++++
web/htdocs/images/button_reloadsnapin_hi.png | Bin 0 -> 422 bytes
web/htdocs/images/button_reloadsnapin_lo.png | Bin 0 -> 134 bytes
web/htdocs/images/button_reloadsnapin_lo_alt.png | Bin 0 -> 409 bytes
web/htdocs/sidebar.py | 6 +++++-
6 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bb9e5de..4beaad4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -46,6 +46,7 @@
* Logwatch: Fixed styling of context button when acknowleding log messages
* Logwatch: Implemented overview page to show all problematic logfiles
* Add Snapin page: show previews of all snapins
+ * New (hidden) button for reloading a snapin (left to the close button)
WATO:
* Evolved to full featured monitoring configuration tool!
diff --git a/web/htdocs/check_mk.css b/web/htdocs/check_mk.css
index 619a68f..9c176cf 100644
--- a/web/htdocs/check_mk.css
+++ b/web/htdocs/check_mk.css
@@ -355,6 +355,12 @@ div.snapin div.closesnapin {
margin-right: 10px;
margin-top: 2px;
}
+/* Reload-Button */
+div.snapin div.reloadsnapin {
+ float: right;
+ margin-right: 4px;
+ margin-top: 2px;
+}
div.snapin div.content {
background-image: url("images/snapin_background.png");
diff --git a/web/htdocs/images/button_reloadsnapin_hi.png
b/web/htdocs/images/button_reloadsnapin_hi.png
new file mode 100644
index 0000000..3820a39
Binary files /dev/null and b/web/htdocs/images/button_reloadsnapin_hi.png differ
diff --git a/web/htdocs/images/button_reloadsnapin_lo.png
b/web/htdocs/images/button_reloadsnapin_lo.png
new file mode 100644
index 0000000..eb053b0
Binary files /dev/null and b/web/htdocs/images/button_reloadsnapin_lo.png differ
diff --git a/web/htdocs/images/button_reloadsnapin_lo_alt.png
b/web/htdocs/images/button_reloadsnapin_lo_alt.png
new file mode 100644
index 0000000..1feb010
Binary files /dev/null and b/web/htdocs/images/button_reloadsnapin_lo_alt.png differ
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index af4a268..48abc0e 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -211,10 +211,14 @@ def render_snapin(name, state):
else:
html.write(">")
if config.may("configure_sidebar"):
+
html.write('<div class="closesnapin">')
iconbutton("closesnapin",
"sidebar_openclose.py?name=%s&state=off" % name, "side",
"removeSnapin", 'snapin_'+name)
html.write('</div>')
- pass
+ 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>")