Module: check_mk
Branch: master
Commit: 22ae8a767eb67d5230e6272e7547ab627a12ec84
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=22ae8a767eb67d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Aug 12 11:07:52 2013 +0200
WATO: Show inventory hint after creating a host without inventory
---
web/htdocs/wato.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index f71fe1a..57860c5 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2048,7 +2048,15 @@ def mode_edithost(phase, new, cluster):
if errors: # keep on this page if host does not validate
return
elif new:
- return go_to_services and "firstinventory" or
"folder"
+ if host.get('tag_agent') != 'ping':
+ create_result = 'folder', _('Successfully created the
host. Now you should do an '
+ '<a
href="%s">inventory</a> in order to auto-configure '
+ 'all services to be checked on this
host.') % \
+ make_link([("mode",
"inventory"), ("host", hostname)])
+ else:
+ create_result = 'folder'
+
+ return go_to_services and "firstinventory" or create_result
else:
return go_to_services and "inventory" or "folder"