Files
aiops/frontend
Logan abf2917fad fix: K8s集群编辑保存失败+凭据覆盖+去掉Kubectl死按钮
问题:
1. UpdateCluster 用 CreateK8sClusterRequest (code binding:"required"),
   编辑时不传 code → 校验失败 400 → 保存不成功
2. Token/KubeConfig json:"-" 不序列化, 编辑时拿不到原值,
   提交空字符串覆盖真实凭据
3. 操作菜单 Kubectl 是死按钮

修复:
- UpdateCluster 改用 map[string]interface{} 接收, 逐字段更新,
  空值不覆盖 (防止凭据清空)
- 新增 GET /:id/detail 返回 has_token/has_kube_config 脱敏标记
- 编辑弹框拉取详情 API 回填, Token/KubeConfig 留空显示 '已配置' 提示
- 去掉 Kubectl 死按钮, 保留 详情/配置/删除 三项
2026-06-19 15:08:50 +08: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...
    },
  },
])