Commit Graph
7 Commits
Author SHA1 Message Date
attacker 732974d152 refactor: unify kubernetes_ table prefix, merge CI/CD models, LLM session support
- Rename container_clusters → kubernetes_clusters, container_topology_layouts → kubernetes_topology_layouts
- LLM: add session_id to chat history for multi-turn conversation support
- CI/CD: add pipeline_id, deploy_type, artifact_url, k8s_cluster_id to AppRelease
- Cleanup: remove deprecated playbook handler, simplify automation models
- Database: optimize auto-migrate model list
- Frontend: AIOps assistant improvements, api.ts updates
2026-06-19 15:01:54 +00:00
attacker 9365c1e9db fix: 移除脚本库冗余统计框 & 修复 CronJob 表名 (cron_jobs→ops_cron_jobs) 导致创建500 2026-06-19 13:59:47 +00:00
Logan 2d02d63806 feat: 定时任务关联脚本库 + 脚本库精简为shell/python
定时任务:
- 执行类型改为 Shell脚本/Python脚本/自定义命令 三选一
- Shell/Python 类型下拉关联脚本库, 选择后预览脚本内容
- 卡片显示关联脚本名 (Preload Script 已就绪)
- 去掉 playbook 类型

脚本库:
- 去掉 powershell/yaml, 只保留 shell + python
- 后端 validation 同步 oneof=shell python

涉及文件:
- script-helpers.tsx: scriptTypes 去掉 powershell/yaml
- CronJobFormDialog.tsx: 完整重写, 脚本库下拉+预览
- CronJobManager.tsx: type 标签对齐, 脚本名展示
- automation.go: CronJob type oneof 改 shell/python/command
                Script type oneof 改 shell/python
2026-06-19 21:46:56 +08:00
attacker f05cf71121 feat: Ansible 完整工作流页面(模板→主机→预览→执行→监控)
**新组件 AnsibleWorkflow.tsx(~670行):**
- Step 1: 模板选择 — 卡片网格,按分类/标签搜索过滤
- Step 2: 主机匹配 — 正则/前缀/模糊搜索,checkable 表格,全选
- Step 3: 确认执行 — Playbook 摘要 + 主机列表 + YAML 预览
- Step 4: 执行监控 — 状态指示器 + 终端输出 + 耗时统计
- 执行记录 Tab — 历史列表 + 输出展开

**路由调整:**
- /ansible → AnsibleWorkflow(主工作流)
- /ansible/manage → AnsibleManager(模板 CRUD)

**类型补全:**
- ExecutionRecord 增加 triggered_by 字段
2026-06-19 13:41:04 +00:00
attacker 5949ec5d0c feat: Agent采集uptime, 后端持久化kernel/uptime/diskIO, 前端磁盘BPS+IOPS展示
- Agent: system.go 添加 readUptime(), SystemStat 携带 Uptime
- Backend: Server 模型新增 Kernel 字段, ReceiveReport 持久化 kernel+uptime
- Backend: /agent/latest 返回 kernel/uptime/port_info/disk_io_info/disk_total
- Frontend: 磁盘监控改为 BPS+IOPS (4张卡片), 系统信息修复内核/运行时长/监听端口/磁盘容量
- 图表单位从 MB/s 改为 KB/s, 添加 formatBPS 工具函数
2026-06-19 01:10:00 +00:00
attacker ae6af93360 feat: Ansible Playbook 全栈 CRUD + 真实执行 — 替换mock为后端持久化
后端:
- models/automation.go: Playbook 模型新增 Category/Tags 字段; 新增 CreatePlaybookRequest
- handlers/automation.go: 新增 runPlaybookLocal(写临时YML+ansible-playbook --connection=local执行)
  + randomCode(crypto/rand生成唯一code) + List/Get/Create/Update/Delete/Execute Playbook 完整CRUD
  Execute 创建TaskExecution(task_type=playbook)记录,采集stdout/stderr/退出码/耗时
- routes/routes.go: 注册 /playbooks 路由组(7个端点)

前端:
- services/api.ts: ansibleApi 从mock改为真实 /playbooks 后端调用
- AnsibleManager.tsx 完全重写:
  - Playbook管理: 真实数据卡片列表(id/name/category/tags/run_count/timeout) + 搜索/分类筛选
  - 新建/编辑对话框复用(编辑模式预填数据) — 新增编辑入口(原无编辑功能)
  - 查看内容: 终端风格YAML查看器 + 快捷编辑按钮
  - 执行: ConfirmProvider确认 + ansible-playbook本地执行 + toast结果反馈
  - 执行记录tab: 真实TaskExecution记录(任务名/状态/开始时间/耗时/日志查看)
  - 统计卡片: 总数/执行中/今日成功/今日失败(基于真实执行记录)
  - 移除原inventory占位tab(无后端支持,避免非功能按钮)
  - tags JSON数组与前端string[]互转映射
2026-06-14 23:14:16 +08:00
attacker 7d6674bddd init: EZOps AIOps 智能运维平台
- 前端: React 18 + TypeScript + Vite + Tailwind CSS + shadcn/ui
- 后端: Go + Gin + GORM + JWT (golang-jwt/jwt/v5)
- 功能: 服务器管理、K8s集群、监控告警、CI/CD、自动化运维、审批流程、审计日志
- 文档: 设计文档(ROADMAP/PDD/架构/模块)
2026-06-13 23:09:47 +08:00