Commit e6f40129 authored by root's avatar root
Browse files

Merge branch 'master' of https://github.com/tribe29/checkmk

parents a7c1534a 6ab48131
Title: Add Kubernetes icon to menu entries
Class: fix
Compatible: compat
Component: multisite
Date: 1652174884
Edition: cre
Knowledge: doc
Level: 1
State: unknown
Version: 2.2.0i1
With this werk, an icon is shown next to the menu item Kubernetes in the Dashboards menu.
Title: Add blank seperator to dashboard tooltips
Class: fix
Compatible: compat
Component: multisite
Date: 1652262782
Edition: cre
Knowledge: doc
Level: 1
State: unknown
Version: 2.2.0i1
On some dashboard tooltips there was a space missing between the two words of the tootltip.
It is now correctly sperated.
For example, the tooltip will now display "Namespace my-namespace" instead of "Namespacemy-namespace".
......@@ -107,7 +107,7 @@ class MasterControlSnapin(SidebarSnapin):
return
if site_state["state"] == "dead":
html.show_error(site_state["exception"])
html.show_error(str(site_state["exception"]))
return
if site_state["state"] == "disabled":
......@@ -116,7 +116,7 @@ class MasterControlSnapin(SidebarSnapin):
if site_state["state"] == "unknown":
if site_state.get("exception"):
html.show_error(site_state["exception"])
html.show_error(str(site_state["exception"]))
else:
html.show_error(_("Site state is unknown"))
return
......
......@@ -2219,7 +2219,7 @@ class Cell:
tooltip_cell = Cell(self._view, PainterSpec(self.tooltip_painter_name()))
_tooltip_tdclass, tooltip_content = tooltip_cell.render_content(row)
assert not isinstance(tooltip_content, Mapping)
tooltip_text = escaping.strip_tags(tooltip_content)
tooltip_text = escaping.strip_tags_for_tooltip(tooltip_content)
if tooltip_text:
content = HTMLWriter.render_span(content, title=tooltip_text)
......
......@@ -283,3 +283,16 @@ def strip_tags(ht: EscapableEntity) -> str:
string = _TAG_RE.sub("", string)
if string == prev:
return string
def strip_tags_for_tooltip(ht: EscapableEntity) -> str:
string = str(ht)
# Some painters render table and cell tags that would be stripped away in the next step and
# result in the content of tables being joined together to a single word.
# We replace the tags here with spaces to prevent that.
#
# For the moment we keep it simple and only fix the special case we stumbled upon.
# In the future it might be better to find a more generic approach
# that solves the problem for different tag combinations.
string = string.replace("</th><td>", " ")
return strip_tags(string)
......@@ -262,7 +262,7 @@ yaml-cpp,0.6.3,MIT,https://opensource.org/licenses/MIT,omd/packages/yaml-cpp/yam
Icons,,,,,,,,
Classic Icons,,LGPL-2.1,https://opensource.org/licenses/LGPL-2.1,web/htdocs/images/icon_*,,,,
Facelift Icons,,Icons8,https://icons8.com/download/Icons8_License.pdf,web/htdocs/images/icon_*,,,,
Kubernetes Logo,,CC-BY-4.0,https://creativecommons.org/licenses/by/4.0/,web/htdocs/themes/facelift/images/kubernetes_logo.svg,,,,
Kubernetes Logo,,CC-BY-4.0,https://creativecommons.org/licenses/by/4.0/,web/htdocs/themes/facelift/images/icon_kubernetes.svg,,,,
,,,,,,,,
JavaScript and CSS,,,,,,,,
ColorPicker,,MIT,https://opensource.org/licenses/MIT,"web/htdocs/js/colorpicker.js
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment