feat: 收口模板升级与阶段七持续回归
This commit is contained in:
1 parent
ec16fff70e
commit
71c528de34
29 files changed
+1962
-304
No files matched your search
@@ -35,6 +35,10 @@ export function TemplateManagementPage() {
|
||||
queryFn: () => client.listAdminTemplatePackageAudit(auditId as string),
|
||||
enabled: Boolean(auditId),
|
||||
});
|
||||
const metrics = useQuery({
|
||||
queryKey: ["admin-template-operation-failures", 30],
|
||||
queryFn: () => client.getAdminTemplateOperationFailures({ days: 30 }),
|
||||
});
|
||||
const lifecycle = useMutation({
|
||||
mutationFn: async ({ id, action }: { id: string; action: "publish" | "retire" }) =>
|
||||
action === "publish"
|
||||
@@ -108,6 +112,29 @@ export function TemplateManagementPage() {
|
||||
/>
|
||||
) : null}
|
||||
{lifecycle.isError ? <ErrorNote error={lifecycle.error} /> : null}
|
||||
<AdminSection
|
||||
title="近 30 天失败概览"
|
||||
description="只显示按操作类别聚合的数量,不包含 requestId、错误正文或品牌内容。"
|
||||
>
|
||||
<QueryState
|
||||
loading={metrics.isLoading}
|
||||
error={metrics.error}
|
||||
onRetry={() => void metrics.refetch()}
|
||||
>
|
||||
<List
|
||||
size="small"
|
||||
grid={{ gutter: 16, column: 4 }}
|
||||
dataSource={metrics.data?.failures ?? []}
|
||||
renderItem={(item) => (
|
||||
<List.Item>
|
||||
<Typography.Text>
|
||||
{item.action}:<Typography.Text strong>{item.count}</Typography.Text>
|
||||
</Typography.Text>
|
||||
</List.Item>
|
||||
)}
|
||||
/>
|
||||
</QueryState>
|
||||
</AdminSection>
|
||||
<AdminSection
|
||||
title="已导入版本"
|
||||
description="同一 package key 的不同版本并列保留,发布品牌时再选择安装版本。"
|
||||
|
||||
Reference in new issue
Block a user