Add links to realtime logs.

This commit is contained in:
Mike Cao 2020-11-02 19:37:13 -08:00
parent e0c2354169
commit b1a0d21a49
2 changed files with 21 additions and 1 deletions

View File

@ -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 (

View File

@ -44,3 +44,12 @@
text-overflow: ellipsis;
overflow: hidden;
}
.row .link {
color: var(--gray900);
text-decoration: none;
}
.row .link:hover {
color: var(--primary400);
}