移除告警规则界面、恢复 Chat 端点并优化列表
CI / test (push) Successful in 25s
Release / release (push) Successful in 26s

This commit is contained in:
2026-07-13 10:08:08 +08:00
parent 94fbe62e4c
commit 2ea5b73de2
17 changed files with 73 additions and 402 deletions
+1
View File
@@ -27,6 +27,7 @@ const blacklist = useAsync(listAiBlacklist)
const baseUrl = `${window.location.origin}/ai/v1`
const endpoints = [
{ method: 'POST', path: '/chat/completions', note: 'OpenAI · 流式/非流式' },
{ method: 'POST', path: '/responses', note: 'OpenAI Responses · 无状态子集' },
{ method: 'POST', path: '/messages', note: 'Claude · 流式/非流式' },
{ method: 'POST', path: '/embeddings', note: 'OpenAI Embeddings · 向量化' },
+9 -8
View File
@@ -163,7 +163,8 @@ const currencySymbol = computed(() => {
{{ ov?.tenants.alive ?? 0 }}/{{ ov?.tenants.total ?? 0 }} 存活
</div>
</div>
<div class="px-4.5 py-1.5">
<!-- 限高内部滚动:租户多时不撑高整行,底部露半行暗示可滚 -->
<div class="max-h-90 overflow-y-auto px-4.5 py-1.5">
<div
v-for="c in configs.data.value ?? []"
:key="c.id"
@@ -188,13 +189,13 @@ const currencySymbol = computed(() => {
</div>
<div class="w-18 flex-none text-right text-xs text-ink-3">{{ fmtRelative(c.lastVerifiedAt) }}</div>
</div>
<div class="py-2.5 text-center">
<RouterLink
class="text-[13px] font-medium text-accent hover:text-accent-hover"
:to="{ name: 'tenants' }"
>查看全部租户</RouterLink
>
</div>
</div>
<div class="border-t border-line-soft py-2.5 text-center">
<RouterLink
class="text-[13px] font-medium text-accent hover:text-accent-hover"
:to="{ name: 'tenants' }"
>查看全部租户</RouterLink
>
</div>
</div>
</div>
+1 -1
View File
@@ -143,7 +143,7 @@ async function remove() {
<div class="max-w-80 text-[13px] leading-relaxed">
<div class="font-medium">删除{{ config.data.value.alias }}</div>
<div class="mt-1 text-xs text-ink-3">
将清理面板内关联数据后台任务测活 / 成本快照回传事件Webhook 密钥告警规则 AI 渠道
将清理面板内关联数据后台任务测活 / 成本快照回传事件Webhook 密钥与 AI 渠道
</div>
<div class="mt-0.5 text-xs text-ink-3">
OCI 云端资源不受影响云端日志回传链路请先在其他页销毁
+22 -3
View File
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { NButton, NDataTable, NInput, NInputGroup, NInputGroupLabel, NPopconfirm, NPopover, NSelect, NTooltip, type DataTableColumns } from 'naive-ui'
import { computed, h, ref, type VNodeChild } from 'vue'
import { computed, h, reactive, ref, watch, type VNodeChild } from 'vue'
import { RouterLink, useRouter } from 'vue-router'
import { listAiChannels } from '@/api/aigateway'
@@ -63,6 +63,25 @@ const filtered = computed(() => {
)
})
/** 客户端分页:字面量对象会在重渲染时被重建导致状态丢失,须用 reactive 受控 */
const pagination = reactive({
page: 1,
pageSize: 10,
showSizePicker: true,
pageSizes: [10, 20, 50, 100],
onUpdatePage: (p: number) => {
pagination.page = p
},
onUpdatePageSize: (ps: number) => {
pagination.pageSize = ps
pagination.page = 1
},
})
/** 搜索或分组过滤变化后回第 1 页,避免停留在越界页码 */
watch([keyword, groupFilter], () => {
pagination.page = 1
})
/** 任务是否作用于该租户:抢机看目标租户;AI 探测看号池渠道(仅入池租户);
* 测活 / 成本看范围(空 = 全部租户) */
function taskTouchesCfg(task: Task, cfgId: number): boolean {
@@ -227,7 +246,7 @@ function renderActions(row: OciConfigSummary): VNodeChild {
h(
'div',
{ class: 'mt-1 text-xs text-ink-3' },
'将清理面板内关联数据:后台任务、测活 / 成本快照、回传事件、Webhook 密钥、告警规则与 AI 渠道。',
'将清理面板内关联数据:后台任务、测活 / 成本快照、回传事件、Webhook 密钥与 AI 渠道。',
),
h(
'div',
@@ -332,7 +351,7 @@ const columns = computed<DataTableColumns<OciConfigSummary>>(() => [
:columns="columns"
:data="filtered"
:loading="configs.loading.value"
:pagination="{ pageSize: 10 }"
:pagination="pagination"
:scroll-x="1200"
:row-key="(r: OciConfigSummary) => r.id"
/>