Add filters and refine table and query

This commit is contained in:
Owen
2026-03-23 21:49:22 -07:00
parent 2c6e9507b5
commit f9bff5954f

View File

@@ -639,6 +639,31 @@ export default function ConnectionLogsPage() {
{row.destAddr ?? "—"} {row.destAddr ?? "—"}
</span> </span>
</div> </div>
</div>
<div className="space-y-2">
{/*<div className="flex items-center gap-1 font-semibold text-sm mb-1">
Resource & Site
</div>*/}
{/*<div>
<strong>Resource:</strong>{" "}
{row.resourceName ?? "—"}
{row.resourceNiceId && (
<span className="text-muted-foreground ml-1">
({row.resourceNiceId})
</span>
)}
</div>*/}
<div>
<strong>Site:</strong> {row.siteName ?? "—"}
{row.siteNiceId && (
<span className="text-muted-foreground ml-1">
({row.siteNiceId})
</span>
)}
</div>
<div>
<strong>Site ID:</strong> {row.siteId ?? "—"}
</div>
<div> <div>
<strong>Started At:</strong>{" "} <strong>Started At:</strong>{" "}
{row.startedAt {row.startedAt
@@ -659,66 +684,29 @@ export default function ConnectionLogsPage() {
<strong>Duration:</strong>{" "} <strong>Duration:</strong>{" "}
{formatDuration(row.startedAt, row.endedAt)} {formatDuration(row.startedAt, row.endedAt)}
</div> </div>
</div> {/*<div>
<div className="space-y-2">
{/*<div className="flex items-center gap-1 font-semibold text-sm mb-1">
Resource & Site
</div>*/}
<div>
<strong>Resource:</strong>{" "}
{row.resourceName ?? "—"}
{row.resourceNiceId && (
<span className="text-muted-foreground ml-1">
({row.resourceNiceId})
</span>
)}
</div>
<div>
<strong>Site:</strong> {row.siteName ?? "—"}
{row.siteNiceId && (
<span className="text-muted-foreground ml-1">
({row.siteNiceId})
</span>
)}
</div>
<div>
<strong>Site ID:</strong> {row.siteId ?? "—"}
</div>
<div>
<strong>Resource ID:</strong>{" "} <strong>Resource ID:</strong>{" "}
{row.siteResourceId ?? "—"} {row.siteResourceId ?? "—"}
</div> </div>*/}
</div> </div>
<div className="space-y-2"> <div className="space-y-2">
{/*<div className="flex items-center gap-1 font-semibold text-sm mb-1"> {/*<div className="flex items-center gap-1 font-semibold text-sm mb-1">
Client & Transfer Client & Transfer
</div>*/} </div>*/}
<div> {/*<div>
<strong>Client:</strong> {row.clientName ?? "—"}
{row.clientId && (
<span className="text-muted-foreground ml-1">
(ID: {row.clientId})
</span>
)}
</div>
<div>
<strong>User:</strong>{" "}
{row.userEmail ?? row.userId ?? "—"}
</div>
<div>
<strong>Bytes Sent (TX):</strong>{" "} <strong>Bytes Sent (TX):</strong>{" "}
{formatBytes(row.bytesTx)} {formatBytes(row.bytesTx)}
</div> </div>*/}
<div> {/*<div>
<strong>Bytes Received (RX):</strong>{" "} <strong>Bytes Received (RX):</strong>{" "}
{formatBytes(row.bytesRx)} {formatBytes(row.bytesRx)}
</div> </div>*/}
<div> {/*<div>
<strong>Total Transfer:</strong>{" "} <strong>Total Transfer:</strong>{" "}
{formatBytes( {formatBytes(
(row.bytesTx ?? 0) + (row.bytesRx ?? 0) (row.bytesTx ?? 0) + (row.bytesRx ?? 0)
)} )}
</div> </div>*/}
</div> </div>
</div> </div>
</div> </div>