Module: check_mk
Branch: master
Commit: 8b7f18004ce1a50501bfc5dd049f8a1b3c19033f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8b7f18004ce1a5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Dec 5 16:57:48 2014 +0100
Added icons to dashboard designer menu
---
web/htdocs/dashboard.css | 24 +++++++++-----------
web/htdocs/dashboard.py | 13 ++++++-----
web/htdocs/images/dashboard_menuarrow.png | Bin 137 -> 452 bytes
web/htdocs/images/dashlet_hoststats.png | Bin 0 -> 4042 bytes
web/htdocs/images/dashlet_nodata.png | Bin 0 -> 5009 bytes
web/htdocs/images/dashlet_pnpgraph.png | Bin 0 -> 2621 bytes
web/htdocs/images/dashlet_servicestats.png | Bin 0 -> 5138 bytes
web/htdocs/images/dashlet_url.png | Bin 0 -> 1038 bytes
.../images/{icon_view.png => dashlet_view.png} | Bin 2203 -> 2203 bytes
9 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/web/htdocs/dashboard.css b/web/htdocs/dashboard.css
index 1c40968..6db6abf 100644
--- a/web/htdocs/dashboard.css
+++ b/web/htdocs/dashboard.css
@@ -219,7 +219,8 @@ div.dashlet_inner div.stats {
#controls a {
display: block;
- padding: 1px 15px;
+ padding: 1px 15px 1px 2px;
+ line-height: 14px;
text-align: left;
text-decoration: none;
}
@@ -228,22 +229,19 @@ div.dashlet_inner div.stats {
text-decoration: underline;
}
-#controls li.sublink > a:before {
- position: absolute;
- left: 7px;
- width: 6px;
- height: 10px;
- margin-top: 3px;
- background-image: url(images/dashboard_menuarrow.png);
- background-repeat: no-repeat;
- content: " ";
-}
-
/* submenu */
#controls ul.sub {
bottom: 5px;
- right: 210px;
+ right: 212px;
+}
+
+#controls > li > a > img,
+#controls ul.menu > li > a > img {
+ margin-right: 4px;
+ vertical-align: middle;
+ width: 12px;
+ height: 12px;
}
/* dashlet controls */
diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py
index 0140280..774fdfe 100644
--- a/web/htdocs/dashboard.py
+++ b/web/htdocs/dashboard.py
@@ -437,8 +437,8 @@ def render_dashboard(name):
display = html.var('edit') == '1' and 'block' or
'none'
html.write('<li id="control_add" class="sublink"
style="display:%s" '
-
'onmouseover="show_submenu(\'control_add\')"><a
href="javascript:void(0)">%s</a>\n' %
- (display, _('Add dashlet')))
+
'onmouseover="show_submenu(\'control_add\')"><a
href="javascript:void(0)">'
+ '<img src="images/dashboard_menuarrow.png"
/>%s</a>\n' % (display, _('Add dashlet')))
# The dashlet types which can be added to the view
html.write('<ul id="control_add_sub" class="menu
sub" style="display:none">\n')
@@ -456,7 +456,8 @@ def render_dashboard(name):
url = html.makeuri([('type', ty), ('back',
html.makeuri([('edit', '1')]))], filename = 'edit_dashlet.py')
if 'add_urlfunc' in dashlet_type:
url = dashlet_type['add_urlfunc']()
- html.write('<li><a
href="%s">%s</a></li>\n' % (url,
dashlet_type['title']))
+ html.write('<li><a href="%s"><img
src="images/dashlet_%s.png" />%s</a></li>\n' %
+ (url, ty,
dashlet_type['title']))
html.write('</ul>\n')
html.write('</li>\n')
@@ -466,7 +467,7 @@ def render_dashboard(name):
#
html.write('<li><a
href="edit_dashboard.py?load_name=%s&back=%s" '
- 'onmouseover="hide_submenus();"
>%s</a></li>\n' %
+ 'onmouseover="hide_submenus();" ><img
src="images/trans.png" />%s</a></li>\n' %
(name, html.urlencode(html.makeuri([])), _('Properties')))
#
@@ -476,7 +477,7 @@ def render_dashboard(name):
display = html.var('edit') == '1' and 'block' or
'none'
html.write('<li id="control_view"
style="display:%s"><a href="javascript:void(0)" '
'onmouseover="hide_submenus();" '
-
'onclick="toggle_dashboard_edit(false)">%s</a></li>\n' %
+ 'onclick="toggle_dashboard_edit(false)"><img
src="images/trans.png" />%s</a></li>\n' %
(display, _('Stop Editing')))
#
@@ -485,7 +486,7 @@ def render_dashboard(name):
display = html.var('edit') != '1' and 'block' or
'none'
html.write('<li id="control_edit"
style="display:%s"><a href="javascript:void(0)" '
-
'onclick="toggle_dashboard_edit(true)">%s</a></li>\n' %
+ 'onclick="toggle_dashboard_edit(true)"><img
src="images/trans.png" />%s</a></li>\n' %
(display, _('Edit Dashboard')))
html.write("</ul>\n")
diff --git a/web/htdocs/images/dashboard_menuarrow.png
b/web/htdocs/images/dashboard_menuarrow.png
index 359779d..cb84135 100644
Binary files a/web/htdocs/images/dashboard_menuarrow.png and
b/web/htdocs/images/dashboard_menuarrow.png differ
diff --git a/web/htdocs/images/dashlet_hoststats.png
b/web/htdocs/images/dashlet_hoststats.png
new file mode 100644
index 0000000..102ec9f
Binary files /dev/null and b/web/htdocs/images/dashlet_hoststats.png differ
diff --git a/web/htdocs/images/dashlet_nodata.png b/web/htdocs/images/dashlet_nodata.png
new file mode 100644
index 0000000..a3b76ba
Binary files /dev/null and b/web/htdocs/images/dashlet_nodata.png differ
diff --git a/web/htdocs/images/dashlet_pnpgraph.png
b/web/htdocs/images/dashlet_pnpgraph.png
new file mode 100644
index 0000000..84963ed
Binary files /dev/null and b/web/htdocs/images/dashlet_pnpgraph.png differ
diff --git a/web/htdocs/images/dashlet_servicestats.png
b/web/htdocs/images/dashlet_servicestats.png
new file mode 100644
index 0000000..697356a
Binary files /dev/null and b/web/htdocs/images/dashlet_servicestats.png differ
diff --git a/web/htdocs/images/dashlet_url.png b/web/htdocs/images/dashlet_url.png
new file mode 100644
index 0000000..d317683
Binary files /dev/null and b/web/htdocs/images/dashlet_url.png differ
diff --git a/web/htdocs/images/icon_view.png b/web/htdocs/images/dashlet_view.png
similarity index 100%
rename from web/htdocs/images/icon_view.png
rename to web/htdocs/images/dashlet_view.png