Module: check_mk
Branch: master
Commit: 28b9cb0358f9215975db7447765139a0ee650928
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=28b9cb0358f921…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Dec 22 11:17:02 2015 +0100
Internal code change for styling in availability tables
---
web/htdocs/availability.py | 2 ++
web/plugins/views/availability.py | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/availability.py b/web/htdocs/availability.py
index ee184d4..5ec7802 100644
--- a/web/htdocs/availability.py
+++ b/web/htdocs/availability.py
@@ -976,6 +976,7 @@ def layout_availability_table(what, group_title, availability_table,
avoptions):
if number and av_levels and sid in [ "ok", "up" ]:
css = "state%d" % check_av_levels(number, av_levels,
entry["considered_duration"])
+ css = css + " narrow number"
row["cells"].append((render_number(number,
entry["considered_duration"]), css))
# Statistics?
@@ -1017,6 +1018,7 @@ def layout_availability_table(what, group_title, availability_table,
avoptions):
if number and av_levels and sid in [ "ok", "up" ]:
css = "state%d" % check_av_levels(number, av_levels,
entry["considered_duration"])
+ css = css + " narrow number"
summary_cells.append((render_number(number,
entry["considered_duration"]), css))
if sid in os_states:
for aggr in os_aggrs:
diff --git a/web/plugins/views/availability.py b/web/plugins/views/availability.py
index b643119..43f0225 100644
--- a/web/plugins/views/availability.py
+++ b/web/plugins/views/availability.py
@@ -388,7 +388,7 @@ def render_availability_table(group_title, availability_table, what,
avoptions):
# Columns with the actual availability data
for (title, help), (text, css) in zip(av_table["cell_titles"],
row["cells"]):
- table.cell(title, text, css="narrow number " + css, help=help)
+ table.cell(title, text, css=css, help=help)
if "summary" in av_table:
table.row(css="summary")
@@ -401,7 +401,7 @@ def render_availability_table(group_title, availability_table, what,
avoptions):
table.cell("", "")
for (title, help), (text, css) in zip(av_table["cell_titles"],
av_table["summary"]):
- table.cell(title, text, css="heading number " + css, help=help)
+ table.cell(title, text, css="heading " + css, help=help)
return table.end() # returns Table data if fetch == True