Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web UI: Enhance group operations #1680

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .idea/supervisor.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 73 additions & 0 deletions INSTALL_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Supervisor 安装指南

## 安装方法

### 1. 使用 pip 安装(推荐)

```bash
pip install supervisor
```

### 2. 从源码安装

```bash
# 克隆仓库
git clone https://github.com/你的用户名/supervisor.git
cd supervisor

# 安装
pip install -e .
```

## 基本配置

1. 生成默认配置文件:

```bash
echo_supervisord_conf > supervisord.conf
```

2. 编辑配置文件,根据需要修改:

```bash
# 设置HTTP服务器端口
[inet_http_server]
port=0.0.0.0:9001
username=admin
password=123456

# 添加您的程序
[program:yourapp]
command=/path/to/your/program
```

## 启动 Supervisor

```bash
# 启动 Supervisor
supervisord -c supervisord.conf

# 使用 supervisorctl 控制进程
supervisorctl status
supervisorctl start all
supervisorctl stop all
supervisorctl restart all
```

## Web 界面

安装成功后,访问 http://localhost:9001 即可打开 Supervisor 的 Web 界面。

用户名:admin
密码:123456 (根据您的配置)

## 组操作

本版本支持对进程组进行操作:

- 重启组:点击组名旁边的"重启组"按钮
- 停止组:点击组名旁边的"停止组"按钮

## 日志查看

点击进程名后的"查看日志"按钮,可以查看该进程的日志输出。
83 changes: 83 additions & 0 deletions PACKAGING_GUIDE_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Supervisor 打包与发布指南

## 打包过程

### 1. 环境准备

确保安装了必要的打包工具:

```bash
pip install setuptools wheel twine
```

### 2. 修改版本号

1. 编辑 `supervisor/version.txt` 文件,设置正确的版本号
2. 修改配置文件中的端口设置(如需要)

### 3. 构建包

运行打包脚本生成分发包:

```bash
./build_package.sh
```

打包完成后,会在 `dist/` 目录下生成以下文件:
- `supervisor-4.3.0.tar.gz` - 源码分发包
- `supervisor-4.3.0-py2.py3-none-any.whl` - Python wheel 包

### 4. 测试安装包

在测试环境中测试生成的包:

```bash
# 从源码包安装
pip install dist/supervisor-4.3.0.tar.gz

# 或从 wheel 包安装
pip install dist/supervisor-4.3.0-py2.py3-none-any.whl
```

### 5. 上传到 PyPI(可选)

如果你有 PyPI 帐号并想公开发布,可以使用:

```bash
python -m twine upload dist/*
```

## 文档结构

发布版本应包含以下文档:

- `README_CN.md` - 中文项目说明
- `INSTALL_CN.md` - 中文安装指南
- `RELEASE_NOTES_CN.md` - 中文发布说明
- `PACKAGING_GUIDE_CN.md` - 中文打包指南(本文档)

## 本地部署

如果只需要本地部署,可以将打包好的分发包复制到目标机器并安装:

```bash
# 在目标机器上
pip install supervisor-4.3.0.tar.gz
```

## 打包脚本说明

`build_package.sh` 脚本执行以下操作:

1. 清理之前的构建文件
2. 构建源码分发包和 wheel 包
3. 显示生成的包文件列表
4. 提供上传到 PyPI 的命令提示

## 故障排除

如果在打包过程中遇到问题:

1. 检查 Python 版本是否兼容
2. 确认所有依赖已正确安装
3. 检查文件权限和路径是否正确
40 changes: 40 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Supervisor - 进程控制系统

Supervisor 是一个客户端/服务器系统,允许用户在类 UNIX 操作系统上控制多个进程。

## 特性

- **进程管理**:启动、停止、重启进程
- **自动重启**:进程崩溃时自动重启
- **状态监控**:监控进程状态
- **日志管理**:收集和管理进程输出
- **Web界面**:通过Web界面管理进程
- **组操作**:对进程组进行批量操作

## 增强功能

本版本在原始 Supervisor 基础上增加了以下功能:

1. **组操作按钮**:在Web界面中直接操作进程组
- 重启组:一键重启整个组中的所有进程
- 停止组:一键停止整个组中的所有进程

2. **日志查看增强**:美化了日志查看页面
- 语法高亮
- 行号显示
- 自动滚动
- 搜索功能
- 复制功能

## 安装

详细安装说明请参考 [INSTALL_CN.md](INSTALL_CN.md)。

## 许可证

Supervisor 是根据类 BSD 许可证发布的,详见 [LICENSE.txt](LICENSES.txt)。

## 更多信息

- 官方文档:http://supervisord.org/
- 源代码:https://github.com/Supervisor/supervisor
48 changes: 48 additions & 0 deletions RELEASE_NOTES_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Supervisor 4.3.0 发布说明

## 版本亮点

Supervisor 4.3.0 版本是一个重要的增强版本,在标准 Supervisor 功能基础上增加了更多实用功能。

### 主要新特性

1. **进程组操作按钮**
- 在 Web 界面中直接添加了"重启组"和"停止组"按钮
- 可以一键操作整个进程组,提高管理效率
- 优化了按钮布局和交互体验

2. **增强的日志查看界面**
- 全新设计的日志查看页面
- 添加了语法高亮显示
- 支持行号显示
- 提供自动滚动功能
- 增加日志搜索功能
- 一键复制日志内容

3. **用户界面改进**
- 优化了组和进程的显示层次结构
- 改进了按钮布局和样式
- 增强了整体视觉体验

### 错误修复

- 修复了组操作功能中的异步回调处理问题
- 解决了多个界面显示和布局问题
- 修复了 RPC 接口调用相关的错误

## 安装指南

详细安装说明请参阅 [INSTALL_CN.md](INSTALL_CN.md)。

## 升级说明

如果您正在从之前的版本升级,只需按照安装指南重新安装即可。配置文件格式保持兼容。

## 兼容性

- 支持 Python 2.7 及 Python 3.4+
- 兼容所有主流 UNIX/Linux 系统及 macOS

## 致谢

特别感谢所有为此版本贡献代码、测试和反馈的开发者。
Loading
Loading