Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/hooks/useQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,13 @@ export function useTerminateProcess() {
});
}

const AUDIT_LOG_LIMIT = 1000;

export function useAuditLogEntries(connectionId: string, enabled = true) {
return useQuery({
queryKey: queryKeys.auditLog(connectionId),
queryFn: async () => {
const response = await queryClient.getAuditLogEntries({ connectionId, limit: 100 });
const response = await queryClient.getAuditLogEntries({ connectionId, limit: AUDIT_LOG_LIMIT });
return response.entries;
},
enabled: enabled && !!connectionId,
Expand All @@ -346,7 +348,7 @@ export function useSystemAuditLogEntries(enabled = true) {
return useQuery({
queryKey: queryKeys.systemAuditLog(),
queryFn: async () => {
const response = await queryClient.getSystemAuditLogEntries({ limit: 100 });
const response = await queryClient.getSystemAuditLogEntries({ limit: AUDIT_LOG_LIMIT });
return response.entries;
},
enabled,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/export-csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Papa from 'papaparse'
import type { ColumnMetadata } from '@/components/sql-editor/hooks/useEditorTabs'

export function exportToCsv(
columns: ColumnMetadata[],
columns: Array<Pick<ColumnMetadata, 'name'>>,
rows: Record<string, unknown>[],
filename: string
) {
Comment thread
tianzhou marked this conversation as resolved.
Expand Down
Loading
Loading