- 新增 model_deploy 与 model_operations 双库查询,支持模型列表、模型详情、单月监控结果和运维工作台真实接口。 - 关闭运维模块生产 Mock 数据,补充缺表/空数据降级、工作台空状态和首条纵向链路测试。 - 按业务团队、模型团队、管理员权限矩阵接入菜单、页面、操作按钮和后端接口权限校验,支持 business_team 角色。 - 更新工作台布局、深色欢迎卡片、全宽页面适配、顶部回退,以及权限分组展示。 - 新增架构实现基线、周目标完成情况和角色权限矩阵初始化 SQL 文档。
54 lines
1.5 KiB
TypeScript
54 lines
1.5 KiB
TypeScript
import type { AbnormalLevel, ModelCategoryId, ModelGrade } from "./modelData";
|
|
|
|
export type MonitoringRule = {
|
|
id: number;
|
|
ranking: "相符" | "不符";
|
|
ksBand: string;
|
|
psiBand: string;
|
|
dropBand: string;
|
|
abnormal: AbnormalLevel;
|
|
grade: ModelGrade;
|
|
reason: string;
|
|
action: string;
|
|
};
|
|
|
|
export type ThresholdConfig = {
|
|
ks: number;
|
|
psiLow: number;
|
|
psiHigh: number;
|
|
ksDrop: number;
|
|
interventionKs: number;
|
|
interventionPsi: number;
|
|
};
|
|
|
|
export const BASE_THRESHOLDS: ThresholdConfig = {
|
|
ks: 40,
|
|
psiLow: 10,
|
|
psiHigh: 25,
|
|
ksDrop: 20,
|
|
interventionKs: 30,
|
|
interventionPsi: 50,
|
|
};
|
|
|
|
export const CATEGORY_THRESHOLDS: Record<ModelCategoryId, ThresholdConfig | null> = {
|
|
std: null,
|
|
bai: null,
|
|
big: null,
|
|
afd: null,
|
|
};
|
|
|
|
export const MONITORING_RULES: MonitoringRule[] = [];
|
|
|
|
export const RULE_VERSIONS: Array<{ version: string; category: string; author: string; createdAt: string; current: boolean; note: string }> = [];
|
|
|
|
export type PromptKey = "A" | "BC";
|
|
export const PROMPTS: Partial<Record<PromptKey, { name: string; text: string }>> = {};
|
|
|
|
export const PROMPT_VERSIONS: Array<{ version: string; author: string; createdAt: string; current: boolean; note: string }> = [];
|
|
|
|
export const PROMPT_REGRESSION: Array<{ sample: string; result: string; detail: string }> = [];
|
|
|
|
export const TEMPLATE_VERSIONS: Array<{ version: string; author: string; createdAt: string; current: boolean; note: string }> = [];
|
|
|
|
export const BANK_REPORT_CONFIG: Record<string, { frequency: string; day: number }> = {};
|