Module: check_mk
Branch: master
Commit: be076584cceacf46ca648c2ff0a7b39815e7dc55
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=be076584cceacf…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Dec 25 21:31:47 2012 +0100
Better layout for tiled view
---
web/htdocs/views.css | 27 ++++++++++++++++++---------
web/plugins/views/layouts.py | 2 +-
2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/web/htdocs/views.css b/web/htdocs/views.css
index 431e300..0bbe7b8 100644
--- a/web/htdocs/views.css
+++ b/web/htdocs/views.css
@@ -266,14 +266,19 @@ table.tiled td {
}
.tile {
- width: 160px;
+ width: 180px;
border: 1px solid #000;
float: left;
- border-radius: 4px;
- margin-right: 3px;
- margin-bottom: 3px;
- border-right: 2px solid #000;
- border-bottom: 2px solid #000;
+ border-radius: 0px;
+ margin-right: 6px;
+ margin-bottom: 6px;
+ box-shadow: 1px 1px 3px #000;
+ background-color: #ccc;
+}
+
+.tile img.icon {
+ width: 16px;
+ height: 16px;
}
.tile table {
@@ -284,16 +289,20 @@ table.tiled td {
font-size: 7pt;
}
.tile.sstate0, .tile.hhstate0 {
- background-color: #afa;
+ border-color: #0f0;
+ /* background-color: #afa; */
}
.tile.sstate1 {
+ border-color: #ff0;
background-color: #ff0;
}
.tile.sstate2, .tile.hhstate1 {
- background-color: #f42;
+ border-color: #f00;
+ background-color: #f88;
}
.tile.sstate3, .tile.hhstate2 {
- background-color: #f80;
+ border-color: #f80;
+ background-color: #fc8;
}
.tile table {
diff --git a/web/plugins/views/layouts.py b/web/plugins/views/layouts.py
index 6f1fc54..cd6d3fd 100644
--- a/web/plugins/views/layouts.py
+++ b/web/plugins/views/layouts.py
@@ -291,7 +291,7 @@ def render_tiled(rows, view, group_painters, painters,
_ignore_num_columns, show
if len(painters) < 5:
painters = painters + ([ (empty_painter, None) ] * (5 - len(painters)))
- rendered = [ ("", prepare_paint(p, row)[1]) for p in painters ]
+ rendered = [ prepare_paint(p, row) for p in painters ]
html.write("<tr><td class=\"tl %s\">" %
(rendered[1][0],))
if show_checkboxes: