Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Rename the account audit logs file.

Ivan Vasilov655fffe5f7aa
diff --git a/studio/components/interfaces/Account/AuditLogs/AuditLogs.tsx b/studio/components/interfaces/Account/AuditLogs/index.tsx
similarity index 92%
rename from studio/components/interfaces/Account/AuditLogs/AuditLogs.tsx
rename to studio/components/interfaces/Account/AuditLogs/index.tsx
index 58875a395ce..bf64028bee7 100644
--- a/studio/components/interfaces/Account/AuditLogs/AuditLogs.tsx
+++ b/studio/components/interfaces/Account/AuditLogs/index.tsx
@@ -19,12 +19,6 @@ import { Alert, Button, IconArrowDown, IconArrowUp, IconRefreshCw, IconUser } fr
import FilterPopover from './FilterPopover'
import LogDetailsPanel from './LogDetailsPanel'
-// [Joshen considerations]
-// - Maybe fix the height of the table to the remaining height of the viewport, so that the search input is always visible
-// - We'll need pagination as well if the audit logs get too large, but that needs to be implemented on the API side first if possible
-// - I've hidden time input in the date picker for now cause the time support in the component is a bit iffy, need to investigate
-// - Maybe a rule to follow from here is just everytime we call dayjs, use UTC(), one TZ to rule them all
-
const AuditLogs = () => {
const { slug } = useParams()
const currentTime = dayjs().utc().set('millisecond', 0)
@@ -34,8 +28,7 @@ const AuditLogs = () => {
to: currentTime.toISOString(),
})
const [selectedLog, setSelectedLog] = useState<OrganizationAuditLog>()
- const [filters, setFilters] = useState<{ users: string[]; projects: string[] }>({
- users: [], // gotrue_id[]
+ const [filters, setFilters] = useState<{ projects: string[] }>({
projects: [], // project_ref[]
})
@@ -60,13 +53,6 @@ const AuditLogs = () => {
? Number(new Date(b.occurred_at)) - Number(new Date(a.occurred_at))
: Number(new Date(a.occurred_at)) - Number(new Date(b.occurred_at))
)
- ?.filter((log) => {
- if (filters.users.length > 0) {
- return filters.users.includes(log.actor.id)
- } else {
- return log
- }
- })
?.filter((log) => {
if (filters.projects.length > 0) {
return filters.projects.includes(log.target.metadata.project_ref || '')
@@ -82,14 +68,6 @@ const AuditLogs = () => {
<div className="flex items-center justify-between">
<div className="flex items-center space-x-2">
<p className="text-xs prose">Filter by</p>
- <FilterPopover
- name="Users"
- options={members ?? []}
- labelKey="username"
- valueKey="gotrue_id"
- activeOptions={filters.users}
- onSaveFilters={(values) => setFilters({ ...filters, users: values })}
- />
<FilterPopover
name="Projects"
options={projects ?? []}
diff --git a/studio/components/interfaces/Account/index.ts b/studio/components/interfaces/Account/index.ts
index 3c653490437..82ff3116897 100644
--- a/studio/components/interfaces/Account/index.ts
+++ b/studio/components/interfaces/Account/index.ts
@@ -1,5 +1,5 @@
import AccessTokenList from './AccessTokenList'
-import AuditLogs from './AuditLogs/AuditLogs'
+import AuditLogs from './AuditLogs'
import NewAccessTokenButton from './NewAccessTokenButton'
import NewTokenBanner from './NewTokenBanner'
import TOTPFactors from './TOTPFactors'