Skip to content

Commit

Permalink
added WK14214: Broken hostname icon link for parent/child topology
Browse files Browse the repository at this point in the history
Change-Id: Iacea450cdcc9b57d5113993881b0363685d65492
  • Loading branch information
schnetzzz committed Nov 2, 2023
1 parent 0f549e2 commit 3b5bb83
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions .werks/14214
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion cmk/gui/views/icon/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions web/htdocs/js/modules/nodevis/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export class SearchFilters {
_build_regex_from_set(entries: Set<string>): 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("|") + ")";
Expand All @@ -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;
}
Expand Down

0 comments on commit 3b5bb83

Please sign in to comment.