mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-02 06:56:36 +08:00
[功能] 添加数据库观测数据清理功能,支持手动和自动清理策略
This commit is contained in:
@@ -2,6 +2,8 @@ import { apiRequest } from '@/lib/api/client';
|
||||
|
||||
import type {
|
||||
BootstrapTokenPayload,
|
||||
DatabaseCleanupPayload,
|
||||
DatabaseCleanupResult,
|
||||
GeoIPLookupResult,
|
||||
OptionItem,
|
||||
SettingsProfile,
|
||||
@@ -26,6 +28,13 @@ export function lookupGeoIP(provider: string, ip: string) {
|
||||
});
|
||||
}
|
||||
|
||||
export function cleanupDatabaseObservability(payload: DatabaseCleanupPayload) {
|
||||
return apiRequest<DatabaseCleanupResult>('/option/database/cleanup', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
}
|
||||
|
||||
export function getBootstrapToken() {
|
||||
return apiRequest<BootstrapTokenPayload>('/nodes/bootstrap-token');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user