Module: check_mk
Branch: master
Commit: aa6658f160f7c7f2ea69757fa7becb0df5df118e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=aa6658f160f7c7…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Oct 30 09:57:48 2011 +0100
WATO: make global variables also foldable
---
web/htdocs/check_mk.css | 11 +++++++++++
web/htdocs/wato.py | 12 ++++++------
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/web/htdocs/check_mk.css b/web/htdocs/check_mk.css
index 4a0bf53..da8e1c1 100644
--- a/web/htdocs/check_mk.css
+++ b/web/htdocs/check_mk.css
@@ -2303,6 +2303,17 @@ table.add_snapin i {
width: 300px;
}
+/* Table in page "Global variables" */
+.wato table.data.globalvars {
+ width: 100%;
+}
+.wato table.data.globalvars td.title {
+ width: 430px;
+}
+.wato table.data.globalvars td.varname {
+ width: 300px;
+}
+
/*
____
| _ \ _ __ ___ __ _ _ __ ___ ___ ___
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 379f3f6..a0aa49c 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -4563,9 +4563,9 @@ def mode_globalvars(phase):
groupnames = g_configvar_groups.keys()
groupnames.sort()
- html.write("<table class=data>")
for groupname in groupnames:
- html.write("<tr><td
colspan=5><h3>%s</h3></td></tr>\n" % groupname)
+ html.begin_foldable_container("globalvars", groupname, False,
groupname, indent=False)
+ html.write('<table class="data globalvars">')
html.write("<tr><th>" + _("Configuration
variable") +
"</th><th>" +_("Check_MK variable") +
"</th><th>" +
_("Default") + "</th><th>" +
_("Your setting") + "</th><th></th></tr>\n")
@@ -4585,8 +4585,8 @@ def mode_globalvars(phase):
edit_url = make_link([("mode", "edit_configvar"),
("varname", varname)])
- html.write('<td><a
href="%s">%s</a></td>' % (edit_url, valuespec.title()))
- html.write('<td><tt>%s</tt></td>' % varname)
+ html.write('<td class=title><a
href="%s">%s</a></td>' % (edit_url, valuespec.title()))
+ html.write('<td
class=varname><tt>%s</tt></td>' % varname)
if varname in current_settings:
html.write('<td class=inherited>%s</td>' %
valuespec.value_to_text(defaultvalue))
html.write('<td><b>%s</b></td>'
% valuespec.value_to_text(current_settings[varname]))
@@ -4602,7 +4602,8 @@ def mode_globalvars(phase):
html.write("</td>")
html.write('</tr>')
- html.write("</table>")
+ html.write("</table>")
+ html.end_foldable_container()
def mode_edit_configvar(phase):
@@ -7157,7 +7158,6 @@ def mode_rulesets(phase):
if something_shown:
html.write("</table>")
html.end_foldable_container()
- html.write("<br>")
html.begin_foldable_container("rulesets", groupname, False,
groupname, indent=False)
html.write('<table class="data rulesets">')
html.write("<tr><th>" + _("Rule set") +
"</th>"