Module: check_mk
Branch: master
Commit: d1b019cbc8c67fccf50b24289a28ef3a8ab90975
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d1b019cbc8c67f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Sep 9 15:57:10 2016 +0200
3851 Host edit dialog: Checkbox hosttags are now checked by default
In most cases you want to have the checkbox ticked by default when
setting a host tag group explicit for a host.
---
.werks/3851 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/watolib.py | 4 ++--
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/3851 b/.werks/3851
new file mode 100644
index 0000000..d7bdea5
--- /dev/null
+++ b/.werks/3851
@@ -0,0 +1,10 @@
+Title: Host edit dialog: Checkbox hosttags are now checked by default
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.4.0i1
+Date: 1473429363
+Class: feature
+
+In most cases you want to have the checkbox ticked by default when
+setting a host tag group explicit for a host.
diff --git a/ChangeLog b/ChangeLog
index 4f63b5a..016a544 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -511,6 +511,7 @@
* 3785 WATO rulesets: now able to set a negate option for services and items...
* 3786 WATO webapi: now able to bake agents with the new action bake_agents
* 3792 check_http: now able to configure HTTP method PROPFIND
+ * 3851 Host edit dialog: Checkbox hosttags are now checked by default...
* 3060 FIX: Folder properties: Fixed exception when a user has no alias set...
* 3062 FIX: Git integration: Fixed not adding files in WATO folders to git control
* 3203 FIX: Distributed WATO: Fixed exception in remote host service discovery...
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index d79c9c0..8ee75ad 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -2551,7 +2551,7 @@ class HostTagAttribute(Attribute):
tag_id, title, self._taglist = tag_definition
name = "tag_" + tag_id
if len(self._taglist) == 1:
- def_value = None
+ def_value = True
else:
def_value = self._taglist[0][0]
Attribute.__init__(self, name, title, "", def_value)
@@ -2578,7 +2578,7 @@ class HostTagAttribute(Attribute):
def render_input(self, varprefix, value):
varname = varprefix + "attr_" + self.name()
if value == None:
- value = html.var(varname,"") # "" is important for tag
groups with an empty tag entry
+ value = html.var(varname, "") # "" is important for tag
groups with an empty tag entry
# Tag groups with just one entry are being displayed
# as checkboxes