Files
aiops/frontend/src/pages/approval/ApprovalAppPage.tsx
T
attackerandClaude c0ee8e4ddd refactor(frontend): api/components/pages 目录架构统一对齐菜单域 + 日志中心修复
1. 目录架构统一(API = components = 菜单域,一域一目录 + barrel)
   - log/ 提为独立顶层域(日志中心在菜单中与监控中心平级,不再塞在 monitor/)
   - task/ 拆分原 automation.ts → cron-job / script / remote-exec
   - aiops/ 合并 ai.ts + agentCli.ts → assistant + agent-cli
   - agent/ approval/ audit/ 提升为域目录
   - auth 拆分:authApi(认证自服务) + system/user.ts(userApi+ldapApi 管理端)
   - components/automation → components/task,菜单"自动化运维"→"作业任务"
   - pages/ 按域分子目录(approval/audit/monitor),删孤儿 AuditPage.tsx
   - 所有 API 符号名不变,组件经 @/api 聚合引用,运行时行为零变化

2. Loki 查询无返回修复:aiops 容器 DNS 解析外网域名失败
   (宿主机 systemd-resolved 转发链路异常),docker-compose 显式配 dns 上游

3. ES 查询框布局:工具栏单行挤 7 控件(ES 多 150px 索引框),拆两行——
   查询输入独占一行(+查询按钮),次级控件换行 flex-wrap

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-28 06:06:48 +00:00

26 lines
1.2 KiB
TypeScript

// 应用申请子页面 — 应用部署、版本发布申请
import { ApprovalCategoryPage, type FormField } from './ApprovalCategoryPage';
const APP_FIELDS: FormField[] = [
{ key: 'app_name', label: '应用名称', type: 'text', placeholder: '如 user-service', required: true },
{ key: 'git_url', label: 'Git 地址', type: 'text', placeholder: '如 https://github.com/org/repo.git', required: true },
{ key: 'branch', label: '分支', type: 'text', defaultValue: 'main', required: true },
{ key: 'language', label: '开发语言', type: 'select', options: ['Java', 'Go', 'Python', 'Node.js', 'C++'], required: true },
{ key: 'http_port', label: 'HTTP 端口', type: 'number', placeholder: '如 8080' },
{ key: 'env', label: '部署环境', type: 'select', options: ['dev', 'staging', 'prod'], required: true },
{ key: 'replicas', label: '副本数', type: 'number', defaultValue: 2, required: true },
{ key: 'remark', label: '备注', type: 'textarea' },
];
export function ApprovalAppPage() {
return (
<ApprovalCategoryPage
category="app"
title="应用申请"
description="申请应用部署、版本发布、流水线配置"
fields={APP_FIELDS}
templateCode="app_deploy"
/>
);
}