feat(logs): make log files downloadable (#706)

* feat(logs): show and download log files

* feat(logs): make logs settings dropdown

* feat(logs): minor cosmetic changes

* fix(logs): send empty response when lohpath not configured

* fix(logs): remove unused imports

* feat(logs): check if logs dir exists

* feat(logs): list log files in settings
This commit is contained in:
ze0s 2023-02-12 17:34:09 +01:00 committed by GitHub
parent 21724f29f6
commit b21c01a7df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 394 additions and 79 deletions

View file

@ -1,24 +1,35 @@
type LogLevel = "DEBUG" | "INFO" | "WARN" | "ERROR" | "TRACE";
interface Config {
host: string;
port: number;
log_level: LogLevel;
log_path: string;
log_max_size: number;
log_max_backups: number;
base_url: string;
check_for_updates: boolean;
version: string;
commit: string;
date: string;
host: string;
port: number;
log_level: LogLevel;
log_path: string;
log_max_size: number;
log_max_backups: number;
base_url: string;
check_for_updates: boolean;
version: string;
commit: string;
date: string;
}
interface ConfigUpdate {
host?: string;
port?: number;
log_level?: string;
log_path?: string;
base_url?: string;
check_for_updates?: boolean;
host?: string;
port?: number;
log_level?: string;
log_path?: string;
base_url?: string;
check_for_updates?: boolean;
}
interface LogFile {
filename: string;
size: string;
updated_at: string;
}
interface LogFileResponse {
files: LogFile[];
count: number;
}