Module: check_mk
Branch: master
Commit: bee77aff513651d7fdebefd2c01a2b7e1f0c58f6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bee77aff513651…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Feb 1 13:53:01 2019 +0100
Improved service discovery status output
Hosts that have not executed a service discovery yet show a more helpful
status message.
CMK-1556
Change-Id: Ifb60bd59eb4ffe6a6dc766bac05babb559be727c
---
cmk/gui/wato/pages/services.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/cmk/gui/wato/pages/services.py b/cmk/gui/wato/pages/services.py
index 8a627cb..187f936 100644
--- a/cmk/gui/wato/pages/services.py
+++ b/cmk/gui/wato/pages/services.py
@@ -525,10 +525,10 @@ class ModeAjaxServiceDiscovery(WatoWebApiMode):
def _get_status_message(self, discovery_result):
# type: (DiscoveryResult) -> Optional[Text]
- if discovery_result.job_status[
- "state"] == JobStatus.state_initialized and
discovery_result.job_status[
- "is_running"]:
- return _("Initializing discovery...")
+ if discovery_result.job_status["state"] ==
JobStatus.state_initialized:
+ if self._is_running(discovery_result):
+ return _("Initializing discovery...")
+ return _("No discovery information available. Please perform a full
scan.")
job_title = discovery_result.job_status.get("title", _("Service
discovery"))
duration_txt =
cmk.utils.render.Age(discovery_result.job_status["duration"])