Module: check_mk
Branch: master
Commit: 58b91ab4ff1a40632f34e6ad54ef68d580b70b09
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=58b91ab4ff1a40…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Dec 16 09:26:22 2011 +0100
Repair layout of Perf-O-Meter in single dataset layout
---
.bugs/493 | 7 +++++--
ChangeLog | 1 +
web/htdocs/status.css | 15 +++++++++------
web/htdocs/views.css | 31 ++++++++++++++++++++++++-------
web/plugins/views/builtin.py | 1 +
web/plugins/views/layouts.py | 10 +++++++---
6 files changed, 47 insertions(+), 18 deletions(-)
diff --git a/.bugs/493 b/.bugs/493
index 9a418a6..13baa49 100644
--- a/.bugs/493
+++ b/.bugs/493
@@ -1,10 +1,13 @@
Title: Repair Perf-O-Meter in single dataset view
Component: multisite
+State: done
+Class: bug
Benefit: 1
-State: open
Cost: 1
Date: 2011-12-13 16:47:27
Targetversion: 1.1.13i1
-Class: bug
Should look like in table view.
+
+2011-12-16 09:25:56: changed state open -> done
+Looks good now.
diff --git a/ChangeLog b/ChangeLog
index bf300e7..31488f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,7 @@
* New (hidden) button for reloading a snapin (left to the close button)
* Automatically falling back to hardcoded default language if configured
language is not available
+ * Repair layout of Perf-O-Meter in single dataset layout
BI:
* Host/Service elements are now iterable via FOREACH_HOST, e.g.
diff --git a/web/htdocs/status.css b/web/htdocs/status.css
index 09ed6b8..6469c1d 100644
--- a/web/htdocs/status.css
+++ b/web/htdocs/status.css
@@ -136,8 +136,8 @@ b.stmark {
}
/* Performeter styling */
-td.perfometer {
- padding: 1px 1px 1px 0px;
+table.data tr.data td.perfometer {
+ padding: 1px 2px 2px 1px;
width: 120px;
height: 22px;
vertical-align: middle;
@@ -147,7 +147,7 @@ td.perfometer div.content {
position: relative;
top: 0px;
left: 1px;
- width: 119px;
+ width: 120px;
height: 0px;
float: left;
z-index: 20;
@@ -169,7 +169,7 @@ td.perfometer img.glass {
position: relative;
top: 1px;
left: 2px;
- width: 118px;
+ width: 120px;
height: 22px;
margin-bottom: 1px;
z-index: 30;
@@ -177,13 +177,13 @@ td.perfometer img.glass {
td.perfometer table {
- width: 120px;
+ width: 100%;
height: 22px;
border-spacing: 0px;
padding: 0;
margin: 0;
border: 1px solid #aaa;
- height: 100%;
+ height: 24px;
}
table.data td.perfometer td.inner {
@@ -224,6 +224,9 @@ tr.even2 { background-color: #faa; }
tr.odd3 { background-color: #fda; }
tr.even3 { background-color: #fea; }
+/* Row headers in single dataset layout */
+
+
/*-------------------------------------------------------------------------.
| ____ _ _ |
| | _ \ __ _(_)_ __ | |_ ___ _ __ ___ |
diff --git a/web/htdocs/views.css b/web/htdocs/views.css
index 56dc248..27ce157 100644
--- a/web/htdocs/views.css
+++ b/web/htdocs/views.css
@@ -253,30 +253,32 @@ table.tiled td {
about a single host/service on a page. e.g. the "host defails"
page uses thislayout
*/
-table.dataset {
+table.data.single {
+ margin-top: 5px;
border-spacing: 1px;
padding: 0;
border-collapse: collapse;
empty-cells: show;
- width: 100%;
+ width: 200px;
+ box-shadow: 1px 1px 3px #000000;
}
-table.dataset tr.data {
+table.data.single tr.data {
background-color: #eee;
}
-table.dataset tr.gap {
+table.data.single tr.gap {
background-color: transparent;
}
-table.dataset td {
+table.data.single td {
padding-bottom: 4px;
padding: 1px 10px 5px 10px;
text-align: left;
vertical-align: middle;
border: 1px solid #bbb;
}
-table.dataset td.left {
+table.data.single td.left {
padding-right: 10px;
color: #fff;
background-color: #888;
@@ -284,11 +286,26 @@ table.dataset td.left {
white-space: nowrap;
vertical-align: top;
}
-table.dataset td.gap {
+table.data.single td.gap {
background-color: transparent;
border-left-style: none;
border-right-style: none;
}
+table.data.single td.age,
+table.data.single td.number,
+table.data.single td.count {
+ text-align: left;
+}
+
+table.data.single td.perfometer div.content {
+ width: 100%;
+}
+table.data.single td.perfometer img.glass {
+ width: 100%;
+}
+table.data.single td.perfometer div.title {
+ width: 100%;
+}
/*-------------------------------------------------------------------------.
| _____ _ _ _ _ |
diff --git a/web/plugins/views/builtin.py b/web/plugins/views/builtin.py
index 63dabe5..d244785 100644
--- a/web/plugins/views/builtin.py
+++ b/web/plugins/views/builtin.py
@@ -1048,6 +1048,7 @@ multisite_builtin_views.update({
('svc_plugin_output', None),
('svc_long_plugin_output', None),
('svc_perf_data', None),
+ ('perfometer', None),
('svc_check_command', None),
('svc_attempt', None),
('svc_check_type', None),
diff --git a/web/plugins/views/layouts.py b/web/plugins/views/layouts.py
index 064165e..ead5f49 100644
--- a/web/plugins/views/layouts.py
+++ b/web/plugins/views/layouts.py
@@ -67,8 +67,10 @@ def render_single_dataset(rows, view, group_painters, painters,
num_columns, _ig
for row in rows:
register_events(row) # needed for playing sounds
- html.write('<div class="tableshadow left"><table
class=dataset>\n')
+ # html.write('<div class="tableshadow left">\n')
+ html.write('<table class="data single">\n')
rownum = 0
+ odd = "odd"
while rownum < len(rows):
if rownum > 0:
html.write("<tr class=gap><td class=gap
colspan=%d></td></tr>\n" % (1 + num_columns))
@@ -80,7 +82,8 @@ def render_single_dataset(rows, view, group_painters, painters,
num_columns, _ig
else:
title = painter["title"]
- html.write("<tr class=data>")
+ odd = odd == "odd" and "even" or "odd"
+ html.write('<tr class="data %s0">' % odd)
if view.get("column_headers") != "off":
html.write("<td class=left>%s</td>" % title)
for row in thispart:
@@ -89,7 +92,8 @@ def render_single_dataset(rows, view, group_painters, painters,
num_columns, _ig
html.write("<td class=gap style=\"border-style: none;\"
colspan=%d></td>" % (1 + num_columns - len(thispart)))
html.write("</tr>\n")
rownum += num_columns
- html.write("</table></div>\n")
+ html.write("</table>\n")
+ html.write("</div>\n")
multisite_layouts["dataset"] = {
"title" : _("Single dataset"),