Module: check_mk
Branch: master
Commit: 8dce7034ef0ad42ed2c40881a4a8c21d46ab8b44
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8dce7034ef0ad4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 12 16:19:22 2012 +0100
Added empty custom styles to all wato builtin modes
---
web/htdocs/wato.py | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 91 insertions(+), 0 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 1fc1890..d0d1e9f 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -730,6 +730,9 @@ def mode_folder(phase):
if phase == "title":
return g_folder["title"]
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
global_buttons()
if config.may("wato.rulesets") or config.may("wato.seeall"):
@@ -1414,6 +1417,9 @@ def mode_editfolder(phase, new):
if phase == "title":
return page_title
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
linkvars = [("mode", "folder")]
if html.has_var("backfolder"):
@@ -1642,6 +1648,9 @@ def mode_edithost(phase, new):
if phase == "title":
return title
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
if not new:
host_status_button(hostname, "hoststatus")
@@ -1795,6 +1804,9 @@ def mode_inventory(phase, firsttime):
title += _(" (cached data)")
return title
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
host_status_button(hostname, "host")
html.context_button(_("Folder"),
@@ -1959,6 +1971,9 @@ def mode_search(phase):
if phase == "title":
return _("Search for hosts in %s and below" %
(g_folder["title"]))
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
html.context_button(_("Folder"), make_link([("mode",
"folder")]), "back")
@@ -2192,6 +2207,9 @@ def mode_bulk_inventory(phase):
if phase == "title":
return _("Bulk service detection (inventory)")
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
html.context_button(_("Folder"), make_link([("mode",
"folder")]), "back")
return
@@ -2289,6 +2307,9 @@ def mode_bulk_edit(phase):
if phase == "title":
return _("Bulk edit hosts")
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
html.context_button(_("Folder"), make_link([("mode",
"folder")]), "back")
return
@@ -2345,6 +2366,9 @@ def mode_bulk_cleanup(phase):
if phase == "title":
return _("Bulk removal of explicit attributes")
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
html.context_button(_("Folder"), make_link([("mode",
"folder")]), "back")
return
@@ -2467,6 +2491,9 @@ def mode_random_hosts(phase):
if phase == "title":
return _("Random Hosts")
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
html.context_button(_("Folder"), make_link([("mode",
"folder")]), "back")
return
@@ -2562,6 +2589,9 @@ def mode_auditlog(phase):
if phase == "title":
return _("Audit logfile")
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
home_button()
changelog_button()
@@ -2613,6 +2643,9 @@ def mode_changelog(phase):
if phase == "title":
return _("Pending changes to activate")
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
home_button()
# Commit pending log right here, if all sites are up-to-date
@@ -4068,6 +4101,10 @@ def effective_attributes(host, folder):
def mode_snapshot(phase):
if phase == "title":
return _("Backup/Restore")
+
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
home_button()
changelog_button()
@@ -4317,6 +4354,9 @@ def mode_main(phase):
if phase == "title":
return _("WATO - Check_MK's Web Administration Tool")
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
changelog_button()
return
@@ -4359,6 +4399,9 @@ def mode_globalvars(phase):
if phase == "title":
return _("Global configuration settings for Check_MK")
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
global_buttons()
return
@@ -4440,6 +4483,9 @@ def mode_edit_configvar(phase):
if phase == "title":
return "Global configuration settings for Check_MK"
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
html.context_button(_("Abort"), make_link([("mode",
"globalvars")]), "abort")
return
@@ -4568,6 +4614,9 @@ def mode_groups(phase, what):
if phase == "title":
return what_name.title()
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
global_buttons()
html.context_button(_("New group"), make_link([("mode",
"edit_%s_group" % what)]), "new")
@@ -4672,6 +4721,9 @@ def mode_edit_group(phase, what):
elif what == "contact":
return _("Edit contact group")
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
html.context_button(_("All groups"), make_link([("mode",
"%s_groups" % what)]), "back")
return
@@ -4804,6 +4856,9 @@ def mode_timeperiods(phase):
if phase == "title":
return _("Timeperiod definitions")
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
global_buttons()
html.context_button(_("New Timeperiod"), make_link([("mode",
"edit_timeperiod")]), "new")
@@ -4961,6 +5016,9 @@ def mode_edit_timeperiod(phase):
else:
return _("Edit time period")
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
html.context_button(_("All Timeperiods"), make_link([("mode",
"timeperiods")]), "back")
return
@@ -5160,6 +5218,9 @@ def mode_sites(phase):
if phase == "title":
return _("Manage Multisite connections")
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
global_buttons()
html.context_button(_("New connection"), make_link([("mode",
"edit_site")]), "new")
@@ -5383,6 +5444,9 @@ def mode_edit_site(phase):
else:
return _("Edit site connection %s" % siteid)
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
html.context_button(_("All Sites"), make_link([("mode",
"sites")]), "back")
return
@@ -6331,6 +6395,9 @@ def mode_users(phase):
if phase == "title":
return _("Manage Users & Contacts")
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
global_buttons()
html.context_button(_("New user"), make_link([("mode",
"edit_user")]), "new")
@@ -6471,6 +6538,9 @@ def mode_edit_user(phase):
else:
return _("Edit user %s" % userid)
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
html.context_button(_("All Users"), make_link([("mode",
"users")]), "back")
return
@@ -6987,6 +7057,9 @@ def mode_roles(phase):
if phase == "title":
return _("Manage Roles & Permissions")
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
global_buttons()
return
@@ -7097,6 +7170,9 @@ def mode_edit_role(phase):
if phase == "title":
return _("Edit user role %s" % id)
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
html.context_button(_("All Roles"), make_link([("mode",
"roles")]), "back")
return
@@ -7301,6 +7377,9 @@ def mode_hosttags(phase):
if phase == "title":
return _("Manage host tag groups")
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
global_buttons()
html.context_button(_("New Tag group"), make_link([("mode",
"edit_hosttag")]), "new")
@@ -7417,6 +7496,9 @@ def mode_edit_hosttag(phase):
else:
return _("Edit tag group")
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
html.context_button(_("All Hosttags"), make_link([("mode",
"hosttags")]), "back")
return
@@ -7906,6 +7988,9 @@ def mode_rulesets(phase):
else:
return _("Rulesets for hosts and services")
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
if only_host:
home_button()
@@ -8048,6 +8133,9 @@ def mode_edit_ruleset(phase):
title += _(" and %s '%s'") %
(rulespec["itemname"], item)
return title
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
global_buttons()
html.context_button(_("All rulesets"),
@@ -8603,6 +8691,9 @@ def mode_edit_rule(phase):
if phase == "title":
return _("Edit rule %s") % rulespec["title"]
+ elif phase == 'styles':
+ return []
+
elif phase == "buttons":
html.context_button(_("Abort"),
make_link([("mode", "edit_ruleset"),