Module: check_mk
Branch: master
Commit: 5d1a7c59f245da36176bb7ec8f77e9191c4bd8a8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5d1a7c59f245da…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Jan 22 14:28:21 2015 +0100
Interface groups: changed input field of interface port type to dropdown choice
---
web/plugins/wato/check_parameters.py | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index de4bfac..cca93b2 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -4669,20 +4669,23 @@ register_rule(group + '/' + subgroup_networking,
help = _("Name of group in service
description"),
allow_empty = False,
)),
- ("iftype", Integer(
- title = _("Restrict interface port type"),
- help = _("Only interfaces with the given port type
are put into this group. "
- "For example 53 (propVirtual)."),
- default_value = 6,
- minvalue = 1,
- maxvalue = 255,
+ ("iftype", Transform(
+ DropdownChoice(
+ title = _("Select interface port
type"),
+ choices = _if_porttype_choices,
+ help = _("Only interfaces with the given
port type are put into this group. "
+ "For example 53
(propVirtual)."),
+ ),
+ forth = lambda x: str(x),
+ back = lambda x: int(x),
)),
("include_items", ListOfStrings(
title = _("Restrict interface items"),
help = _("Only interface with this item names are
put into this group."),
)),
("single", Checkbox(
- title = _("Do not list grouped interfaces
separately"),
+ title = _("Group separately"),
+ label = _("Do not list grouped interfaces
separately"),
)),
],
required_keys = ["name", "single"]),