Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
integrations: Fix confusing wording in alertmanager integration.
Artur Szcześniak706be812b907
diff --git a/zerver/webhooks/alertmanager/tests.py b/zerver/webhooks/alertmanager/tests.pyindex a3c522834be..2d7453f75c4 100644--- a/zerver/webhooks/alertmanager/tests.py+++ b/zerver/webhooks/alertmanager/tests.py@@ -10,8 +10,8 @@ class AlertmanagerHookTests(WebhookTestCase):expected_topic_name = "andromeda"expected_message = """:alert: **FIRING**-* CPU core temperature is 34.75C ([graph](http://cobalt:9090/graph?g0.expr=avg+by%28host%29+%28sensors_temp_input%7Bfeature%3D~%22core_%5B0-9%5D%2B%22%7D%29+%3E+15&g0.tab=0))-* CPU core temperature is 17.625C ([graph](http://cobalt:9090/graph?g0.expr=avg+by%28host%29+%28sensors_temp_input%7Bfeature%3D~%22core_%5B0-9%5D%2B%22%7D%29+%3E+15&g0.tab=0))+* CPU core temperature is 34.75C ([source](http://cobalt:9090/graph?g0.expr=avg+by%28host%29+%28sensors_temp_input%7Bfeature%3D~%22core_%5B0-9%5D%2B%22%7D%29+%3E+15&g0.tab=0))+* CPU core temperature is 17.625C ([source](http://cobalt:9090/graph?g0.expr=avg+by%28host%29+%28sensors_temp_input%7Bfeature%3D~%22core_%5B0-9%5D%2B%22%7D%29+%3E+15&g0.tab=0))""".strip()self.check_webhook(@@ -24,7 +24,7 @@ class AlertmanagerHookTests(WebhookTestCase):def test_single_error_issue_message(self) -> None:expected_topic_name = "andromeda"expected_message = """-:squared_ok: **Resolved** CPU core temperature is 34.75C ([graph](http://cobalt:9090/graph?g0.expr=avg+by%28host%29+%28sensors_temp_input%7Bfeature%3D~%22core_%5B0-9%5D%2B%22%7D%29+%3E+15&g0.tab=0))+:squared_ok: **Resolved** CPU core temperature is 34.75C ([source](http://cobalt:9090/graph?g0.expr=avg+by%28host%29+%28sensors_temp_input%7Bfeature%3D~%22core_%5B0-9%5D%2B%22%7D%29+%3E+15&g0.tab=0))""".strip()self.check_webhook(diff --git a/zerver/webhooks/alertmanager/view.py b/zerver/webhooks/alertmanager/view.pyindex 9ba6dbff237..b337d4f9112 100644--- a/zerver/webhooks/alertmanager/view.py+++ b/zerver/webhooks/alertmanager/view.py@@ -35,7 +35,7 @@ def api_alertmanager_webhook(url = alert["generatorURL"].tame(check_string).replace("tab=1", "tab=0")- body = f"{desc} ([graph]({url}))"+ body = f"{desc} ([source]({url}))"if name not in topics:topics[name] = {"firing": [], "resolved": []}topics[name][alert["status"].tame(check_string)].append(body)