mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-07 18:07:47 +08:00
feat(health): add model and provider health monitoring
- Rename the original health monitor to endpoint health monitor - Add tab navigation for endpoint, model, and provider health views - Add model health monitor cards with availability, latency, first-byte latency, and 60-point history - Add admin-only provider health monitor with collapsible active-provider sections - Show per-provider model health cards after expanding a provider - Add backend model health and provider health monitor payload builders - Add admin endpoint for provider health monitoring - Add provider-scoped usage breakdown filtering for per-provider model statistics - Add frontend API types and request helpers for model/provider health data - Add demo mock data for model and provider health monitoring - Fix model health timeline time-unit handling so request history segments render correctly Verification: - cargo fmt - npm run type-check - npm run build - cargo test -p aether-gateway health_models - cargo test -p aether-gateway health_providers - cargo test -p aether-gateway gateway_exposes_frontdoor_manifest_without_proxying_upstream
This commit is contained in:
@@ -1,18 +1,69 @@
|
||||
<template>
|
||||
<div class="space-y-6 pb-8">
|
||||
<HealthMonitorCard
|
||||
title="健康监控"
|
||||
:is-admin="isAdminPage"
|
||||
:show-provider-info="isAdminPage"
|
||||
/>
|
||||
<Tabs v-model="activeTab">
|
||||
<TabsList
|
||||
class="tabs-button-list grid w-full"
|
||||
:class="isAdminPage ? 'max-w-2xl grid-cols-3' : 'max-w-md grid-cols-2'"
|
||||
>
|
||||
<TabsTrigger value="endpoint">
|
||||
端点健康监控
|
||||
</TabsTrigger>
|
||||
<TabsTrigger value="model">
|
||||
模型健康监控
|
||||
</TabsTrigger>
|
||||
<TabsTrigger
|
||||
v-if="isAdminPage"
|
||||
value="provider"
|
||||
>
|
||||
提供商健康监控
|
||||
</TabsTrigger>
|
||||
</TabsList>
|
||||
|
||||
<TabsContent
|
||||
value="endpoint"
|
||||
class="mt-4"
|
||||
>
|
||||
<HealthMonitorCard
|
||||
title="端点健康监控"
|
||||
:is-admin="isAdminPage"
|
||||
:show-provider-info="isAdminPage"
|
||||
/>
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent
|
||||
value="model"
|
||||
class="mt-4"
|
||||
>
|
||||
<ModelHealthMonitorCard
|
||||
title="模型健康监控"
|
||||
:is-admin="isAdminPage"
|
||||
:show-provider-info="isAdminPage"
|
||||
/>
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent
|
||||
v-if="isAdminPage"
|
||||
value="provider"
|
||||
class="mt-4"
|
||||
>
|
||||
<ProviderHealthMonitorCard title="提供商健康监控" />
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { computed, ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import Tabs from '@/components/ui/tabs.vue'
|
||||
import TabsContent from '@/components/ui/tabs-content.vue'
|
||||
import TabsList from '@/components/ui/tabs-list.vue'
|
||||
import TabsTrigger from '@/components/ui/tabs-trigger.vue'
|
||||
import HealthMonitorCard from '@/features/providers/components/HealthMonitorCard.vue'
|
||||
import ModelHealthMonitorCard from '@/features/providers/components/ModelHealthMonitorCard.vue'
|
||||
import ProviderHealthMonitorCard from '@/features/providers/components/ProviderHealthMonitorCard.vue'
|
||||
|
||||
const route = useRoute()
|
||||
const isAdminPage = computed(() => route.path.startsWith('/admin'))
|
||||
const activeTab = ref('endpoint')
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user