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.

style(realtime): fix layout for realtime protocol

Alexander Kleinf93ecdfee8df
diff --git a/components/metrics/RealtimeLog.js b/components/metrics/RealtimeLog.js
index 63add2683..b5e7a65b5 100644
--- a/components/metrics/RealtimeLog.js
+++ b/components/metrics/RealtimeLog.js
@@ -176,9 +176,11 @@ export default function RealtimeLog({ data, websites, websiteId }) {
</div>
<div className={styles.body}>
{logs?.length === 0 && <NoData />}
- <FixedSizeList height={400} itemCount={logs.length} itemSize={40}>
- {Row}
- </FixedSizeList>
+ {logs?.length > 0 && (
+ <FixedSizeList height={400} itemCount={logs.length} itemSize={40}>
+ {Row}
+ </FixedSizeList>
+ )}
</div>
</div>
);
diff --git a/components/metrics/RealtimeLog.module.css b/components/metrics/RealtimeLog.module.css
index 6fb09a647..7c07d017f 100644
--- a/components/metrics/RealtimeLog.module.css
+++ b/components/metrics/RealtimeLog.module.css
@@ -1,6 +1,9 @@
.table {
font-size: var(--font-size-xsmall);
overflow: hidden;
+ height: 100%;
+ display: grid;
+ grid-template-rows: fit-content(100%) fit-content(100%) auto;
}
.header {
@@ -21,6 +24,7 @@
.body {
overflow: auto;
+ height: 100%;
}
.icon {