Module: check_mk
Branch: master
Commit: a9c7323cc37731e222ae080dd48a3a5774f8e909
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a9c7323cc37731…
Author: Óscar Nájera <on(a)mathias-kettner.de>
Date: Thu Oct 4 11:43:49 2018 +0200
Fix help & id missing places
Change-Id: Iff9a73476a316d1671907d179252bebd80b8f4fd
---
cmk/gui/bi.py | 2 +-
cmk/gui/htmllib.py | 6 +++---
cmk/gui/plugins/views/availability.py | 4 ++--
cmk/gui/sidebar.py | 4 ++--
cmk/gui/table.py | 4 ++--
cmk/gui/views.py | 2 +-
cmk/gui/wato/__init__.py | 12 ++++++------
cmk/gui/watolib.py | 2 +-
omd/packages/cma/webconf_snapin.py | 2 +-
9 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/cmk/gui/bi.py b/cmk/gui/bi.py
index b6dc77b..4938185 100644
--- a/cmk/gui/bi.py
+++ b/cmk/gui/bi.py
@@ -3133,7 +3133,7 @@ class FoldableTreeRendererTree(FoldableTreeRenderer):
icon_title = _("This element is currently not in its service
period.")
if icon_name and icon_title:
- html.icon(icon=icon_name, help=icon_title, class_=["icon",
"bi"])
+ html.icon(icon=icon_name, title=icon_title, class_=["icon",
"bi"])
yield
diff --git a/cmk/gui/htmllib.py b/cmk/gui/htmllib.py
index 0997566..a56030a 100644
--- a/cmk/gui/htmllib.py
+++ b/cmk/gui/htmllib.py
@@ -2144,7 +2144,7 @@ class html(HTMLGenerator):
# TODO: Refactor the arguments. It is only used in views/wato
- def toggle_button(self, id_, isopen, icon, help_txt, hidden=False, disabled=False,
onclick=None, is_context_button=True):
+ def toggle_button(self, id_, isopen, icon, title, hidden=False, disabled=False,
onclick=None, is_context_button=True):
if is_context_button:
self.begin_context_buttons() # TODO: Check all calls. If done before, remove
this!
@@ -2154,7 +2154,7 @@ class html(HTMLGenerator):
if disabled:
state = "off" if disabled else "on"
cssclass = ""
- help_txt = ""
+ title = ""
else:
state = "on"
if isopen:
@@ -2165,7 +2165,7 @@ class html(HTMLGenerator):
self.open_div(
id_="%s_%s" % (id_, state),
class_=["togglebutton", state, icon, cssclass],
- title=help_txt,
+ title=title,
style='display:none' if hidden else None,
)
self.open_a("javascript:void(0)", onclick=onclick)
diff --git a/cmk/gui/plugins/views/availability.py
b/cmk/gui/plugins/views/availability.py
index de34c52..82a9dcb 100644
--- a/cmk/gui/plugins/views/availability.py
+++ b/cmk/gui/plugins/views/availability.py
@@ -431,7 +431,7 @@ def render_availability_table(group_title, availability_table, what,
avoptions):
# Columns with the actual availability data
for (title, help_txt), (text, css) in zip(av_table["cell_titles"],
row["cells"]):
- table.cell(title, text, css=css, help=help_txt)
+ table.cell(title, text, css=css, help_txt=help_txt)
if "summary" in av_table:
table.row(css="summary", fixed=True)
@@ -444,7 +444,7 @@ def render_availability_table(group_title, availability_table, what,
avoptions):
table.cell("", "")
for (title, help_txt), (text, css) in zip(av_table["cell_titles"],
av_table["summary"]):
- table.cell(title, text, css="heading " + css, help=help_txt)
+ table.cell(title, text, css="heading " + css, help_txt=help_txt)
return table.end() # returns Table data if fetch == True
diff --git a/cmk/gui/sidebar.py b/cmk/gui/sidebar.py
index 7c58192..9c86c44 100644
--- a/cmk/gui/sidebar.py
+++ b/cmk/gui/sidebar.py
@@ -444,14 +444,14 @@ class SidebarRenderer(object):
if config.user.may("general.configure_sidebar"):
# Icon for mini/maximizing
html.open_div(class_="minisnapin")
- html.icon_button(url=None, help=_("Toggle this snapin"),
icon="%ssnapin" % minimaxi,
+ html.icon_button(url=None, title=_("Toggle this snapin"),
icon="%ssnapin" % minimaxi,
onclick="toggle_sidebar_snapin(this,
'%s')" % toggle_url)
html.close_div()
# Button for closing (removing) a snapin
html.open_div(class_="closesnapin")
close_url = "sidebar_openclose.py?name=%s&state=off" % name
- html.icon_button(url=None, help=_("Remove this snapin"),
icon="closesnapin",
+ html.icon_button(url=None, title=_("Remove this snapin"),
icon="closesnapin",
onclick="remove_sidebar_snapin(this,
'%s')" % close_url)
html.close_div()
diff --git a/cmk/gui/table.py b/cmk/gui/table.py
index d86f7e5..3ad91ff 100644
--- a/cmk/gui/table.py
+++ b/cmk/gui/table.py
@@ -189,7 +189,7 @@ class Table(object):
self.options["collect_headers"] = False
- def add_cell(self, title="", text="", css=None, help_=None,
colspan=None, sortable=True, escape_text=False):
+ def add_cell(self, title="", text="", css=None, help_txt=None,
colspan=None, sortable=True, escape_text=False):
if escape_text:
text = html.permissive_attrencode(text)
else:
@@ -205,7 +205,7 @@ class Table(object):
# buttons are never sortable
if css and 'buttons' in css and sortable:
sortable = False
- self.headers.append((title, css, help_, sortable))
+ self.headers.append((title, css, help_txt, sortable))
self.rows[-1][0].append((htmlcode, css, colspan))
diff --git a/cmk/gui/views.py b/cmk/gui/views.py
index b8426f6..5ee54ca 100644
--- a/cmk/gui/views.py
+++ b/cmk/gui/views.py
@@ -1470,7 +1470,7 @@ def show_context_links(thisview, datasource, show_filters,
html.toggle_button(
id_="checkbox",
icon="checkbox",
- help_txt=_("Enable/Disable checkboxes for selecting rows for
commands"),
+ title=_("Enable/Disable checkboxes for selecting rows for
commands"),
onclick="location.href='%s';" %
html.makeuri([('show_checkboxes', show_checkboxes and '0' or
'1')]),
isopen=show_checkboxes,
hidden=True,
diff --git a/cmk/gui/wato/__init__.py b/cmk/gui/wato/__init__.py
index 9273668..3e94e6a 100644
--- a/cmk/gui/wato/__init__.py
+++ b/cmk/gui/wato/__init__.py
@@ -784,7 +784,7 @@ class ModeFolder(WatoMode):
subfolder.edit_url(subfolder.parent()),
_("Edit the properties of this folder"),
"edit",
- id = 'edit_' + subfolder.name(),
+ id_ = 'edit_' + subfolder.name(),
cssclass = 'edit',
style = 'display:none',
)
@@ -795,7 +795,7 @@ class ModeFolder(WatoMode):
make_action_link([("mode", "folder"),
("_delete_folder", subfolder.name())]),
_("Delete this folder"),
"delete",
- id = 'delete_' + subfolder.name(),
+ id_ = 'delete_' + subfolder.name(),
cssclass = 'delete',
style = 'display:none',
)
@@ -839,7 +839,7 @@ class ModeFolder(WatoMode):
style = "display:none"
html.popup_trigger(
- html.render_icon("move", help=_("Move this %s to another
folder") % what_title,
+ html.render_icon("move", title=_("Move this %s to another
folder") % what_title,
cssclass="iconbutton"),
ident="move_"+obj.name(),
what="move_to_folder",
@@ -878,7 +878,7 @@ class ModeFolder(WatoMode):
checkbox_title = _('Hide Checkboxes and bulk actions')
html.toggle_button("checkbox_on", show_checkboxes,
"checkbox",
- help=checkbox_title,
+ title=checkbox_title,
onclick="location.href=\'%s\'" % onclick_uri,
is_context_button=False)
@@ -11300,8 +11300,8 @@ class ModeEditRuleset(WatoMode):
return make_action_link(vars_)
- def _rule_button(self, action, help_=None, folder=None, rulenr=0):
- html.icon_button(self._action_url(action, folder, rulenr), help_, action)
+ def _rule_button(self, action, title=None, folder=None, rulenr=0):
+ html.icon_button(self._action_url(action, folder, rulenr), title, action)
# TODO: Refactor this whole method
diff --git a/cmk/gui/watolib.py b/cmk/gui/watolib.py
index 3906b1d..e1b531a 100644
--- a/cmk/gui/watolib.py
+++ b/cmk/gui/watolib.py
@@ -8715,7 +8715,7 @@ class RuleComment(TextAreaUnicode):
html.nbsp()
html.icon_button(None,
- help=_("Prefix date and your name to the comment"),
+ title=_("Prefix date and your name to the comment"),
icon="insertdate",
onclick="vs_rule_comment_prefix_date_and_user(this, '%s');"
% date_and_user
)
diff --git a/omd/packages/cma/webconf_snapin.py b/omd/packages/cma/webconf_snapin.py
index e9ff2ac..bd19658 100644
--- a/omd/packages/cma/webconf_snapin.py
+++ b/omd/packages/cma/webconf_snapin.py
@@ -28,7 +28,7 @@ def render_webconf():
# Our version of iconlink -> the images are located elsewhere
def iconlink(text, url, icon):
html.open_a(class_=["iconlink", "link"],
target="main", href=url)
- html.icon(icon="/webconf/images/icon_%s.png" % icon, help=None,
cssclass="inline")
+ html.icon(icon="/webconf/images/icon_%s.png" % icon, title=None,
cssclass="inline")
html.write(text)
html.close_a()
html.br()