Module: check_mk
Branch: master
Commit: d4e17e1ed708b6a09d7564e9fcfaad3eadecd465
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d4e17e1ed708b6…
Author: Óscar Nájera <on(a)mathias-kettner.de>
Date: Thu Oct 4 13:41:04 2018 +0200
Fix missing help & id #2
Change-Id: I8edde980ca55c1d6bcd18c3600a488dc21830a3b
---
cmk/gui/htmllib.py | 8 ++++----
cmk/gui/plugins/sidebar/master_control.py | 2 +-
cmk/gui/plugins/sidebar/site_status.py | 4 ++--
cmk/gui/sidebar.py | 2 +-
cmk/gui/views.py | 2 +-
cmk/gui/wato/__init__.py | 2 +-
cmk/gui/wato/pages/global_settings.py | 2 +-
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/cmk/gui/htmllib.py b/cmk/gui/htmllib.py
index a56030a..48fca7b 100644
--- a/cmk/gui/htmllib.py
+++ b/cmk/gui/htmllib.py
@@ -2299,14 +2299,14 @@ class html(HTMLGenerator):
# Shows a colored badge with text (used on WATO activation page for the site status)
- def status_label(self, content, status, help_txt, **attrs):
- self.status_label_button(content, status, help_txt, onclick=None, **attrs)
+ def status_label(self, content, status, title, **attrs):
+ self.status_label_button(content, status, title, onclick=None, **attrs)
# Shows a colored button with text (used in site and customer status snapins)
- def status_label_button(self, content, status, help_txt, onclick, **attrs):
+ def status_label_button(self, content, status, title, onclick, **attrs):
button_cls = "button" if onclick else None
- self.div(content, title=help_txt, class_=[ "status_label", button_cls,
status ],
+ self.div(content, title=title, class_=[ "status_label", button_cls,
status ],
onclick=onclick, **attrs)
diff --git a/cmk/gui/plugins/sidebar/master_control.py
b/cmk/gui/plugins/sidebar/master_control.py
index bc6bc35..ecbe4a7 100644
--- a/cmk/gui/plugins/sidebar/master_control.py
+++ b/cmk/gui/plugins/sidebar/master_control.py
@@ -117,7 +117,7 @@ class MasterControlSnapin(SidebarSnapin):
html.open_td()
html.toggle_switch(
enabled=colvalue,
- help=_("Switch '%s' to '%s'") % (title,
_("off") if colvalue else _("on")),
+ help_txt=_("Switch '%s' to '%s'") %
(title, _("off") if colvalue else _("on")),
onclick=onclick,
)
html.close_td()
diff --git a/cmk/gui/plugins/sidebar/site_status.py
b/cmk/gui/plugins/sidebar/site_status.py
index 5f1a6a9..6eaa1c5 100644
--- a/cmk/gui/plugins/sidebar/site_status.py
+++ b/cmk/gui/plugins/sidebar/site_status.py
@@ -90,13 +90,13 @@ class SiteStatus(SidebarSnapin):
html.close_td()
html.open_td(class_="state")
if switch == "missing":
- html.status_label(content=state, status=state, help=_("Site is
missing"))
+ html.status_label(content=state, status=state, title=_("Site is
missing"))
else:
url = html.makeactionuri_contextless([
("_site_switch", "%s:%s" % (sitename, switch)),
], filename="switch_site.py")
html.status_label_button(content=state, status=state,
- help=_("enable this site") if state == "disabled"
else _("disable this site"),
+ title=_("enable this site") if state ==
"disabled" else _("disable this site"),
onclick="switch_site(%s)" % (json.dumps(url)))
html.close_tr()
html.close_table()
diff --git a/cmk/gui/sidebar.py b/cmk/gui/sidebar.py
index 9c86c44..4c0850b 100644
--- a/cmk/gui/sidebar.py
+++ b/cmk/gui/sidebar.py
@@ -547,7 +547,7 @@ class SidebarRenderer(object):
html.icon_button("logout.py", _("Log out"),
"sidebar_logout", target="_top")
html.icon_button("return void();", _("You have pending
messages."),
- "sidebar_messages", onclick =
'read_message()', id = 'msg_button', style = 'display:none')
+ "sidebar_messages", onclick =
'read_message()', id_ = 'msg_button', style = 'display:none')
html.open_div(style="display:none;", id_="messages")
self.render_messages()
html.close_div()
diff --git a/cmk/gui/views.py b/cmk/gui/views.py
index 5ee54ca..172cbf1 100644
--- a/cmk/gui/views.py
+++ b/cmk/gui/views.py
@@ -1505,7 +1505,7 @@ def show_context_links(thisview, datasource, show_filters,
url = watolib.link_to_host_by_name(host)
else:
url = watolib.link_to_folder_by_path(html.var("wato_folder",
""))
- html.context_button(_("WATO"), url, "wato",
id="wato",
+ html.context_button(_("WATO"), url, "wato",
id_="wato",
bestof = config.context_buttons_to_show)
# Button for creating an instant report (if reporting is available)
diff --git a/cmk/gui/wato/__init__.py b/cmk/gui/wato/__init__.py
index 3e94e6a..a38e8cb 100644
--- a/cmk/gui/wato/__init__.py
+++ b/cmk/gui/wato/__init__.py
@@ -1036,7 +1036,7 @@ class ModeFolder(WatoMode):
# 1. add <nobr> round the single tags to prevent wrap within tags
# 2. add "zero width space" (​)
tag_title = "|".join([ '%s' % t for t in host.tags()
])
- table.cell(_("Tags"), help=tag_title,
css="tag-ellipsis")
+ table.cell(_("Tags"), help_txt=tag_title,
css="tag-ellipsis")
html.write("<b style='color:
#888;'>|</b>​".join([ '<nobr>%s</nobr>' %
t for t in host.tags() ]))
# Located in folder
diff --git a/cmk/gui/wato/pages/global_settings.py
b/cmk/gui/wato/pages/global_settings.py
index 04f8bd7..324588d 100644
--- a/cmk/gui/wato/pages/global_settings.py
+++ b/cmk/gui/wato/pages/global_settings.py
@@ -184,7 +184,7 @@ class GlobalSettingsMode(WatoMode):
html.open_div(class_=["toggle_switch_container",
modified_cls])
html.toggle_switch(
enabled=value,
- help=_("Immediately toggle this setting"),
+ help_txt=_("Immediately toggle this setting"),
href=html.makeactionuri([("_action",
"toggle"), ("_varname", varname)]),
class_=modified_cls,
title=title,