diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.js b/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.js index 54338edc4..a2bcf5871 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.js +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.js @@ -42,6 +42,19 @@ const MenuContent = onClickOutside( > Silence this alert +
Alert source links:
+ {alert.alertmanager.map(am => ( + + {am.name} + + ))} ); } diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.test.js b/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.test.js index fe1d72076..963e67be6 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.test.js +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.test.js @@ -74,4 +74,10 @@ describe("", () => { button.simulate("click"); expect(silenceFormStore.toggle.visible).toBe(true); }); + + it("source link points at alert source", () => { + const tree = MountedMenuContent(group); + const link = tree.find("a.dropdown-item[href='localhost/prometheus']"); + expect(link.text()).toBe("default"); + }); });