Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Add links to realtime logs.

Mike Caob1a0d21a491b
diff --git a/components/metrics/RealtimeLog.js b/components/metrics/RealtimeLog.js
index 18f064e88..6c39dd870 100644
--- a/components/metrics/RealtimeLog.js
+++ b/components/metrics/RealtimeLog.js
@@ -101,6 +101,7 @@ export default function RealtimeLog({ data, websites }) {
os,
country,
device,
+ website_id,
}) {
if (event_type) {
return (
@@ -110,7 +111,17 @@ export default function RealtimeLog({ data, websites }) {
);
}
if (view_id) {
- return url;
+ const domain = getWebsite({ website_id });
+ return (
+ <a
+ className={styles.link}
+ href={`//${domain}${url}`}
+ target="_blank"
+ rel="noreferrer noopener"
+ >
+ {url}
+ </a>
+ );
}
if (session_id) {
return (
diff --git a/components/metrics/RealtimeLog.module.css b/components/metrics/RealtimeLog.module.css
index 99335a52c..6fb09a647 100644
--- a/components/metrics/RealtimeLog.module.css
+++ b/components/metrics/RealtimeLog.module.css
@@ -44,3 +44,12 @@
text-overflow: ellipsis;
overflow: hidden;
}
+
+.row .link {
+ color: var(--gray900);
+ text-decoration: none;
+}
+
+.row .link:hover {
+ color: var(--primary400);
+}