Module: check_mk
Branch: master
Commit: 981ab0d4109e03a8eb389ab91d00c784f4367e72
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=981ab0d4109e03…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 20 13:44:33 2016 +0100
#2905 FIX Check plugins: Non existant man pages now result in helpful error messages
---
.werks/2905 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 4 ++++
3 files changed, 14 insertions(+)
diff --git a/.werks/2905 b/.werks/2905
new file mode 100644
index 0000000..5062195
--- /dev/null
+++ b/.werks/2905
@@ -0,0 +1,9 @@
+Title: Check plugins: Non existant man pages now result in helpful error messages
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.7i4
+Date: 1453293863
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index f4015fa..0f53543 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -257,6 +257,7 @@
* 2779 FIX: Fix moving of folders...
* 2825 FIX: Parameter overview page no longer raises an exception in certain
scenarios...
* 2925 FIX: Editing a notification rule for a missing user selected random other
user...
+ * 2905 FIX: Check plugins: Non existant man pages now result in helpful error
messages
Notifications:
* 2811 Mail notifications: Now able to add Host/Service Notes Url...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 102d926..a5b3332 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -14614,7 +14614,11 @@ def mode_check_manpage(phase):
if phase == "title":
if not re.match("^[a-zA-Z0-9_.]+$", check_type):
raise Exception("Invalid check type")
+
manpage = check_mk_local_automation("get-check-manpage", [ check_type
])
+ if manpage == None:
+ raise MKUserError(None, _("There is no manpage for this check."))
+
html.set_cache("manpage", manpage)
return _("Check plugin manual page") + " - " +
manpage["header"]["title"]