Module: check_mk
Branch: master
Commit: c2a12c1cbb3affa47754f108b677a8aa8abf69a9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c2a12c1cbb3aff…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Sep 30 01:08:06 2016 +0200
Fixed perfometer handling of too long texts
---
web/htdocs/status.css | 30 +++++++++++++++---------------
web/plugins/views/perfometer.py | 3 ++-
2 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/web/htdocs/status.css b/web/htdocs/status.css
index 5d0eb83..cc27855 100644
--- a/web/htdocs/status.css
+++ b/web/htdocs/status.css
@@ -189,30 +189,30 @@ table.data tr.data td.perfometer {
vertical-align: middle;
}
+td.perfometer > a {
+ display: block;
+ position: relative;
+}
+
td.perfometer div.content {
- position: relative;
- top: 0px;
- left: 1px;
width: 120px;
- height: 0px;
- float: left;
z-index: 20;
}
td.perfometer div.title {
- position: relative;
- top: 5px;
- left: 0px;
- width: 120px;
- height: 0px;
- text-align: center;
- white-space: nowrap;
- float: left;
- z-index: 40;
+ position: absolute;
+ top: 1px;
+ overflow: hidden;
+ line-height: 22px;
+ margin: 0 3px;
+ width: 114px;
+ text-align: center;
+ white-space: nowrap;
+ z-index: 40;
}
td.perfometer img.glass {
- position: relative;
+ position: absolute;
top: 1px;
left: 2px;
width: 120px;
diff --git a/web/plugins/views/perfometer.py b/web/plugins/views/perfometer.py
index e44ea7f..5b5c26b 100644
--- a/web/plugins/views/perfometer.py
+++ b/web/plugins/views/perfometer.py
@@ -173,7 +173,8 @@ def paint_perfometer(row):
url = new_graphing_url(row, "service")
else:
url = pnp_url(row, "service")
- return "perfometer" + stale_css, ('<a
href="%s">%s</a>' % (url, content))
+ return "perfometer" + stale_css, ('<a href="%s"
title="%s">%s</a>' % \
+ (url, title, content))
else:
return "perfometer" + stale_css, content