From 4004d6158b49b34ef68213d837f79e59c76719cb Mon Sep 17 00:00:00 2001 From: Vincent Chafouin Date: Tue, 15 Jul 2025 10:08:45 +0300 Subject: [PATCH] feat: Add clickable link to URL in Alert side panel (#5159) Co-authored-by: Shahar Glazner Co-authored-by: Ihor Panasiuk --- .../alert-detail-sidebar/ui/alert-sidebar.tsx | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/keep-ui/features/alerts/alert-detail-sidebar/ui/alert-sidebar.tsx b/keep-ui/features/alerts/alert-detail-sidebar/ui/alert-sidebar.tsx index 80f0df3214..d9a76b56d0 100644 --- a/keep-ui/features/alerts/alert-detail-sidebar/ui/alert-sidebar.tsx +++ b/keep-ui/features/alerts/alert-detail-sidebar/ui/alert-sidebar.tsx @@ -89,6 +89,24 @@ export const AlertSidebar = ({ } }; + const handleCopyUrl = async (alertUrl: string | undefined) => { + if (!alertUrl) { + showErrorToast(new Error("Alert has no URL")); + return; + } + try { + await navigator.clipboard.writeText(alertUrl); + showSuccessToast("URL copied to clipboard"); + } catch (err) { + showErrorToast( + err, +

+ Failed to copy URL. Please check your browser permissions.{" "} +

+ ); + } + }; + return ( @@ -219,6 +237,33 @@ export const AlertSidebar = ({ />

+ {alert.url && ( +

+ URL +

+ + {alert.url} + +
+

+ )} {alert.incident_dto && (