Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
13 commits
Select commit Hold shift + click to select a range
5c2f934
feat(fancontroller): 实现邮件告警和单次执行模式- 添加邮件告警功能,支持风扇异常时自动发送告警邮件- 实现单次执行模…
chennest Oct 9, 2025
e2f9299
浪潮ipmi控制风扇代码
chennest Mar 17, 2026
6df89d3
重构: 风扇转速与温度读取统一走 Prometheus,新增永擎 EPYCD8 控制器
chennest Sep 28, 2026
9319ee0
新增: GPU 风扇控制台单机应用(FastAPI + 闭环控制 + 安全护栏)
chennest Sep 28, 2026
b15e41e
新增: 控制台前端(Vue3 + TS + 现代 SaaS 风多页面)
chennest Sep 28, 2026
583b6e9
修复: 控制模式持久化到 SQLite,运行时状态以库为唯一权威
chennest Sep 28, 2026
f2f0cde
审计修复: 5 项发现(安全护栏心跳 / 兜底管控过滤 / 幽灵源 / 前端状态同步×2)
chennest Sep 28, 2026
13799f7
界面: 显式区分三种「自动」(自动调档 / 手动定速 / BMC 自动档)
chennest Sep 28, 2026
5322ff9
新增: 曲线试算预览(/api/curve/preview 走真实算法)+ CurveEditor 组件化,趋势图拆分为温度/转速独立双图
chennest Sep 28, 2026
1a2d411
新增: 概览 GPU 卡片展示 SM 频率(DCGM SM_CLOCK,nvidia-smi clocks.sm 兜底)
chennest Sep 28, 2026
937c928
文档: 新增部署手册 DEPLOY.md 与一键脚本 deploy.sh(分片 base64 上传、排除 app/data、重启自检)
chennest Sep 28, 2026
37359fe
文档: 重写 README(SEO:双语标语、徽章、关键词区、双代际结构,修正许可证标注为 GPL-3.0)
chennest Sep 29, 2026
5aff6a8
新增: GitHub Actions CI(单测/前端构建/部署包 artifact,PyInstaller 双平台可执行,打 tag 自…
chennest Sep 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"permissions": {
"allow": [
"Bash(python:*)",
"Bash(pip install:*)"
],
"deny": [],
"ask": []
}
}
166 changes: 166 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
name: CI

on:
push:
branches: [main]
tags: ["v*"]
pull_request:

# 同一分支的新推送取消还在跑的旧流水线(tag 推送各占一个 group,互不影响)
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
# ---------- ① 测试 + 前端构建 + 部署包(每次推送/PR 都跑) ----------
test-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.13" # 对齐 pve02 线上版本

- name: 后端单元测试
run: |
pip install -r app/requirements.txt
python -m unittest discover -s app/tests -t . -v

- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: frontend/package-lock.json

- name: 前端构建(含 vue-tsc 全量类型检查)
working-directory: frontend
run: |
npm ci
npm run build

- name: 确认前端产物就位
run: test -f app/static/index.html

# 成员路径必须是 app/...(对齐 DEPLOY.md 坑①),排除运行时数据
- name: 打部署包
run: >
tar czf gpu-fan-console-app.tgz
--exclude='__pycache__' --exclude='*.pyc' --exclude='app/data'
-C . app

- uses: actions/upload-artifact@v4
with:
name: gpu-fan-console-app
path: gpu-fan-console-app.tgz

# ---------- ② 控制台双平台可执行(PR 不跑,省 Windows 时长) ----------
build-console:
if: github.event_name != 'pull_request'
needs: test-and-build
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

# 前端产物在 ubuntu 上构建,这里从部署包里解开复用(静态资源与平台无关)
- uses: actions/download-artifact@v4
with:
name: gpu-fan-console-app
- run: tar xzf gpu-fan-console-app.tgz

- uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: 构建控制台可执行
run: |
pip install -r app/requirements.txt pyinstaller
python packaging/build_console.py

- name: 打包分发(Windows → zip / Linux → tar.gz)
shell: bash
run: |
cd dist
if [ "$RUNNER_OS" = "Windows" ]; then
tar -a -cf gpu-fan-console-windows-x64.zip gpu-fan-console
else
tar czf gpu-fan-console-linux-x64.tar.gz gpu-fan-console
fi

- uses: actions/upload-artifact@v4
with:
name: gpu-fan-console-${{ matrix.os }}
path: dist/gpu-fan-console-*

# ---------- ③ 旧版脚本单文件可执行(PR 不跑) ----------
build-legacy:
if: github.event_name != 'pull_request'
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: 构建旧脚本单文件可执行
run: |
pip install pyinstaller
python packaging/build_legacy.py

- name: 按平台重命名产物
shell: bash
run: |
cd dist
for f in fancontroller fancontroller_once; do
if [ "$RUNNER_OS" = "Windows" ]; then
mv "$f.exe" "$f-windows-x64.exe"
else
mv "$f" "$f-linux-x64"
fi
done

- uses: actions/upload-artifact@v4
with:
name: legacy-${{ matrix.os }}
path: dist/fancontroller*

# ---------- ④ 打 tag(v*)自动发 Release ----------
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [test-and-build, build-console, build-legacy]
runs-on: ubuntu-latest
permissions:
contents: write # 发 Release 需要
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true

- name: 创建 Release 并上传全部产物
env:
GH_TOKEN: ${{ github.token }}
run: |
ls -l artifacts
gh release create "$GITHUB_REF_NAME" artifacts/* \
--title "gpu-fan-console $GITHUB_REF_NAME" \
--generate-notes \
|| gh release upload "$GITHUB_REF_NAME" artifacts/* --clobber
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# 本地工作数据(WorkBuddy 记忆目录与 agent-ssh-cli 锁文件),不进版本库
.workbuddy/
agent-ssh-cli-*.lock

# 运行时数据:SQLite 库(绑定 + 审计)、心跳文件等,属于机器本地状态
app/data/

# 前端构建产物:由 frontend/ 构建生成(npm run build),不进版本库
app/static/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -164,4 +174,5 @@ cython_debug/
# Custom ignores
fan_settings.json
fancontroller.log
fan_settings.yaml
logs/
Loading
Loading