feat: add monitor center module
Changes: - Add monitor center page with KPI cards, charts and request logs - Implement channel stats, failure analysis, model distribution visualization - Support time range filtering (last 1/6/24 hours) - Add model disable feature with related hooks and state management - Optimize request logs list performance with virtual scrolling - Improve mobile styles and table scrolling experience - Add i18n support for Chinese and English Modified files: - src/pages/MonitorPage.tsx (added) - src/components/monitor/* (added, 10 components) - src/hooks/useDisableModel.ts (added) - src/utils/monitor.ts (added) - src/i18n/locales/*.json (modified) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -194,5 +194,14 @@ export const providersApi = {
|
||||
apiClient.patch('/openai-compatibility', { index, value: serializeOpenAIProvider(value) }),
|
||||
|
||||
deleteOpenAIProvider: (name: string) =>
|
||||
apiClient.delete(`/openai-compatibility?name=${encodeURIComponent(name)}`)
|
||||
apiClient.delete(`/openai-compatibility?name=${encodeURIComponent(name)}`),
|
||||
|
||||
// 通过 name 更新 OpenAI 兼容提供商(用于禁用模型)
|
||||
patchOpenAIProviderByName: (name: string, value: Partial<OpenAIProviderConfig>) => {
|
||||
const payload: Record<string, any> = {};
|
||||
if (value.models !== undefined) {
|
||||
payload.models = serializeModelAliases(value.models);
|
||||
}
|
||||
return apiClient.patch('/openai-compatibility', { name, value: payload });
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user