Module: check_mk
Branch: master
Commit: e7a7e0f9784c520fb72211e77dc274ae6e0c9c42
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e7a7e0f9784c52…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Nov 23 06:30:01 2010 +0100
webconf: renamed to wato
---
LIESMICH.webconf => LIESMICH.wato | 0
web/htdocs/.f12 | 2 +-
web/htdocs/check_mk.css | 26 +++++++++++++-------------
web/htdocs/{webconf.py => wato.py} | 18 +++++++++---------
web/plugins/pages/wato.py | 5 +++++
web/plugins/pages/webconf.py | 5 -----
web/plugins/sidebar/{webconf.py => wato.py} | 10 +++++-----
7 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/LIESMICH.webconf b/LIESMICH.wato
similarity index 100%
rename from LIESMICH.webconf
rename to LIESMICH.wato
diff --git a/web/htdocs/.f12 b/web/htdocs/.f12
index 41938b8..240a59f 100644
--- a/web/htdocs/.f12
+++ b/web/htdocs/.f12
@@ -2,4 +2,4 @@
set -e
sudo cp -rv images *.css *.py /omd/versions/default/share/check_mk/web/htdocs
sudo cp -v ../plugins/pages/*.py /omd/versions/default/share/check_mk/web/plugins/pages/
-sudo omd restart webconf apache
+sudo omd restart wato apache
diff --git a/web/htdocs/check_mk.css b/web/htdocs/check_mk.css
index ad0a4e5..ae7edb9 100644
--- a/web/htdocs/check_mk.css
+++ b/web/htdocs/check_mk.css
@@ -1686,19 +1686,19 @@ table.add_snapin i {
}
/*
- __ __ _ __
- \ \ / /__| |__ ___ ___ _ __ / _|
- \ \ /\ / / _ \ '_ \ / __/ _ \| '_ \| |_
- \ V V / __/ |_) | (_| (_) | | | | _|
- \_/\_/ \___|_.__/ \___\___/|_| |_|_|
-
+ __ ___ _____ ___
+ \ \ / / \|_ _/ _ \
+ \ \ /\ / / _ \ | || | | |
+ \ V V / ___ \| || |_| |
+ \_/\_/_/ \_\_| \___/
+
*/
-div.webconf {
+div.wato {
padding: 0px;
margin: 0px;
}
-.webconf table.auditlog {
+.wato table.auditlog {
background-image: url("images/form_background.png");
background-repeat: repeat;
border-collapse: collapse;
@@ -1707,24 +1707,24 @@ div.webconf {
width: 100%;
}
-.webconf table.pending {
+.wato table.pending {
background-color: #fff;
}
-.webconf table.auditlog td {
+.wato table.auditlog td {
border: 1px solid white;
padding: 2px 6px;
}
-.webconf .pending td {
+.wato .pending td {
border: 1px solid #444;
padding: 2px 6px;
}
-.webconf td.dns {
+.wato td.dns {
color: #666;
}
-.webconf td.dnserror {
+.wato td.dnserror {
color: #f00;
}
diff --git a/web/htdocs/webconf.py b/web/htdocs/wato.py
similarity index 98%
rename from web/htdocs/webconf.py
rename to web/htdocs/wato.py
index 5706128..12f01ab 100644
--- a/web/htdocs/webconf.py
+++ b/web/htdocs/wato.py
@@ -2,7 +2,7 @@
# encoding: utf-8
# TODO: Ein Logfile pro filename anlegen, z.B. mit Unterverzeichnis
-# var/web/webconf/windows/audit.log
+# var/web/wato/windows/audit.log
# -----------------------------------------------------------------
# ___ _ _
@@ -21,15 +21,15 @@ import htmllib
# Problem hier: Das ganze funktioniert noch nicht in der local/-Hierarchie
# from mod_python import importer
-# config = importer.import_module("config", path =
["/omd/sites/webconf/share/check_mk/web/htdocs"])
+# config = importer.import_module("config", path =
["/omd/sites/wato/share/check_mk/web/htdocs"])
# config = importer.import_module("config")
-config.declare_permission("use_webconf",
+config.declare_permission("use_wato",
"Use Webconfiguration",
"Only with this permission, users are allowed to use Check_MK web configuration
GUI.",
[ "admin", ])
-conf_dir = defaults.var_dir + "/webconf/"
+conf_dir = defaults.var_dir + "/wato/"
# -----------------------------------------------------------------
# __ __ _
@@ -97,7 +97,7 @@ def page_index(h):
# Title
html.header("Check_MK WATO - %s - %s" % (title,
modefunc("title")))
- html.write("<div class=webconf>\n")
+ html.write("<div class=wato>\n")
# Show contexts buttons
@@ -209,7 +209,7 @@ def host_link(hostname):
def render_audit_log(log, what):
- htmlcode = '<table class="webconf auditlog %s">'
+ htmlcode = '<table class="wato auditlog %s">'
even = "even"
for t, user, action, text in log:
text = parse_host_names(text)
@@ -501,7 +501,7 @@ def read_configuration_file():
for h in variables["all_hosts"]:
parts = h.split('|')
hostname = parts[0]
- tags = [ tag for tag in parts[1:] if tag != 'webconf' and not
tag.endswith('.mk') ]
+ tags = [ tag for tag in parts[1:] if tag != 'wato' and not
tag.endswith('.mk') ]
ipaddress = variables["ipaddresses"].get(hostname)
aliases = host_extra_conf(hostname,
variables["extra_host_conf"]["alias"])
if len(aliases) > 0:
@@ -521,7 +521,7 @@ def write_configuration_file():
alias, ipaddress, tags = g_hosts[hostname]
if alias:
aliases.append((alias, [hostname]))
- all_hosts.append("|".join([hostname] + tags + [ g_filename,
'webconf' ]))
+ all_hosts.append("|".join([hostname] + tags + [ g_filename,
'wato' ]))
if ipaddress:
ipaddresses[hostname] = ipaddress
@@ -564,7 +564,7 @@ def check_filename():
if not title:
raise MKGeneralException("No config file <tt>%s</tt> is declared
in <tt>multisite.mk</tt>" % filename)
- if not config.may("use_webconf") or config.role not in roles:
+ if not config.may("use_wato") or config.role not in roles:
raise MKAuthException("You are not allowed to edit this configuration
file!")
return filename, title
diff --git a/web/plugins/pages/wato.py b/web/plugins/pages/wato.py
new file mode 100644
index 0000000..2183a40
--- /dev/null
+++ b/web/plugins/pages/wato.py
@@ -0,0 +1,5 @@
+import wato
+
+pagehandlers.update({
+ "wato" : wato.page_index,
+})
diff --git a/web/plugins/pages/webconf.py b/web/plugins/pages/webconf.py
deleted file mode 100644
index ad7e964..0000000
--- a/web/plugins/pages/webconf.py
+++ /dev/null
@@ -1,5 +0,0 @@
-import webconf
-
-pagehandlers.update({
- "webconf" : webconf.page_index,
-})
diff --git a/web/plugins/sidebar/webconf.py b/web/plugins/sidebar/wato.py
similarity index 77%
rename from web/plugins/sidebar/webconf.py
rename to web/plugins/sidebar/wato.py
index 73dda7a..066cab6 100644
--- a/web/plugins/sidebar/webconf.py
+++ b/web/plugins/sidebar/wato.py
@@ -2,8 +2,8 @@
import config
-def render_webconf_files():
- if not config.may("use_webconf"):
+def render_wato_files():
+ if not config.may("use_wato"):
html.write("You are not allowed to use Check_MK's web configuration
GUI.")
elif len(config.config_files)== 0:
html.write("No configuration files are defined.<br>"
@@ -13,13 +13,13 @@ def render_webconf_files():
else:
for filename, title, roles in config.config_files:
if config.role in roles:
- bulletlink(title, "webconf.py?filename=%s" % filename)
+ bulletlink(title, "wato.py?filename=%s" % filename)
-sidebar_snapins["webconf"] = {
+sidebar_snapins["wato"] = {
"title" : "Check_MK Web Administration Tool",
"description" : "WATO - the Web Administration Tool of Check_MK -
manage hosts to be monitored without access to the command line",
"author" : "Mathias Kettner",
- "render" : render_webconf_files,
+ "render" : render_wato_files,
"allowed" : [ "admin", "user" ],
}