Files
aiops/frontend
attacker 1a913549fc feat(k8s-ui): 重写 K8s 前端 — Deployment 详情页/HPA/CronJob/操作按钮
api.ts 改造:
  - 修复 scaleDeployment/restartDeployment/deletePod 死桩 → 真实后端 API
  - 新增: getPodLogs/execPod/updateDeploymentImage (CI webhook)
  - 新增: getHPAs/createHPA/deleteHPA (HPA 管理)
  - 新增: getCronJobs/createCronJob/suspendCronJob/triggerCronJob/deleteCronJob
  - 新增: getNamespaces

DeploymentDetail 新组件:
  - 副本状态卡片 (Ready/Total/Available)
  - 副本加减按钮 (scale control)
  - 滚动重启按钮
  - 镜像更新表单 (CI webhook inline)
  - Pod 列表 (按 deployment 名前缀过滤)
  - Pod 日志查看器 (tail/container 参数)
  - HPA 管理选项卡 (列表+删除)
  - 创建 HPA 弹窗 (CPU/内存指标配置)

K8sWorkloads 增强:
  - Deployment 表添加「操作」列(副本加减 + 查看详情)
  - 点击 Deployment 行 → 跳转 DeploymentDetail 详情页
  - handleQuickScale 快速扩缩容

新增 useToast hook (轻量级 toast 通知)
2026-06-19 07:36:13 +00:00
..

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])