Module: check_mk
Branch: master
Commit: 74c6f6ee6c3709d2a29d21db9eb58c158fb03891
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=74c6f6ee6c3709…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Nov 17 13:57:56 2017 +0100
Added helpful message when viewing the service discovery page of clusters which have no
services
Change-Id: I475d48498d6c86b942dd70e255bdb7b882cbddc7
---
web/htdocs/wato.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 2bf513a..ae36e06 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2818,7 +2818,7 @@ class ModeDiscovery(WatoMode):
("mode",
"object_parameters"),
("host",
self._host_name)]), "rulesets")
if self._host.is_cluster():
- html.context_button(_("Clustered Services"),
+ html.context_button(_("Clustered services"),
watolib.folder_preserving_link([("mode",
"edit_ruleset"),
("varname",
"clustered_services")]), "rulesets")
@@ -2917,6 +2917,15 @@ class ModeDiscovery(WatoMode):
(_("Service discovery failed for this host"), e,
retry_link))
return
+ if not check_table and self._host.is_cluster():
+ url = watolib.folder_preserving_link([("mode",
"edit_ruleset"),
+ ("varname",
"clustered_services")])
+ html.show_info(_("Could not find any service for your cluster. You first
need to "
+ "specify which services of your nodes shal be added to
the "
+ "cluster. This is done using the <a
href=\"%s\">%s</a> ruleset.") %
+ (url, _("Clustered services")))
+ return
+
map_icons = {self.SERVICE_UNDECIDED: "undecided",
self.SERVICE_MONITORED: "monitored",
self.SERVICE_IGNORED: "disabled"}