mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-11-27 14:42:35 +00:00
Merge branch 'develop' into develop
This commit is contained in:
145 files changed
+7471
-2668
No files matched your search
@@ -0,0 +1,8 @@
|
||||
import * as api from "./base";
|
||||
import type { LogSources } from "./models";
|
||||
|
||||
export async function getLogSources(): Promise<LogSources> {
|
||||
return await api.get({
|
||||
url: "/logs/sources",
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import * as api from "./base";
|
||||
import type { LogChannel, LogHostType, LogSourceType, LogTail } from "./models";
|
||||
|
||||
export interface GetLogTailParams {
|
||||
type: LogSourceType;
|
||||
hostType?: LogHostType;
|
||||
hostId?: number;
|
||||
channel?: LogChannel;
|
||||
lines?: number;
|
||||
level?: string;
|
||||
search?: string;
|
||||
}
|
||||
|
||||
export async function getLogTail(params: GetLogTailParams): Promise<LogTail> {
|
||||
return await api.get({
|
||||
url: "/logs/tail",
|
||||
params: { ...params },
|
||||
});
|
||||
}
|
||||
@@ -26,6 +26,8 @@ export * from "./getDeadHost";
|
||||
export * from "./getDeadHosts";
|
||||
export * from "./getHealth";
|
||||
export * from "./getHostsReport";
|
||||
export * from "./getLogSources";
|
||||
export * from "./getLogTail";
|
||||
export * from "./getProxyHost";
|
||||
export * from "./getProxyHostLogs";
|
||||
export * from "./getProxyHosts";
|
||||
|
||||
@@ -44,6 +44,30 @@ export interface AuditLog {
|
||||
user?: User;
|
||||
}
|
||||
|
||||
export type LogSourceType = "system" | "letsencrypt" | "host";
|
||||
export type LogHostType = "proxy" | "redirection" | "dead" | "stream";
|
||||
// Which of the two files nginx writes per host - named "channel", not "stream",
|
||||
// to avoid confusion with the "stream" LogHostType (TCP/UDP stream hosts).
|
||||
export type LogChannel = "access" | "error";
|
||||
|
||||
export interface LogHostOption {
|
||||
id: number;
|
||||
label: string;
|
||||
}
|
||||
|
||||
export interface LogSources {
|
||||
system: { label: string };
|
||||
letsencrypt: { label: string };
|
||||
hosts: Record<LogHostType, LogHostOption[]>;
|
||||
}
|
||||
|
||||
export interface LogTail {
|
||||
lines: string[];
|
||||
size: number;
|
||||
truncated: boolean;
|
||||
exists: boolean;
|
||||
}
|
||||
|
||||
export interface AccessList {
|
||||
id?: number;
|
||||
createdOn?: string;
|
||||
|
||||
Reference in new issue
Block a user