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

AIOps 智能运维平台

企业级云原生智能运维解决方案,集成资产管理、应用发布、监控告警、自动化运维和 AI 智能分析。

技术栈

前端

  • React 19 + TypeScript + Vite
  • Tailwind CSS + shadcn/ui
  • Zustand (状态管理) / TanStack Query (数据获取)
  • Recharts (图表) / Lucide React (图标)

后端

  • Go 1.22+ / Gin Web Framework
  • GORM (ORM) / MySQL 8.0+ / Redis
  • JWT 认证 / Zap 日志 / Viper 配置
  • Swagger API 文档

项目结构

aiops/
├── frontend/                    # 前端项目 (React + TypeScript)
│   ├── src/
│   │   ├── components/     # 组件 (dashboard/server/k8s/monitor/deploy/aiops/...)
│   │   ├── lib/            # 工具函数
│   │   ├── store/          # 状态管理
│   │   ├── types/          # TypeScript 类型定义
│   │   ├── services/       # API 服务
│   │   └── hooks/          # 自定义 Hooks
│   ├── package.json
│   └── vite.config.ts
│
├── backend/                # 后端项目 (Go + Gin)
│   ├── cmd/                # 应用入口
│   ├── internal/
│   │   ├── api/            # HTTP 处理器、中间件、路由
│   │   ├── config/         # 配置管理
│   │   └── models/         # 数据模型
│   ├── pkg/                # 公共包 (database/logger)
│   ├── scripts/            # 初始化脚本
│   ├── go.mod
│   └── Makefile
│
├── agent/                    # Agent 监控服务
│   ├── cmd/                  # Agent 入口
│   ├── internal/             # Agent 内部逻辑
│   └── config/               # Agent 配置
│
├── docs/                   # 设计文档
│   ├── PDD_PLAN.md         # 产品设计文档
│   ├── ROADMAP.md          # 路线图
│   ├── PROJECT_SUMMARY.md  # 项目总结
│   └── BACKEND_SUMMARY.md  # 后端说明
│
└── README.md

快速开始

前端

cd frontend
npm install
npm run dev      # 开发模式 http://localhost:5173
npm run build    # 生产构建

后端

cd backend
cp config.yaml.example config.yaml
go mod download
go run cmd/main.go    # http://localhost:8080

Docker Compose 部署

# 一键启动全部服务 (前端 + 后端 + MySQL + Redis + Agent)
docker compose up -d

# 查看服务状态
docker compose ps

# 停止服务
docker compose down

默认账号

  • 用户名: admin
  • 密码: 123456

核心功能

模块 说明 优先级
仪表盘 成本统计、告警聚合、Top资源、SSL提醒 P0
资产管理 服务器CRUD、批量导入、WebShell、云账号 P0
Kubernetes 集群/节点/工作负载、拓扑可视化 P0
应用发布 流水线管理、发布审批、回滚 P0
监控中心 监控大屏、资源监控、链路追踪、告警中心、数据源 P0
自动化运维 定时任务、脚本库、Ansible P1
AIOps智能 AI助手、Agent监控、告警分析、脚本生成、故障诊断 P0
资源申请 资源申请审批、配额管理 P1
系统管理 用户权限、操作审计、系统设置 P1

License

MIT

S
Description
No description provided
Readme GPL-3.0
78 MiB
0 Stars 0 Watchers 0 Forks
Languages
TypeScript 62.9%
Go 35.2%
Shell 1%
CSS 0.4%
Python 0.2%
Other 0.2%