Skip to content

Commit 2ba42a5

Browse files
committed
18080 FIX Fix translation of event host names
SUP-23875 Change-Id: I40ca38bd6b2e9acaf9e0d1afbd33713eafd9f9c6
1 parent 3f79071 commit 2ba42a5

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

.werks/18080.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[//]: # (werk v2)
2+
# Fix translation of event host names
3+
4+
key | value
5+
---------- | ---
6+
date | 2025-07-28T10:01:20+00:00
7+
version | 2.4.0p9
8+
class | fix
9+
edition | cre
10+
component | ec
11+
level | 1
12+
compatible | yes
13+
14+
Since werk #17724 the translation of event host names was broken. This werk
15+
reverts the changes.

cmk/gui/mkeventd/views.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
from livestatus import OnlySites, SiteId
1313

14-
from cmk.utils.hostaddress import HostName
14+
from cmk.utils.hostaddress import HostAddress, HostName
1515
from cmk.utils.statename import short_service_state_name
1616
from cmk.utils.user import UserId
1717

@@ -649,7 +649,8 @@ def use_painter_link(self) -> bool:
649649
return False
650650

651651
def render(self, row: Row, cell: "Cell") -> CellSpec:
652-
host_name = row.get("event_host", row["host_name"])
652+
event_host: HostAddress = row["event_host"]
653+
host_name = row.get("host_name", event_host)
653654

654655
return "", html.render_a(
655656
host_name, _get_event_host_link(host_name, row, cell, request=self.request)

0 commit comments

Comments
 (0)