Module: check_mk
Branch: master
Commit: b70a46ef7d72e088e7c565a94ea7843b1ec8e182
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b70a46ef7d72e0…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Feb 3 09:41:59 2011 +0100
WATO: converted services form from GET to POST
---
ChangeLog | 3 +++
web/htdocs/.f12 | 7 -------
web/htdocs/htmllib.py | 6 +++---
web/htdocs/index.py | 14 ++++++++++----
web/htdocs/wato.py | 2 +-
5 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index be45558..c93718e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,9 @@
same as incoming, errors and discards were swapped (thanks to
Paul Freeman)
+ WATO:
+ * Fix too-long-URL problem in cases of many services on one host
+
1.1.9i6:
INCOMPATIBLE CHANGES:
* Removed out-dated checks blade_misc, ironport_misc and snia_sml. Replaced
diff --git a/web/htdocs/.f12 b/web/htdocs/.f12
deleted file mode 100644
index 85d9910..0000000
--- a/web/htdocs/.f12
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-set -e
-sudo cp -r images *.css *.py js /omd/versions/default/share/check_mk/web/htdocs
-sudo cp ../plugins/pages/*.py /omd/versions/default/share/check_mk/web/plugins/pages/
-sudo cp ../plugins/views/*.py /omd/versions/default/share/check_mk/web/plugins/views/
-sudo cp ../plugins/sidebar/*.py
/omd/versions/default/share/check_mk/web/plugins/sidebar/
-sudo omd restart eins apache
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 15d9dc2..d231791 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -158,13 +158,13 @@ class html:
days = hours / 24
return "%d days" % days
- def begin_form(self, name, action = None):
+ def begin_form(self, name, action = None, method = "GET"):
self.form_vars = []
if action == None:
action = self.req.myfile + ".py"
self.current_form = name
- self.write("<form name=%s class=%s action=\"%s\"
method=GET>\n" %
- (name, name, action))
+ self.write("<form name=%s class=%s action=\"%s\"
method=%s>\n" %
+ (name, name, action, method))
self.hidden_field("filled_in", "on")
self.hidden_field("_transid",
str(self.current_transid(self.req.user)))
self.hidden_fields(self.global_vars)
diff --git a/web/htdocs/index.py b/web/htdocs/index.py
index 765e05b..27349bc 100644
--- a/web/htdocs/index.py
+++ b/web/htdocs/index.py
@@ -48,15 +48,21 @@ if defaults.omd_root:
execfile(local_pagehandlers_dir + "/" + fn)
def read_get_vars(req):
- req.multivars = {}
- req.vars = {}
- if req.args:
- req.rawvars = util.parse_qs(req.args, True)
+ def parse_vars(vars):
+ req.rawvars = util.parse_qs(vars, True)
for (key,values) in req.rawvars.items():
if len(values) >= 1:
req.vars[key] = values[-1]
req.multivars[key] = values
+ req.multivars = {}
+ req.vars = {}
+ if req.args:
+ parse_vars(req.args)
+ postvars = req.read()
+ if postvars:
+ parse_vars(postvars)
+
def connect_to_livestatus(html):
html.site_status = {}
# site_status keeps a dictionary for each site with the following
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 45f76fa..7fa5f2c 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -669,7 +669,7 @@ def show_service_table(hostname, firsttime):
table = check_mk_automation("try-inventory", [hostname])
table.sort()
- html.begin_form("checks")
+ html.begin_form("checks", None, "POST")
fixall = 0
for entry in table:
if entry[0] == 'new' and not html.has_var("_activate_all") and
not firsttime: