Module: check_mk
Branch: master
Commit: fd933a5e733638eb20a475372d3b0e9bdee69304
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fd933a5e733638…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon May 30 12:14:52 2011 +0200
Multisite: fix default value of checkboxes
---
web/htdocs/htmllib.py | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 662f981..ae6ae74 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -215,6 +215,11 @@ class html:
if value != None:
self.write("<input type=hidden name=%s value=\"%s\">\n" % (var, attrencode(value)))
+ # Beware: call this method just before end_form(). It will
+ # add all current non-underscored HTML variables as hiddedn
+ # field to the form - *if* they are not used in any input
+ # field. (this is the reason why you must not add any further
+ # input fields after this method has been called).
def hidden_fields(self, varlist = None, **args):
add_action_vars = args.get("add_action_vars", False)
if varlist != None:
@@ -325,7 +330,16 @@ class html:
error = self.user_errors.get(varname)
if error:
html = "<x class=inputerror>"
- value = self.req.vars.get(varname, deflt)
+ # Problem with checkboxes: The browser will add the variable
+ # only to the URL if the box is checked. So in order to detect
+ # wether we should add the default value, we need to detect
+ # if the form is printed for the first time. This is the
+ # case if "filled_in" is not set.
+ if not self.has_var("filled_in"):
+ value = self.req.vars.get(varname, deflt)
+ else:
+ value = self.req.vars.get(varname, "")
+
if value != "" and value != False:
checked = " CHECKED"
else:
Module: check_mk
Branch: master
Commit: 8c30e787412ca6a25afa5803345a541660292cbc
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8c30e787412ca6…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri May 27 09:22:14 2011 +0200
Fixed syntax error in man page of f5_bigip_pool
---
checkman/f5_bigip_pool | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/checkman/f5_bigip_pool b/checkman/f5_bigip_pool
index 769251a..b7a2032 100644
--- a/checkman/f5_bigip_pool
+++ b/checkman/f5_bigip_pool
@@ -4,12 +4,17 @@ author: Florian Heigl <fh(a)mathias-kettner.de>
license: GPL
distribution: check_mk
description:
- The check queries the MIB tables of F5 BIG-IP loadbalancers (local traffic managers) for the status of any load balancing pools. It gathers the number of loadbalancers backing the pool and how many of those are working. It doesn't currently honor the 'MinUpMembers' parameter that can be set to trigger actions for the pool if too many members fail.
-It supports devices running the 9.0 and above releases of the F5 OS. It's tested against 9.3 devices.
+ The check queries the MIB tables of F5 BIG-IP loadbalancers (local traffic managers) for the
+ status of any load balancing pools. It gathers the number of loadbalancers backing the pool
+ and how many of those are working. It doesn't currently honor the 'MinUpMembers' parameter
+ that can be set to trigger actions for the pool if too many members fail.
-inventory:
- The check gather a list of the pools defined on a system. It will include non-enabled ones, as this is considered a temporary state.
+ It supports devices running the 9.0 and above releases of the F5 OS. It's tested against 9.3
+ devices.
+inventory:
+ The check gather a list of the pools defined on a system. It will include non-enabled ones,
+ as this is considered a temporary state.
perfdata:
the check does not (yet) generate performance data.