mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-10-04 20:00:12 +00:00
Audit log table and modal
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import * as api from "./base";
|
||||
import type { AuditLogExpansion } from "./getAuditLogs";
|
||||
import type { AuditLog } from "./models";
|
||||
|
||||
export async function getAuditLog(expand?: string[], params = {}): Promise<AuditLog[]> {
|
||||
export async function getAuditLog(id: number, expand?: AuditLogExpansion[], params = {}): Promise<AuditLog> {
|
||||
return await api.get({
|
||||
url: "/audit-log",
|
||||
url: `/audit-log/${id}`,
|
||||
params: {
|
||||
expand: expand?.join(","),
|
||||
...params,
|
||||
|
14
frontend/src/api/backend/getAuditLogs.ts
Normal file
14
frontend/src/api/backend/getAuditLogs.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import * as api from "./base";
|
||||
import type { AuditLog } from "./models";
|
||||
|
||||
export type AuditLogExpansion = "user";
|
||||
|
||||
export async function getAuditLogs(expand?: AuditLogExpansion[], params = {}): Promise<AuditLog[]> {
|
||||
return await api.get({
|
||||
url: "/audit-log",
|
||||
params: {
|
||||
expand: expand?.join(","),
|
||||
...params,
|
||||
},
|
||||
});
|
||||
}
|
@@ -16,6 +16,7 @@ export * from "./downloadCertificate";
|
||||
export * from "./getAccessList";
|
||||
export * from "./getAccessLists";
|
||||
export * from "./getAuditLog";
|
||||
export * from "./getAuditLogs";
|
||||
export * from "./getCertificate";
|
||||
export * from "./getCertificates";
|
||||
export * from "./getDeadHost";
|
||||
|
@@ -40,6 +40,8 @@ export interface AuditLog {
|
||||
objectId: number;
|
||||
action: string;
|
||||
meta: Record<string, any>;
|
||||
// Expansions:
|
||||
user?: User;
|
||||
}
|
||||
|
||||
export interface AccessList {
|
||||
|
Reference in New Issue
Block a user