Module: check_mk
Branch: master
Commit: 122a4a4cd72a474ba92aa3f8ddb1925239fe6cbe
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=122a4a4cd72a47…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Jun 18 10:47:07 2015 +0200
edited cmk_color_palette in htdocs/metrics.py
---
web/htdocs/metrics.py | 39 +++++++++++++++++++++++++++++++++++++--
1 file changed, 37 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/metrics.py b/web/htdocs/metrics.py
index a67848b..3fa3092 100644
--- a/web/htdocs/metrics.py
+++ b/web/htdocs/metrics.py
@@ -154,10 +154,45 @@ def metric_to_text(metric, value=None):
# '----------------------------------------------------------------------'
cmk_color_palette = {
- "24" : (0.5, 1.0, 1.0),
- "25" : (0.7, 1.0, 1.0),
+# do not use:
+# "0" : (0.33, 1, 1), # green
+# "1" : (0.167, 1, 1), # yellow
+# "2" : (0, 1, 1), # red
+# red area
+ "11" : (0.775, 1, 1),
+ "12" : (0.8, 1, 1),
+ "13" : (0.83, 1, 1),
+ "14" : (0.05, 1, 1),
+ "15" : (0.08, 1, 1),
+ "16" : (0.105, 1, 1),
+# yellow area
+ "21" : (0.13, 1, 1),
+ "22" : (0.14, 1, 1),
+ "23" : (0.155, 1, 1),
+ "24" : (0.185, 1, 1),
+ "25" : (0.21, 1, 1),
+ "26" : (0.25, 1, 1),
+# green area
+ "31" : (0.45, 1, 1),
+ "32" : (0.5, 1, 1),
+ "33" : (0.515, 1, 1),
+ "34" : (0.53, 1, 1),
+ "35" : (0.55, 1, 1),
+ "36" : (0.57, 1, 1),
+# blue area
+ "41" : (0.59, 1, 1),
+ "42" : (0.62, 1, 1),
+ "43" : (0.66, 1, 1),
+ "44" : (0.71, 1, 1),
+ "45" : (0.73, 1, 1),
+ "46" : (0.75, 1, 1),
+# special colors
+ "51" : (0, 0, 0.5), # grey_50
+ "52" : (0.067, 0.7, 0.5), # brown 1
+ "53" : (0.083, 0.8 0.55), # brown 2
}
+
# 23/c -> #ff8040
# #ff8040 -> #ff8040
def parse_color_into_hexrgb(color_string):