mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40:21 +08:00
feat: OAuth 账户管理、维护调度、端点健康检查增强及前端优化
- 新增 OAuth 账户管理对话框和提供商详情抽屉中的 OAuth 信息展示 - 新增维护调度器(maintenance_scheduler)支持定时清理和健康检查 - 增强端点健康检查器,支持更多检测策略 - 重构 codex 服务为 metadata_collectors 模块 - 优化 OpenAI CLI normalizer 代码结构 - 前端: 改进使用量表格、统计图表、指南页面和异步任务管理 - 扩展多个数据库字符串列为 TEXT 类型 - 新增倒计时 composable 和 provider OAuth API 端点
This commit is contained in:
@@ -7,64 +7,64 @@
|
||||
</div>
|
||||
<div class="overflow-auto max-h-[320px]">
|
||||
<Table class="text-sm">
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead class="h-8 px-2">
|
||||
API格式
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
请求数
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
Tokens
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
费用
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
平均响应
|
||||
</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
<TableRow v-if="data.length === 0">
|
||||
<TableCell
|
||||
:colspan="5"
|
||||
class="text-center py-6 text-muted-foreground px-2"
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead class="h-8 px-2">
|
||||
API格式
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
请求数
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
Tokens
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
费用
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
平均响应
|
||||
</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
<TableRow v-if="data.length === 0">
|
||||
<TableCell
|
||||
:colspan="5"
|
||||
class="text-center py-6 text-muted-foreground px-2"
|
||||
>
|
||||
暂无API格式统计数据
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow
|
||||
v-for="item in data"
|
||||
:key="item.api_format"
|
||||
>
|
||||
暂无API格式统计数据
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow
|
||||
v-for="item in data"
|
||||
:key="item.api_format"
|
||||
>
|
||||
<TableCell class="font-medium py-2 px-2">
|
||||
{{ formatApiFormat(item.api_format) }}
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
{{ item.request_count }}
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
<span>{{ formatTokens(item.total_tokens) }}</span>
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
<div class="flex flex-col items-end text-xs gap-0.5">
|
||||
<span class="text-primary font-medium">{{ formatCurrency(item.total_cost) }}</span>
|
||||
<span
|
||||
v-if="isAdmin && item.actual_cost !== undefined"
|
||||
class="text-muted-foreground text-[10px]"
|
||||
>
|
||||
{{ formatCurrency(item.actual_cost) }}
|
||||
</span>
|
||||
</div>
|
||||
</TableCell>
|
||||
<TableCell class="text-right text-muted-foreground py-2 px-2">
|
||||
{{ item.avgResponseTime }}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableBody>
|
||||
</Table>
|
||||
<TableCell class="font-medium py-2 px-2">
|
||||
{{ formatApiFormat(item.api_format) }}
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
{{ item.request_count }}
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
<span>{{ formatTokens(item.total_tokens) }}</span>
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
<div class="flex flex-col items-end text-xs gap-0.5">
|
||||
<span class="text-primary font-medium">{{ formatCurrency(item.total_cost) }}</span>
|
||||
<span
|
||||
v-if="isAdmin && item.actual_cost !== undefined"
|
||||
class="text-muted-foreground text-[10px]"
|
||||
>
|
||||
{{ formatCurrency(item.actual_cost) }}
|
||||
</span>
|
||||
</div>
|
||||
</TableCell>
|
||||
<TableCell class="text-right text-muted-foreground py-2 px-2">
|
||||
{{ item.avgResponseTime }}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableBody>
|
||||
</Table>
|
||||
</div>
|
||||
</Card>
|
||||
</template>
|
||||
|
||||
@@ -7,64 +7,64 @@
|
||||
</div>
|
||||
<div class="overflow-auto max-h-[320px]">
|
||||
<Table class="text-sm">
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead class="h-8 px-2">
|
||||
模型
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
请求数
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
Tokens
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
费用
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
效率
|
||||
</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
<TableRow v-if="data.length === 0">
|
||||
<TableCell
|
||||
:colspan="5"
|
||||
class="text-center py-6 text-muted-foreground px-2"
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead class="h-8 px-2">
|
||||
模型
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
请求数
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
Tokens
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
费用
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
效率
|
||||
</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
<TableRow v-if="data.length === 0">
|
||||
<TableCell
|
||||
:colspan="5"
|
||||
class="text-center py-6 text-muted-foreground px-2"
|
||||
>
|
||||
暂无模型统计数据
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow
|
||||
v-for="model in data"
|
||||
:key="model.model"
|
||||
>
|
||||
暂无模型统计数据
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow
|
||||
v-for="model in data"
|
||||
:key="model.model"
|
||||
>
|
||||
<TableCell class="font-medium py-2 px-2">
|
||||
{{ model.model.replace('claude-', '') }}
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
{{ model.request_count }}
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
<span>{{ formatTokens(model.total_tokens) }}</span>
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
<div class="flex flex-col items-end text-xs gap-0.5">
|
||||
<span class="text-primary font-medium">{{ formatCurrency(model.total_cost) }}</span>
|
||||
<span
|
||||
v-if="isAdmin && model.actual_cost !== undefined"
|
||||
class="text-muted-foreground text-[10px]"
|
||||
>
|
||||
{{ formatCurrency(model.actual_cost) }}
|
||||
</span>
|
||||
</div>
|
||||
</TableCell>
|
||||
<TableCell class="text-right text-muted-foreground py-2 px-2">
|
||||
{{ model.costPerToken }}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableBody>
|
||||
</Table>
|
||||
<TableCell class="font-medium py-2 px-2">
|
||||
{{ model.model.replace('claude-', '') }}
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
{{ model.request_count }}
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
<span>{{ formatTokens(model.total_tokens) }}</span>
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
<div class="flex flex-col items-end text-xs gap-0.5">
|
||||
<span class="text-primary font-medium">{{ formatCurrency(model.total_cost) }}</span>
|
||||
<span
|
||||
v-if="isAdmin && model.actual_cost !== undefined"
|
||||
class="text-muted-foreground text-[10px]"
|
||||
>
|
||||
{{ formatCurrency(model.actual_cost) }}
|
||||
</span>
|
||||
</div>
|
||||
</TableCell>
|
||||
<TableCell class="text-right text-muted-foreground py-2 px-2">
|
||||
{{ model.costPerToken }}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableBody>
|
||||
</Table>
|
||||
</div>
|
||||
</Card>
|
||||
</template>
|
||||
|
||||
@@ -7,70 +7,70 @@
|
||||
</div>
|
||||
<div class="overflow-auto max-h-[320px]">
|
||||
<Table class="text-sm">
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead class="h-8 px-2">
|
||||
提供商
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
请求数
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
Tokens
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
费用
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
成功率
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
平均响应
|
||||
</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
<TableRow v-if="data.length === 0">
|
||||
<TableCell
|
||||
:colspan="6"
|
||||
class="text-center py-6 text-muted-foreground px-2"
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead class="h-8 px-2">
|
||||
提供商
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
请求数
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
Tokens
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
费用
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
成功率
|
||||
</TableHead>
|
||||
<TableHead class="h-8 px-2 text-right">
|
||||
平均响应
|
||||
</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
<TableRow v-if="data.length === 0">
|
||||
<TableCell
|
||||
:colspan="6"
|
||||
class="text-center py-6 text-muted-foreground px-2"
|
||||
>
|
||||
暂无提供商统计数据
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow
|
||||
v-for="provider in data"
|
||||
:key="provider.provider"
|
||||
>
|
||||
暂无提供商统计数据
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow
|
||||
v-for="provider in data"
|
||||
:key="provider.provider"
|
||||
>
|
||||
<TableCell class="font-medium py-2 px-2">
|
||||
{{ provider.provider }}
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
{{ provider.requests }}
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
<span>{{ formatTokens(provider.totalTokens) }}</span>
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
<div class="flex flex-col items-end text-xs gap-0.5">
|
||||
<span class="text-primary font-medium">{{ formatCurrency(provider.totalCost) }}</span>
|
||||
<span
|
||||
v-if="isAdmin && provider.actualCost !== undefined"
|
||||
class="text-muted-foreground text-[10px]"
|
||||
>
|
||||
{{ formatCurrency(provider.actualCost) }}
|
||||
</span>
|
||||
</div>
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
<span :class="getSuccessRateClass(provider.successRate)">{{ provider.successRate }}%</span>
|
||||
</TableCell>
|
||||
<TableCell class="text-right text-muted-foreground py-2 px-2">
|
||||
{{ provider.avgResponseTime }}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableBody>
|
||||
</Table>
|
||||
<TableCell class="font-medium py-2 px-2">
|
||||
{{ provider.provider }}
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
{{ provider.requests }}
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
<span>{{ formatTokens(provider.totalTokens) }}</span>
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
<div class="flex flex-col items-end text-xs gap-0.5">
|
||||
<span class="text-primary font-medium">{{ formatCurrency(provider.totalCost) }}</span>
|
||||
<span
|
||||
v-if="isAdmin && provider.actualCost !== undefined"
|
||||
class="text-muted-foreground text-[10px]"
|
||||
>
|
||||
{{ formatCurrency(provider.actualCost) }}
|
||||
</span>
|
||||
</div>
|
||||
</TableCell>
|
||||
<TableCell class="text-right py-2 px-2">
|
||||
<span :class="getSuccessRateClass(provider.successRate)">{{ provider.successRate }}%</span>
|
||||
</TableCell>
|
||||
<TableCell class="text-right text-muted-foreground py-2 px-2">
|
||||
{{ provider.avgResponseTime }}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableBody>
|
||||
</Table>
|
||||
</div>
|
||||
</Card>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user