diff --git a/.werks/14214 b/.werks/14214 new file mode 100644 index 00000000000..0a7ffc73c35 --- /dev/null +++ b/.werks/14214 @@ -0,0 +1,10 @@ +Title: Broken hostname icon link for parent/child topology +Class: fix +Compatible: compat +Component: multisite +Date: 1698039942 +Edition: cre +Level: 1 +Version: 2.3.0b1 + +The parameter host_name in the icon url was wrong. It now uses host_regex instead. diff --git a/cmk/gui/views/icon/topology.py b/cmk/gui/views/icon/topology.py index 5d4ff77d030..ad17bb939f1 100644 --- a/cmk/gui/views/icon/topology.py +++ b/cmk/gui/views/icon/topology.py @@ -30,7 +30,7 @@ def render( # type: ignore[no-untyped-def] ) -> tuple[str, str, str]: url = makeuri_contextless( request, - [("host_name", row["host_name"])], + [("host_regex", f"{row['host_name']}$")], filename="parent_child_topology.py", ) return "aggr", _("Host Parent/Child topology"), url diff --git a/web/htdocs/js/modules/nodevis/utils.ts b/web/htdocs/js/modules/nodevis/utils.ts index 4ed0963aee0..7a54d006943 100644 --- a/web/htdocs/js/modules/nodevis/utils.ts +++ b/web/htdocs/js/modules/nodevis/utils.ts @@ -224,7 +224,7 @@ export class SearchFilters { _build_regex_from_set(entries: Set): string { const list_entries: string[] = []; entries.forEach(hostname => { - list_entries.push(hostname); + list_entries.push(hostname + "$"); }); if (list_entries.length > 1) return "(" + list_entries.join("|") + ")"; @@ -241,7 +241,7 @@ export class SearchFilters { .replace(/\)+$/, "") .split("|") .forEach((hostname?: string) => { - if (hostname) current_hosts.add(hostname); + if (hostname) current_hosts.add(hostname.replace(/\$+$/g, "")); }); return current_hosts; }