Module: check_mk
Branch: master
Commit: dec7f6d033c02783b2803377f2000476a014b292
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dec7f6d033c027…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Feb 21 10:12:58 2017 +0100
werk list: Added missing component, cleaned up titles
Change-Id: I3a196e3dab2764dc20088298215322f158bde5b7
---
lib/werks.py | 39 ++++++++++++++++++++-------------------
web/htdocs/werks.py | 8 ++------
2 files changed, 22 insertions(+), 25 deletions(-)
diff --git a/lib/werks.py b/lib/werks.py
index cb2d201..1d0c41a 100644
--- a/lib/werks.py
+++ b/lib/werks.py
@@ -55,41 +55,42 @@ def werk_classes():
def werk_components():
return {
# CRE
- "core" : _("Core & Setup"),
- "checks" : _("Checks & Agents"),
- "multisite" : _("User Interface"),
+ "core" : _("Core & setup"),
+ "checks" : _("Checks & agents"),
+ "multisite" : _("User interface"),
"wato" : _("WATO"),
"notifications" : _("Notifications"),
"bi" : _("BI"),
- "reporting" : _("Reporting & Availability"),
- "ec" : _("Event Console"),
+ "reporting" : _("Reporting & availability"),
+ "ec" : _("Event console"),
"livestatus" : _("Livestatus"),
- "liveproxy" : _("Livestatus-Proxy"),
- "inv" : _("HW/SW-Inventory"),
+ "liveproxy" : _("Livestatus proxy"),
+ "inv" : _("HW/SW inventory"),
# CEE
- "cmc" : _("The Check_MK Micro Core"),
- "setup" : _("Setup, Site Management"),
+ "cmc" : _("The Check_MK micro core"),
+ "setup" : _("Setup, site management"),
"config" : _("Configuration generation"),
"inline-snmp" : _("Inline SNMP"),
- "agents" : _("Agent Bakery"),
- "metrics" : _("Metrics System"),
+ "agents" : _("Agent bakery"),
+ "metrics" : _("Metrics system"),
+ "alerts": _("Alert handlers"),
# CMK-OMD
- "omd": _("Site Management"),
- "rpm": _("RPM Packaging"),
- "deb": _("DEB Packaging"),
+ "omd": _("Site management"),
+ "rpm": _("RPM packaging"),
+ "deb": _("DEB packaging"),
"nagvis": _("NagVis"),
- "packages": _("Other Components"),
- "distros": _("Linux Distributions"),
+ "packages": _("Other components"),
+ "distros": _("Linux distributions"),
}
def werk_levels():
return {
- 1 : _("Trivial Change"),
- 2 : _("Prominent Change"),
- 3 : _("Major Feature"),
+ 1 : _("Trivial change"),
+ 2 : _("Prominent change"),
+ 3 : _("Major change"),
}
diff --git a/web/htdocs/werks.py b/web/htdocs/werks.py
index 0e4675d..0a5f9c6 100644
--- a/web/htdocs/werks.py
+++ b/web/htdocs/werks.py
@@ -450,12 +450,8 @@ def render_werk_compatibility(werk):
return cmk.werks.werk_compatibilities()[werk["compatible"]]
def render_werk_component(werk):
- if werk["component"] not in cmk.werks.werk_components():
- html.li(_("Invalid component %s in werk %s")\
- % (werk["component"], render_werk_id(werk,
with_link=True)))
- return werk["component"]
- else:
- return cmk.werks.werk_components()[werk["component"]]
+ return cmk.werks.werk_components().get(werk["component"],
werk["component"])
+
def render_werk_title(werk):
title = werk["title"]