diff --git a/server/private/routers/auditLogs/queryAccessAuditLog.ts b/server/private/routers/auditLogs/queryAccessAuditLog.ts index da03ebae3..96ae7711b 100644 --- a/server/private/routers/auditLogs/queryAccessAuditLog.ts +++ b/server/private/routers/auditLogs/queryAccessAuditLog.ts @@ -155,7 +155,9 @@ function getWhere(data: Q) { data.action !== undefined ? eq(accessAuditLog.action, data.action) : undefined, - data.ip ? inArray(accessAuditLog.ip, data.ip) : undefined + data.ip && data.ip.length > 0 + ? inArray(accessAuditLog.ip, data.ip) + : undefined ); } diff --git a/server/routers/auditLogs/queryRequestAuditLog.ts b/server/routers/auditLogs/queryRequestAuditLog.ts index 78a5712a0..6c246a01c 100644 --- a/server/routers/auditLogs/queryRequestAuditLog.ts +++ b/server/routers/auditLogs/queryRequestAuditLog.ts @@ -147,7 +147,9 @@ function getWhere(data: Q) { data.action !== undefined ? eq(requestAuditLog.action, data.action) : undefined, - data.ip ? inArray(requestAuditLog.ip, data.ip) : undefined + data.ip && data.ip.length > 0 + ? inArray(requestAuditLog.ip, data.ip) + : undefined ); } diff --git a/src/app/[orgId]/settings/logs/access/page.tsx b/src/app/[orgId]/settings/logs/access/page.tsx index c556700f9..89f36641e 100644 --- a/src/app/[orgId]/settings/logs/access/page.tsx +++ b/src/app/[orgId]/settings/logs/access/page.tsx @@ -27,6 +27,7 @@ import { tierMatrix } from "@server/lib/billing/tierMatrix"; import { logQueries } from "@app/lib/queries"; import { useQuery } from "@tanstack/react-query"; import type { QueryAccessAuditLogResponse } from "@server/routers/auditLogs/types"; +import { countryCodeToFlagEmoji } from "@app/lib/countryCodeToFlagEmoji"; export default function GeneralPage() { const router = useRouter(); @@ -346,7 +347,7 @@ export default function GeneralPage() { options={filterAttributes.locations.map( (location) => ({ value: location, - label: location + label: `${location} ${countryCodeToFlagEmoji(location)}` }) )} label={t("location")} @@ -365,7 +366,8 @@ export default function GeneralPage() { {row.original.location ? ( - {row.original.location} + {row.original.location}{" "} + {countryCodeToFlagEmoji(row.original.location)} ) : (