mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-29 22:06:38 +08:00
e52592b16d
用户访问日志可在 ClickHouse、PostgreSQL、SQLite 之间切换。 关闭 ClickHouse 时由主库承接写入与查询;切换任务会冻结写入、复制数据后翻转主库。 启动时校验日志主库与运行配置一致,定期清理按各库保留天数删除过期记录。
23 lines
702 B
TypeScript
23 lines
702 B
TypeScript
import { BaseService } from '@/lib/services/core';
|
|
import type { AppUpdateStatus, LogDatabaseStatus, SystemStatus } from './types';
|
|
|
|
export class AdminStatusService extends BaseService {
|
|
protected static readonly basePath = '/api/v1/admin';
|
|
|
|
static async getSystemStatus(): Promise<SystemStatus> {
|
|
return this.get<SystemStatus>('/status');
|
|
}
|
|
|
|
static async getLogDatabaseStatus(): Promise<LogDatabaseStatus> {
|
|
return this.get<LogDatabaseStatus>('/status/log-database');
|
|
}
|
|
|
|
static async getUpdateStatus(): Promise<AppUpdateStatus> {
|
|
return this.get<AppUpdateStatus>('/update');
|
|
}
|
|
|
|
static async applyUpdate(): Promise<void> {
|
|
return this.post<void>('/update/apply');
|
|
}
|
|
}
|