Module: check_mk
Branch: master
Commit: ba3a0756e74312933289401baada811c11393dd7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ba3a0756e74312…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Oct 27 15:31:41 2015 +0100
#2714 FIX Fixed visibility of folding arrows by making them dark
---
.werks/2714 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/htmllib.py | 12 +++++++-----
web/plugins/views/inventory.py | 3 ++-
4 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/.werks/2714 b/.werks/2714
new file mode 100644
index 0000000..4cd361d
--- /dev/null
+++ b/.werks/2714
@@ -0,0 +1,10 @@
+Title: Fixed visibility of folding arrows by making them dark
+Level: 1
+Component: inv
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1445956247
+
+
diff --git a/ChangeLog b/ChangeLog
index e30ae8c..0091f0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -46,6 +46,7 @@
HW/SW-Inventory:
* 2436 NetApp monitoring: Now able to gather data for inventory...
* 2667 FIX: solaris_mem: fix exception in inventory plugin
+ * 2714 FIX: Fixed visibility of folding arrows by making them dark
1.2.7i3:
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 9af0a74..2a18684 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -1473,7 +1473,9 @@ class html:
ht = ht[0:x] + ht[y+9:]
return ht
- def begin_foldable_container(self, treename, id, isopen, title, indent=True,
first=False, icon=None, fetch_url=None, title_url=None):
+ def begin_foldable_container(self, treename, id, isopen, title, indent=True,
+ first=False, icon=None, fetch_url=None, title_url=None,
+ tree_img="tree"):
self.folding_indent = indent
if self.user:
@@ -1490,14 +1492,14 @@ class html:
if icon:
self.write('<img class="treeangle title"
src="images/icon_%s.png">' % icon)
else:
- self.write('<img align=absbottom class="treeangle nform"
src="images/tree_%s.png">' % (
- isopen and "90" or "00"))
+ self.write('<img align=absbottom class="treeangle nform"
src="images/%s_%s.png">' %
+ (tree_img, isopen and "90" or
"00"))
self.write('%s</td></tr>' % title)
else:
if not icon:
self.write('<img align=absbottom class="treeangle"
id="treeimg.%s.%s" '
- 'src="images/tree_%s.png" %s>' %
- (treename, id, img_num, onclick))
+ 'src="images/%s_%s.png" %s>' %
+ (treename, id, tree_img, img_num, onclick))
if title.startswith('<'): # custom HTML code
self.write(title)
if indent != "form":
diff --git a/web/plugins/views/inventory.py b/web/plugins/views/inventory.py
index 2aaeb0a..9a72b6f 100644
--- a/web/plugins/views/inventory.py
+++ b/web/plugins/views/inventory.py
@@ -125,7 +125,8 @@ def render_inv_subtree_foldable(hostname, tree_id, invpath, node):
title = title % list_index
fetch_url = html.makeuri_contextless([("host", hostname),
("path", invpath), ("treeid", tree_id)],
"ajax_inv_render_tree.py")
- if html.begin_foldable_container("inv_" + hostname + tree_id, invpath,
False, title, icon=icon, fetch_url=fetch_url):
+ if html.begin_foldable_container("inv_" + hostname + tree_id, invpath,
False,
+ title, icon=icon, fetch_url=fetch_url,
tree_img="tree_black"):
# Render only if it is open. We'll get the stuff via ajax later if
it's closed
render_inv_subtree_container(hostname, tree_id, invpath, node)
html.end_foldable_container()