Module: check_mk
Branch: master
Commit: da873d7be47f4784a74df8e8836d049346504594
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=da873d7be47f47…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat May 12 13:39:20 2012 +0200
Cleaned up, improved layout
---
web/htdocs/check_mk.css | 9 +++++-
web/htdocs/pages.css | 1 -
web/htdocs/valuespec.py | 3 +-
web/htdocs/wato.py | 11 +++-----
web/plugins/wato/check_parameters.py | 50 ++++++++++++++++-----------------
5 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/web/htdocs/check_mk.css b/web/htdocs/check_mk.css
index a0a1c01..71f2b62 100644
--- a/web/htdocs/check_mk.css
+++ b/web/htdocs/check_mk.css
@@ -78,6 +78,11 @@ input[type=text] {
input[type=password] {
box-shadow: 0.1px 1.2px 1.8px 0 #800 inset;
}
+input[type=text],input[type=text] {
+ height: 15px;
+ padding: 2px 3px;
+ vertical-align: middle;
+}
select {
padding: 1px 3px;
@@ -355,12 +360,12 @@ div.dictelement {
}
table.valuespec_tuple td.tuple_left {
- padding-right: 10px;
+ padding-right: 8px;
}
table.valuespec_tuple td.tuple_right,
table.valuespec_tuple td.tuple_left {
- vertical-align: top;
+ vertical-align: middle;
padding-bottom: 3px;
}
diff --git a/web/htdocs/pages.css b/web/htdocs/pages.css
index c4c052a..037ccb0 100644
--- a/web/htdocs/pages.css
+++ b/web/htdocs/pages.css
@@ -457,7 +457,6 @@ div.textinputlegend {
}
input.date, input.time {
- padding: 0ex 0.5ex;
font-family: monospace;
}
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 568b035..6200d08 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -179,7 +179,8 @@ class Integer(ValueSpec):
self._display_format = kwargs.get("display_format", "%d")
if "size" not in kwargs and "maxvalue" in kwargs:
- self._size = 1 + int(math.log10(self._maxvalue))
+ self._size = 1 + int(math.log10(self._maxvalue)) + \
+ (type(self._maxvalue) == float and 3 or 0)
def canonical_value(self):
if self._minvalue:
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 68bc94f..8e96ce8 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -5076,12 +5076,9 @@ def edit_value(valuespec, value, title=""):
title = title + "<br>"
help = valuespec.help() or ""
html.write('<tr>')
- if help:
- html.write('<td class=legend>%s' % title)
- html.help(help)
- html.write("</td><td class=content>")
- else:
- html.write('<td colspan=2 class=content>')
+ html.write('<td class=legend>%s' % title)
+ html.help(help)
+ html.write("</td><td class=content>")
valuespec.render_input("ve", value)
html.write("</td></tr>")
@@ -9338,7 +9335,7 @@ def mode_rulesets(phase):
if '/' in groupname:
subgroupname = groupname.split("/", 1)[1]
else:
- subgroupname = groupname
+ subgroupname = title
# if do_folding:
# html.begin_foldable_container("rulesets", groupname,
False, subgroupname, indent=False)
html.write("<h3>%s</h3>" % subgroupname)
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index f5c1640..e280f1e 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -34,17 +34,15 @@ register_rulegroup("checkparams", _("Parameters for
Inventorized Checks"),
group = "checkparams"
subgroup_networking = _("Networking")
-subgroup_windows = _("Windows")
+# subgroup_windows = _("Windows")
subgroup_storage = _("Storage, Filesystems and Files")
-subgroup_cpumem = _("Memory, CPU, Kernel resources")
-subgroup_time = _("Time synchronization")
+subgroup_os = _("Operating System Ressources")
+# subgroup_time = _("Time synchronization")
subgroup_printing = _("Printers")
subgroup_environment = _("Temperature, Humidity, etc.")
-subgroup_database = _("SQL Databases")
-subgroup_applications = _("Various applications")
+subgroup_applications = _("Applications, Processes & Services")
subgroup_virt = _("Virtualization")
subgroup_hardware = _("Hardware, BIOS")
-subgroup_ps = _("Processes and Services")
register_rule(group + "/" + subgroup_networking,
"ping_levels",
@@ -138,7 +136,7 @@ register_rule(group + '/' + subgroup_applications,
checkgroups = []
checkgroups.append((
- subgroup_windows,
+ subgroup_applications,
"ad_replication",
_("Active Directory Replication"),
Tuple(
@@ -317,7 +315,7 @@ checkgroups.append((
checkgroups.append((
- subgroup_time,
+ subgroup_os,
"systemtime",
_("System time offset"),
Tuple(
@@ -334,7 +332,7 @@ checkgroups.append((
checkgroups.append((
subgroup_storage,
"fileinfo",
- _("Fileinfo"),
+ _("Size and age of single files"),
Dictionary(
elements = [
( "minage",
@@ -411,7 +409,7 @@ register_rule(group + '/' + subgroup_storage,
checkgroups.append((
subgroup_storage,
"fileinfo-groups",
- _("Fileinfo Groups"),
+ _("Size, age and count of file groups"),
Dictionary(
elements = [
( "minage_oldest",
@@ -495,7 +493,7 @@ checkgroups.append((
))
checkgroups.append((
- subgroup_cpumem,
+ subgroup_os,
"memory_pagefile_win",
_("Memory and pagefile levels for Windows"),
Dictionary(
@@ -636,7 +634,7 @@ checkgroups.append((
))
checkgroups.append((
- subgroup_windows,
+ subgroup_applications,
"msx_queues",
_("MS Exchange message queues"),
Tuple(
@@ -690,8 +688,8 @@ checkgroups.append((
help = _("The filesystem levels will never fall below these
values, when using "
"the magic factor and the filesystem is very
small."),
elements = [
- Percentage(title = _("Warning at"), label = _("%
usage"), allow_int = True),
- Percentage(title = _("Critical at"), label = _("%
usage"), allow_int = True)])),
+ Percentage(title = _("Warning at"), label =
_("usage"), allow_int = True),
+ Percentage(title = _("Critical at"), label =
_("usage"), allow_int = True)])),
( "trend_range",
Optional(
Integer(
@@ -831,7 +829,7 @@ checkgroups.append((
checkgroups.append((
- subgroup_cpumem,
+ subgroup_os,
"memory",
_("Main memory usage (Linux / UNIX)"),
Alternative(
@@ -870,7 +868,7 @@ checkgroups.append((
))
checkgroups.append((
- subgroup_cpumem,
+ subgroup_os,
"cpu_load",
_("CPU load (not utilization!)"),
Tuple(
@@ -886,7 +884,7 @@ checkgroups.append((
None, None))
checkgroups.append((
- subgroup_cpumem,
+ subgroup_os,
"cpu_utilization",
_("CPU utilization (percentual)"),
Optional(
@@ -901,7 +899,7 @@ checkgroups.append((
None, None))
checkgroups.append((
- subgroup_cpumem,
+ subgroup_os,
"cpu_iowait",
_("CPU utilization (disk wait)"),
Optional(
@@ -939,7 +937,7 @@ checkgroups.append((
None))
checkgroups.append((
- subgroup_database,
+ subgroup_applications,
"oracle_logswitches",
_("Oracle Logswitches"),
Tuple(
@@ -958,7 +956,7 @@ checkgroups.append((
checkgroups.append((
- subgroup_windows,
+ subgroup_applications,
"win_dhcp_pools",
_("Windows DHCP Pool"),
Tuple(
@@ -974,7 +972,7 @@ checkgroups.append((
None))
checkgroups.append((
- subgroup_cpumem,
+ subgroup_os,
"threads",
_("Number of threads"),
Tuple(
@@ -986,7 +984,7 @@ checkgroups.append((
None, None))
checkgroups.append((
- subgroup_cpumem,
+ subgroup_os,
"vm_counter",
_("Number of kernel events per second"),
Tuple(
@@ -1070,7 +1068,7 @@ checkgroups.append((
None, None))
checkgroups.append((
- subgroup_time,
+ subgroup_os,
"uptime",
_("Display the system's uptime as a check"),
None,
@@ -1148,7 +1146,7 @@ checkgroups.append((
checkgroups.append((
- subgroup_ps,
+ subgroup_applications,
"services",
_("Windows services"),
None,
@@ -1237,7 +1235,7 @@ checkgroups.append((
checkgroups.append((
- subgroup_ps,
+ subgroup_applications,
"wmic_process",
_("Memory and CPU of processes on Windows"),
Tuple(
@@ -1308,7 +1306,7 @@ group = "static"
# Add checks that have parameters but are only configured as manual checks
checkgroups.append((
- subgroup_ps,
+ subgroup_applications,
"ps",
_("State and count of processes"),
Tuple(