Module: check_mk
Branch: master
Commit: 80adc39c29a2914d07ce4b6e39c12232dec1c7dd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=80adc39c29a291…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 21 11:13:47 2013 +0100
FIX Improved handling of interface inventory states / types
---
.werks/234 | 8 ++++++++
ChangeLog | 1 +
web/htdocs/js/checkmk.js | 13 +++++++++++++
web/plugins/wato/check_parameters.py | 11 ++++++++---
4 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/.werks/234 b/.werks/234
new file mode 100644
index 0000000..bff961a
--- /dev/null
+++ b/.werks/234
@@ -0,0 +1,8 @@
+Title: Improved handling of interface inventory states / types
+Level: 1
+Component: wato
+Version: 1.2.3i7
+Date: 1385028795
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index fe66ca4..1f2b0ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -59,6 +59,7 @@
* 0039 FIX: Encoding bug on rendering global settings...
* 0219 FIX: Improved output of long contact group names in WATO folders
* 0220 FIX: Added HTML escaping to several global settings attributes
+ * 0234 FIX: Improved handling of interface inventory states / types
Notifications:
* 0005 Added notification script for sending SMS via
mobilant.com...
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index 929711f..1cd4725 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -1711,6 +1711,19 @@ function valuespec_listof_fixarrows(oTbody) {
}
}
+function vs_list_choice_toggle_all(varprefix) {
+ var tbl = document.getElementById(varprefix + "_tbl");
+ var checkboxes = tbl.getElementsByTagName("input");
+ if (!checkboxes)
+ return;
+
+ // simply use state of first texbox as base
+ var state = ! checkboxes[0].checked;
+ for (var i = 0; i < checkboxes.length; i++) {
+ checkboxes[i].checked = state;
+ }
+}
+
function vs_textascii_button(img, text, how) {
var oInput = img.previousElementSibling;
while (oInput.tagName == "A")
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index bb4f649..ef2058d 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -242,13 +242,18 @@ register_rule(group + '/' + subgroup_networking,
("portstates", ListChoice(title = _("Network interface port states
to inventorize"),
help = _("When doing inventory on switches or other devices with
network interfaces "
"then only ports found in one of the configured port states
will be added to the monitoring."),
- choices = _if_portstate_choices)),
+ choices = _if_portstate_choices,
+ toggle_all = True,
+ default_value = ['1'],
+ )),
("porttypes", ListChoice(title = _("Network interface port types
to inventorize"),
help = _("When doing inventory on switches or other devices with
network interfaces "
"then only ports of the specified types will be created
services for."),
choices = _if_porttype_choices,
- columns = 3)),
-
+ columns = 3,
+ toggle_all = True,
+ default_value = [ '6', '32', '62', '117' ]
+ )),
],
help = _('This rule can be used to control the inventory for network ports.
'
'You can configure the port types and port states for
inventory'