Module: check_mk
Branch: master
Commit: 24d43ee07e3523216d63090ed0229992c2386806
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=24d43ee07e3523…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Apr 24 13:21:30 2011 +0200
Small facelifting of Perf-O-Meters
---
web/htdocs/check_mk.css | 39 ++++++++++++++++++++++++++++------
web/htdocs/images/perfometer-bg.png | Bin 0 -> 184 bytes
web/plugins/views/perfometer.py | 6 ++++-
3 files changed, 37 insertions(+), 8 deletions(-)
diff --git a/web/htdocs/check_mk.css b/web/htdocs/check_mk.css
index b79d6f7..da4e328 100644
--- a/web/htdocs/check_mk.css
+++ b/web/htdocs/check_mk.css
@@ -692,7 +692,7 @@ tr.even3 { background-color: #fea; }
/* HACK */
table.services tr.data td {
border: 1px solid #bbb;
- padding: 3px 6px;
+ padding: 2px 4px;
}
table.services td.host {
@@ -802,22 +802,47 @@ td.count {
/* Performeter styling */
-td.perfometer {
- padding: 1px 2px;
- width: 120px;
- height: 22px;
- vertical-align: middle;
+
+table.services tr.data td.perfometer {
+ padding: 1px 1px 1px 0px;
+ width: 120px;
+ height: 22px;
+ vertical-align: middle;
}
-td.perfometer div.title {
+
+td.perfometer div.content {
+ position: relative;
+ top: 0px;
+ left: 1px;
+ width: 119px;
height: 0px;
+ float: left;
+ z-index: 20;
+}
+
+td.perfometer div.title {
position: relative;
top: 3px;
left: 0px;
width: 120px;
+ height: 0px;
text-align: center;
white-space: nowrap;
+ float: left;
+ z-index: 40;
+}
+
+td.perfometer img.glass {
+ position: relative;
+ top: 1px;
+ left: 2px;
+ width: 118px;
+ height: 22px;
+ margin-bottom: 1px;
+ z-index: 30;
}
+
td.perfometer table {
width: 120px;
height: 22px;
diff --git a/web/htdocs/images/perfometer-bg.png b/web/htdocs/images/perfometer-bg.png
new file mode 100644
index 0000000..340fe7c
Binary files /dev/null and b/web/htdocs/images/perfometer-bg.png differ
diff --git a/web/plugins/views/perfometer.py b/web/plugins/views/perfometer.py
index f05040f..b839ea2 100644
--- a/web/plugins/views/perfometer.py
+++ b/web/plugins/views/perfometer.py
@@ -160,12 +160,16 @@ def paint_perfometer(row):
try:
title, h = perf_painter(row, check_command, perf_data)
- content = "<div class=title>%s</div>%s" % (title, h)
+ content = '<div class=content>%s</div>' % h
+ content += '<div class=title>%s</div>' % title
+ content += '<img class=glass
src="images/perfometer-bg.png">'
+
if 'X' in html.display_options:
return "perfometer", ('<a
href="%s">%s</a>' % (pnp_url(row, "service"), content))
else:
return "perfometer", content
+
except Exception, e:
if config.debug:
raise