mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-09-24 16:04:35 +08:00
feat(logs): enhance logging functionality and UI updates
- Refactored MainLayout to always show logs in the sidebar. - Updated i18n files for English, Russian, Simplified Chinese, and Traditional Chinese to include new log-related messages. - Improved LogsPage styling for better layout and added runtime notices. - Enhanced LogsPage logic to handle different server runtime kinds (CPA and Home). - Added new API methods to handle logs fetching and request log downloading with runtime checks. - Introduced runtime kind detection during authentication and connection status updates. - Updated types to include server runtime kind and adjusted API responses accordingly.
This commit is contained in:
+14
-2
@@ -16,8 +16,20 @@ export const CACHE_EXPIRY_MS = 30 * 1000; // 与基线保持一致,减少管
|
||||
export const DEFAULT_API_PORT = 8317;
|
||||
export const MANAGEMENT_API_PREFIX = '/v0/management';
|
||||
export const REQUEST_TIMEOUT_MS = 30 * 1000;
|
||||
export const VERSION_HEADER_KEYS = ['x-cpa-version', 'x-server-version'];
|
||||
export const BUILD_DATE_HEADER_KEYS = ['x-cpa-build-date', 'x-server-build-date'];
|
||||
export const CPA_VERSION_HEADER_KEYS = ['x-cpa-version'];
|
||||
export const CPA_BUILD_DATE_HEADER_KEYS = ['x-cpa-build-date'];
|
||||
export const HOME_VERSION_HEADER_KEYS = ['x-cpa-home-version'];
|
||||
export const HOME_BUILD_DATE_HEADER_KEYS = ['x-cpa-home-build-date'];
|
||||
export const VERSION_HEADER_KEYS = [
|
||||
...HOME_VERSION_HEADER_KEYS,
|
||||
...CPA_VERSION_HEADER_KEYS,
|
||||
'x-server-version'
|
||||
];
|
||||
export const BUILD_DATE_HEADER_KEYS = [
|
||||
...HOME_BUILD_DATE_HEADER_KEYS,
|
||||
...CPA_BUILD_DATE_HEADER_KEYS,
|
||||
'x-server-build-date'
|
||||
];
|
||||
|
||||
// 日志相关
|
||||
export const LOGS_TIMEOUT_MS = 60 * 1000;
|
||||
|
||||
Reference in New Issue
Block a user