Module: check_mk
Branch: master
Commit: 09dd1f47ef115b1d9c15d9629500be2f02393ce1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=09dd1f47ef115b…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Thu Oct 12 14:55:52 2017 +0200
5343 Bulk import for custom attributes of hosts
Adds the possibility to import custom attributes of hosts with bulk imports.
Change-Id: I83b3a2ba6577feb7909308d70cf15751fcc6ae06
---
.werks/5343 | 10 ++++++++++
web/htdocs/wato.py | 5 +++++
2 files changed, 15 insertions(+)
diff --git a/.werks/5343 b/.werks/5343
new file mode 100644
index 0000000..ccd1a98
--- /dev/null
+++ b/.werks/5343
@@ -0,0 +1,10 @@
+Title: Bulk import for custom attributes of hosts
+Level: 1
+Component: multisite
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1507812901
+Class: feature
+
+Adds the possibility to import custom attributes of hosts with bulk imports.
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index fda2f9c..5bc3204 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -3830,6 +3830,11 @@ class ModeBulkImport(WatoMode):
for entry in configured_host_tags():
attributes.append(("tag_" + entry[0], _("Tag: %s") %
entry[1]))
+ # Add custom attributes
+ for entry in load_custom_attrs()['host']:
+ name = entry['name']
+ attributes.append((name, _("Custom variable: %s") % name))
+
return attributes