Module: check_mk
Branch: master
Commit: 90e9de6a77a1b9da429b9ccef3cb8203dc91738f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=90e9de6a77a1b9…
Author: Óscar Nájera <on(a)mathias-kettner.de>
Date: Thu Oct 4 14:03:22 2018 +0200
Fix id and help keyword arguments #3
Change-Id: I6714e3280c20ddfa8881470308bd198c2c6eb7b7
---
cmk/gui/htmllib.py | 8 ++++----
cmk/gui/metrics.py | 2 +-
cmk/gui/plugins/views/mkeventd.py | 2 +-
cmk/gui/plugins/views/painters.py | 2 +-
cmk/gui/table.py | 2 +-
cmk/gui/valuespec.py | 2 +-
cmk/gui/wato/__init__.py | 22 +++++++++++-----------
7 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/cmk/gui/htmllib.py b/cmk/gui/htmllib.py
index 48fca7b..b645ac9 100644
--- a/cmk/gui/htmllib.py
+++ b/cmk/gui/htmllib.py
@@ -2111,7 +2111,7 @@ class html(HTMLGenerator):
def button(self, varname, title, cssclass = None, style=None, help_=None):
- self.write_html(self.render_button(varname, title, cssclass, style))
+ self.write_html(self.render_button(varname, title, cssclass, style,
help_=help_))
def render_button(self, varname, title, cssclass = None, style=None, help_=None):
@@ -2596,7 +2596,7 @@ class html(HTMLGenerator):
if icon:
self.img(class_=["treeangle", "title"],
src="images/icon_%s.png" % icon)
else:
- self.img(id_=img_id, class_=["treeangle", "nform",
"open" if isopen else "closed"],
+ self.img(id=img_id, class_=["treeangle", "nform",
"open" if isopen else "closed"],
src="images/%s_closed.png" % tree_img,
align="absbottom")
self.write_text(title)
self.close_td()
@@ -2605,7 +2605,7 @@ class html(HTMLGenerator):
self.open_div(class_="foldable")
if not icon:
- self.img(id_="treeimg.%s.%s" % (treename, id_),
+ self.img(id="treeimg.%s.%s" % (treename, id_),
class_=["treeangle", "open" if isopen else
"closed"],
src="images/%s_closed.png" % tree_img,
align="absbottom", onclick=onclick)
if isinstance(title, HTML): # custom HTML code
@@ -2833,7 +2833,7 @@ hy
icon = HTML(self.render_icon(icon, cssclass="iconbutton"))
return self.render_a(icon, **{'title' : title,
- 'id_' : id_,
+ 'id' : id_,
'class' : cssclass,
'style' : style,
'target' : target if target else
'',
diff --git a/cmk/gui/metrics.py b/cmk/gui/metrics.py
index dffe744..5641da1 100644
--- a/cmk/gui/metrics.py
+++ b/cmk/gui/metrics.py
@@ -1008,7 +1008,7 @@ def render_metrics_table(translated_metrics, host_name,
service_description):
if cmk_graphs_possible():
output += "<td>"
output += html.render_popup_trigger(
- html.render_icon("custom_graph", help=_("Add this metric
to a custom graph"), cssclass="iconbutton"),
+ html.render_icon("custom_graph", title=_("Add this metric
to a custom graph"), cssclass="iconbutton"),
ident = "add_metric_to_graph_" + host_name + ";" +
service_description,
what = "add_metric_to_custom_graph",
url_vars = [
diff --git a/cmk/gui/plugins/views/mkeventd.py b/cmk/gui/plugins/views/mkeventd.py
index 785beae..367849f 100644
--- a/cmk/gui/plugins/views/mkeventd.py
+++ b/cmk/gui/plugins/views/mkeventd.py
@@ -371,7 +371,7 @@ if config.mkeventd_enabled:
else:
return ''
- return html.render_icon(phase, help=title)
+ return html.render_icon(phase, title=title)
def render_delete_event_icons(row):
if config.user.may("mkeventd.delete"):
diff --git a/cmk/gui/plugins/views/painters.py b/cmk/gui/plugins/views/painters.py
index c6befe3..f990c47 100644
--- a/cmk/gui/plugins/views/painters.py
+++ b/cmk/gui/plugins/views/painters.py
@@ -2141,7 +2141,7 @@ def paint_log_icon(row):
title = _("Stopped acknowledgement")
if img:
- return "icon", html.render_icon("alert_"+img, help=title)
+ return "icon", html.render_icon("alert_"+img, title=title)
return "icon", ""
multisite_painters["log_icon"] = {
diff --git a/cmk/gui/table.py b/cmk/gui/table.py
index 3ad91ff..5ec8a98 100644
--- a/cmk/gui/table.py
+++ b/cmk/gui/table.py
@@ -238,7 +238,7 @@ class Table(object):
if self.options["foldable"]:
html.begin_foldable_container(
treename="table",
- id=self.id,
+ id_=self.id,
isopen=True,
indent=False,
title=html.render_h3(self.title, class_=["treeangle",
"title"])
diff --git a/cmk/gui/valuespec.py b/cmk/gui/valuespec.py
index d933cae..7699eeb 100644
--- a/cmk/gui/valuespec.py
+++ b/cmk/gui/valuespec.py
@@ -4266,7 +4266,7 @@ class IconSelector(ValueSpec):
if not icon_name:
icon_name = self._empty_img
- icon = html.render_icon(icon_name, help=title, middle=True, id_=id_)
+ icon = html.render_icon(icon_name, title=title, middle=True, id_=id_)
if onclick:
icon = html.render_a(icon, href="javascript:void(0)",
onclick=onclick)
diff --git a/cmk/gui/wato/__init__.py b/cmk/gui/wato/__init__.py
index 697b095..fca9605 100644
--- a/cmk/gui/wato/__init__.py
+++ b/cmk/gui/wato/__init__.py
@@ -3037,13 +3037,13 @@ class ModeDiagHost(WatoMode):
html.open_div()
html.img("images/icon_reload.png", class_="icon",
id="%s_img" % ident)
html.open_a(href="")
- html.img("images/icon_reload.png", class_=["icon",
"retry"], id_="%s_retry" % ident, title=_('Retry this test'))
+ html.img("images/icon_reload.png", class_=["icon",
"retry"], id="%s_retry" % ident, title=_('Retry this test'))
html.close_a()
html.close_div()
html.close_td()
html.open_td()
- html.div('', class_="log", id_="%s_log" %
ident)
+ html.div('', class_="log", id="%s_log" %
ident)
html.close_td()
html.close_tr()
@@ -3657,7 +3657,7 @@ class ModeDiscovery(WatoMode):
def bulk_button(source, target, target_label, label):
html.button("_bulk_%s_%s" % (source, target), target_label,
- help=_("Move %s to %s services") % (label, target))
+ help_=_("Move %s to %s services") % (label, target))
table.row(collect_headers=collect_headers, fixed=True)
table.cell(css="bulkactions service_discovery",
colspan=self._bulk_action_colspan())
@@ -3682,7 +3682,7 @@ class ModeDiscovery(WatoMode):
elif table_source == self.SERVICE_VANISHED:
if config.user.may("wato.service_discovery_to_removed"):
html.button("_bulk_%s_removed" % table_source,
_("Remove"),
- help=_("Remove %s services") % label)
+ help_=_("Remove %s services") % label)
if config.user.may("wato.service_discovery_to_ignored"):
bulk_button(table_source, self.SERVICE_IGNORED, _("Disable"),
label)
@@ -5492,7 +5492,7 @@ class ModeActivateChanges(WatoMode, watolib.ActivateChanges):
if self._may_discard_changes():
html.context_button(_("Discard Changes!"),
html.makeactionuri([("_action", "discard")]),
- "discard", id="discard_changes_button")
+ "discard", id_="discard_changes_button")
if config.user.may("wato.sites"):
html.context_button(_("Site Configuration"),
watolib.folder_preserving_link([("mode", "sites")]),
"sites")
@@ -5786,17 +5786,17 @@ class ModeActivateChanges(WatoMode, watolib.ActivateChanges):
# State
if can_activate_all and need_sync:
html.icon_button(url="javascript:void(0)",
- id="activate_%s" % site_id,
+ id_="activate_%s" % site_id,
cssclass=["activate_site"],
- help=_("This site is not update and needs a replication. Start
it now."),
+ title=_("This site is not update and needs a replication. Start
it now."),
icon="need_replicate",
onclick="activate_changes(\"site\",
\"%s\")" % site_id)
if can_activate_all and need_restart:
html.icon_button(url="javascript:void(0)",
- id="activate_%s" % site_id,
+ id_="activate_%s" % site_id,
cssclass=["activate_site"],
- help=_("This site needs a restart for activating the changes.
Start it now."),
+ title=_("This site needs a restart for activating the changes.
Start it now."),
icon="need_restart",
onclick="activate_changes(\"site\",
\"%s\")" % site_id)
@@ -5811,7 +5811,7 @@ class ModeActivateChanges(WatoMode, watolib.ActivateChanges):
# Livestatus
table.cell(_("Status"), css="narrow nobr")
- html.status_label(content=status, status=status, help=_("This site is
%s") % status)
+ html.status_label(content=status, status=status, title=_("This site is
%s") % status)
# Livestatus-/Check_MK-Version
table.cell(_("Version"),
site_status.get("livestatus_version", ""), css="narrow
nobr")
@@ -7182,7 +7182,7 @@ class NotificationsMode(EventsMode):
if num_conditions:
title = _("%d conditions") % num_conditions
html.begin_foldable_container(treename="rule_%d" % nr,
- id="%s" % nr,
+ id_="%s" % nr,
isopen=False,
title=title,
indent=False,