celestialflow 3.0.1__tar.gz → 3.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {celestialflow-3.0.1/src/celestialflow.egg-info → celestialflow-3.0.2}/PKG-INFO +33 -33
- {celestialflow-3.0.1 → celestialflow-3.0.2}/README.md +31 -31
- {celestialflow-3.0.1 → celestialflow-3.0.2}/pyproject.toml +9 -3
- {celestialflow-3.0.1 → celestialflow-3.0.2}/src/celestialflow/__init__.py +0 -6
- celestialflow-3.0.2/src/celestialflow/static/css/base.css +293 -0
- celestialflow-3.0.2/src/celestialflow/static/css/dashboard.css +452 -0
- celestialflow-3.0.2/src/celestialflow/static/css/errors.css +275 -0
- celestialflow-3.0.2/src/celestialflow/static/css/inject.css +648 -0
- celestialflow-3.0.2/src/celestialflow/static/favicon.ico +0 -0
- celestialflow-3.0.2/src/celestialflow/static/js/main.js +128 -0
- celestialflow-3.0.2/src/celestialflow/static/js/task_errors.js +146 -0
- celestialflow-3.0.2/src/celestialflow/static/js/task_injection.js +297 -0
- celestialflow-3.0.2/src/celestialflow/static/js/task_statuses.js +255 -0
- celestialflow-3.0.2/src/celestialflow/static/js/task_structure.js +214 -0
- celestialflow-3.0.2/src/celestialflow/static/js/task_topology.js +11 -0
- celestialflow-3.0.2/src/celestialflow/static/js/utils.js +64 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/src/celestialflow/task_web.py +13 -0
- celestialflow-3.0.2/src/celestialflow/templates/index.html +364 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2/src/celestialflow.egg-info}/PKG-INFO +33 -33
- {celestialflow-3.0.1 → celestialflow-3.0.2}/src/celestialflow.egg-info/SOURCES.txt +14 -0
- celestialflow-3.0.2/src/celestialflow.egg-info/entry_points.txt +2 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/LICENSE +0 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/setup.cfg +0 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/src/celestialflow/task_graph.py +0 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/src/celestialflow/task_logging.py +0 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/src/celestialflow/task_manage.py +0 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/src/celestialflow/task_nodes.py +0 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/src/celestialflow/task_progress.py +0 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/src/celestialflow/task_report.py +0 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/src/celestialflow/task_structure.py +0 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/src/celestialflow/task_tools.py +0 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/src/celestialflow/task_types.py +0 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/src/celestialflow.egg-info/dependency_links.txt +0 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/src/celestialflow.egg-info/requires.txt +0 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/src/celestialflow.egg-info/top_level.txt +0 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/tests/test_graph.py +0 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/tests/test_manage.py +0 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/tests/test_nodes.py +0 -0
- {celestialflow-3.0.1 → celestialflow-3.0.2}/tests/test_structure.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: celestialflow
|
|
3
|
-
Version: 3.0.
|
|
4
|
-
Summary: A flexible
|
|
3
|
+
Version: 3.0.2
|
|
4
|
+
Summary: A flexible GRAPH-based task orchestration framework.
|
|
5
5
|
Author-email: Mr-xiaotian <mingxiaomingtian@gmail.com>
|
|
6
6
|
License: MIT License
|
|
7
7
|
|
|
@@ -68,36 +68,32 @@ TaskGraph 能构建完整的 **有向图结构(Directed Graph)**,不仅支
|
|
|
68
68
|
|
|
69
69
|
本节将引导你快速安装并运行 **TaskGraph**,通过示例体验其任务图调度机制。
|
|
70
70
|
|
|
71
|
+
### 🚀 安装 CelestialFlow
|
|
71
72
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
首先从 GitHub 拉取代码仓库,并创建隔离环境以防依赖冲突。
|
|
73
|
+
CelestialFlow 已发布至 [PyPI](https://pypi.org/project/celestialflow/),
|
|
74
|
+
可以直接通过 `pip` 安装,无需克隆源码。
|
|
75
75
|
|
|
76
76
|
```bash
|
|
77
|
-
#
|
|
78
|
-
|
|
79
|
-
cd TaskGraph
|
|
80
|
-
|
|
81
|
-
# (可选) 用mamba创建虚拟环境
|
|
82
|
-
mamba create -n celestialflow_env python=3.10
|
|
83
|
-
mamba activate celestialflow_env
|
|
77
|
+
# 直接安装最新版
|
|
78
|
+
pip install celestialflow
|
|
84
79
|
```
|
|
85
80
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
👉 [miniforge/Releases](https://github.com/conda-forge/miniforge/releases)
|
|
81
|
+
### 🧩 (可选)创建独立虚拟环境
|
|
89
82
|
|
|
90
|
-
|
|
83
|
+
建议在独立环境中使用,以避免与其他项目依赖冲突。
|
|
91
84
|
|
|
92
85
|
```bash
|
|
93
|
-
|
|
86
|
+
# 使用 mamba 创建环境
|
|
87
|
+
mamba create -n celestialflow_env python=3.10
|
|
88
|
+
mamba activate celestialflow_env
|
|
89
|
+
|
|
90
|
+
# 然后安装
|
|
91
|
+
pip install celestialflow
|
|
94
92
|
```
|
|
95
93
|
|
|
96
|
-
|
|
94
|
+
如果你了解python的包管理工具Anaconda,那么mamba就是将其用C++实现的版本,相比原版有明显的速度提升。你可以在这里获取它的最新版:
|
|
97
95
|
|
|
98
|
-
|
|
99
|
-
pip install -e .
|
|
100
|
-
```
|
|
96
|
+
👉 [miniforge/Releases](https://github.com/conda-forge/miniforge/releases)
|
|
101
97
|
|
|
102
98
|
### 启动 Web 可视化(可选)
|
|
103
99
|
|
|
@@ -165,6 +161,7 @@ pip install pytest pytest-asyncio
|
|
|
165
161
|
### 我还想了解更多
|
|
166
162
|
|
|
167
163
|
你可以继续运行更多的测试代码,这里有介绍每个测试文件与里面的测试函数:
|
|
164
|
+
|
|
168
165
|
[Test RREADME.md](tests/README.md)
|
|
169
166
|
|
|
170
167
|
你也可以了解具体的项目文件,以下文档会帮助你:
|
|
@@ -200,18 +197,21 @@ if __name__ == "__main__":
|
|
|
200
197
|
|
|
201
198
|
## 环境要求(Requirements)
|
|
202
199
|
|
|
203
|
-
**CelestialFlow**
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
|
207
|
-
|
|
|
208
|
-
| **
|
|
209
|
-
| **
|
|
210
|
-
| **
|
|
211
|
-
| **
|
|
212
|
-
| **
|
|
213
|
-
| **
|
|
214
|
-
| **
|
|
200
|
+
**CelestialFlow** 基于 Python 3.8+,并依赖以下核心组件。
|
|
201
|
+
请确保你的环境能够正常安装这些依赖(`pip install celestialflow` 会自动安装)。
|
|
202
|
+
|
|
203
|
+
| 依赖包 | 说明 |
|
|
204
|
+
| ---------------- | ---- |
|
|
205
|
+
| **Python ≥ 3.8** | 运行环境,建议使用 3.10 及以上版本 |
|
|
206
|
+
| **tqdm** | 控制台进度条显示,用于任务执行可视化 |
|
|
207
|
+
| **loguru** | 高性能日志系统,支持多进程安全输出 |
|
|
208
|
+
| **fastapi** | Web 服务接口框架(用于任务可视化与远程控制) |
|
|
209
|
+
| **uvicorn** | FastAPI 的高性能 ASGI 服务器 |
|
|
210
|
+
| **requests** | HTTP 客户端库,用于任务状态上报与远程调用 |
|
|
211
|
+
| **httpx** | 异步 HTTP 客户端,支持更高性能的并发请求 |
|
|
212
|
+
| **networkx** | 任务图(TaskGraph)结构与依赖分析 |
|
|
213
|
+
| **redis** | 可选组件,用于分布式任务通信(`TaskRedisTransfer` 模块) |
|
|
214
|
+
| **jinja2** | FastAPI 模板引擎,用于 Web 可视化界面渲染 |
|
|
215
215
|
|
|
216
216
|
## 项目结构(Project Structure)
|
|
217
217
|
|
|
@@ -26,36 +26,32 @@ TaskGraph 能构建完整的 **有向图结构(Directed Graph)**,不仅支
|
|
|
26
26
|
|
|
27
27
|
本节将引导你快速安装并运行 **TaskGraph**,通过示例体验其任务图调度机制。
|
|
28
28
|
|
|
29
|
+
### 🚀 安装 CelestialFlow
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
首先从 GitHub 拉取代码仓库,并创建隔离环境以防依赖冲突。
|
|
31
|
+
CelestialFlow 已发布至 [PyPI](https://pypi.org/project/celestialflow/),
|
|
32
|
+
可以直接通过 `pip` 安装,无需克隆源码。
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
|
-
#
|
|
36
|
-
|
|
37
|
-
cd TaskGraph
|
|
38
|
-
|
|
39
|
-
# (可选) 用mamba创建虚拟环境
|
|
40
|
-
mamba create -n celestialflow_env python=3.10
|
|
41
|
-
mamba activate celestialflow_env
|
|
35
|
+
# 直接安装最新版
|
|
36
|
+
pip install celestialflow
|
|
42
37
|
```
|
|
43
38
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
👉 [miniforge/Releases](https://github.com/conda-forge/miniforge/releases)
|
|
39
|
+
### 🧩 (可选)创建独立虚拟环境
|
|
47
40
|
|
|
48
|
-
|
|
41
|
+
建议在独立环境中使用,以避免与其他项目依赖冲突。
|
|
49
42
|
|
|
50
43
|
```bash
|
|
51
|
-
|
|
44
|
+
# 使用 mamba 创建环境
|
|
45
|
+
mamba create -n celestialflow_env python=3.10
|
|
46
|
+
mamba activate celestialflow_env
|
|
47
|
+
|
|
48
|
+
# 然后安装
|
|
49
|
+
pip install celestialflow
|
|
52
50
|
```
|
|
53
51
|
|
|
54
|
-
|
|
52
|
+
如果你了解python的包管理工具Anaconda,那么mamba就是将其用C++实现的版本,相比原版有明显的速度提升。你可以在这里获取它的最新版:
|
|
55
53
|
|
|
56
|
-
|
|
57
|
-
pip install -e .
|
|
58
|
-
```
|
|
54
|
+
👉 [miniforge/Releases](https://github.com/conda-forge/miniforge/releases)
|
|
59
55
|
|
|
60
56
|
### 启动 Web 可视化(可选)
|
|
61
57
|
|
|
@@ -123,6 +119,7 @@ pip install pytest pytest-asyncio
|
|
|
123
119
|
### 我还想了解更多
|
|
124
120
|
|
|
125
121
|
你可以继续运行更多的测试代码,这里有介绍每个测试文件与里面的测试函数:
|
|
122
|
+
|
|
126
123
|
[Test RREADME.md](tests/README.md)
|
|
127
124
|
|
|
128
125
|
你也可以了解具体的项目文件,以下文档会帮助你:
|
|
@@ -158,18 +155,21 @@ if __name__ == "__main__":
|
|
|
158
155
|
|
|
159
156
|
## 环境要求(Requirements)
|
|
160
157
|
|
|
161
|
-
**CelestialFlow**
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
|
165
|
-
|
|
|
166
|
-
| **
|
|
167
|
-
| **
|
|
168
|
-
| **
|
|
169
|
-
| **
|
|
170
|
-
| **
|
|
171
|
-
| **
|
|
172
|
-
| **
|
|
158
|
+
**CelestialFlow** 基于 Python 3.8+,并依赖以下核心组件。
|
|
159
|
+
请确保你的环境能够正常安装这些依赖(`pip install celestialflow` 会自动安装)。
|
|
160
|
+
|
|
161
|
+
| 依赖包 | 说明 |
|
|
162
|
+
| ---------------- | ---- |
|
|
163
|
+
| **Python ≥ 3.8** | 运行环境,建议使用 3.10 及以上版本 |
|
|
164
|
+
| **tqdm** | 控制台进度条显示,用于任务执行可视化 |
|
|
165
|
+
| **loguru** | 高性能日志系统,支持多进程安全输出 |
|
|
166
|
+
| **fastapi** | Web 服务接口框架(用于任务可视化与远程控制) |
|
|
167
|
+
| **uvicorn** | FastAPI 的高性能 ASGI 服务器 |
|
|
168
|
+
| **requests** | HTTP 客户端库,用于任务状态上报与远程调用 |
|
|
169
|
+
| **httpx** | 异步 HTTP 客户端,支持更高性能的并发请求 |
|
|
170
|
+
| **networkx** | 任务图(TaskGraph)结构与依赖分析 |
|
|
171
|
+
| **redis** | 可选组件,用于分布式任务通信(`TaskRedisTransfer` 模块) |
|
|
172
|
+
| **jinja2** | FastAPI 模板引擎,用于 Web 可视化界面渲染 |
|
|
173
173
|
|
|
174
174
|
## 项目结构(Project Structure)
|
|
175
175
|
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "celestialflow"
|
|
7
|
-
version = "3.0.
|
|
8
|
-
description = "A flexible
|
|
7
|
+
version = "3.0.2"
|
|
8
|
+
description = "A flexible GRAPH-based task orchestration framework."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { file = "LICENSE" }
|
|
11
11
|
authors = [{ name = "Mr-xiaotian", email = "mingxiaomingtian@gmail.com " }]
|
|
@@ -28,5 +28,11 @@ dependencies = [
|
|
|
28
28
|
"Homepage" = "https://github.com/Mr-xiaotian/CelestialFlow"
|
|
29
29
|
"Bug Tracker" = "https://github.com/Mr-xiaotian/CelestialFlow/issues"
|
|
30
30
|
|
|
31
|
+
[project.scripts]
|
|
32
|
+
celestialflow-web = "celestialflow.task_web:main_entry"
|
|
33
|
+
|
|
31
34
|
[tool.setuptools]
|
|
32
|
-
license-files = []
|
|
35
|
+
license-files = []
|
|
36
|
+
|
|
37
|
+
[tool.setuptools.package-data]
|
|
38
|
+
"celestialflow" = ["templates/*.html", "static/**/*"]
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
# 版本 3.01
|
|
3
|
-
# 作者:Mr-xiaotian, GPT-4o, GPT-5
|
|
4
|
-
# 时间:11/5/2025
|
|
5
|
-
# Github: https://github.com/Mr-xiaotian/CelestialFlow
|
|
6
|
-
|
|
7
1
|
from .task_graph import TaskGraph
|
|
8
2
|
from .task_manage import TaskManager
|
|
9
3
|
from .task_nodes import TaskSplitter, TaskRedisTransfer
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
/* ================================
|
|
2
|
+
🌟 变量定义(全局色彩、间距等)
|
|
3
|
+
================================ */
|
|
4
|
+
:root {
|
|
5
|
+
--primary-color: #3b82f6;
|
|
6
|
+
--success-color: #10b981;
|
|
7
|
+
--warning-color: #f59e0b;
|
|
8
|
+
--danger-color: #ef4444;
|
|
9
|
+
--gray-light: #f3f4f6;
|
|
10
|
+
--gray-medium: #9ca3af;
|
|
11
|
+
--gray-dark: #4b5563;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* ================================
|
|
15
|
+
🌟 全局重置 & 通用字体
|
|
16
|
+
================================ */
|
|
17
|
+
* {
|
|
18
|
+
margin: 0;
|
|
19
|
+
padding: 0;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
body {
|
|
25
|
+
background-color: #f9fafb;
|
|
26
|
+
line-height: 1.5;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.container {
|
|
30
|
+
max-width: 1200px;
|
|
31
|
+
margin: 0 auto;
|
|
32
|
+
padding: 0 1rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* ================================
|
|
36
|
+
🌟 头部样式
|
|
37
|
+
================================ */
|
|
38
|
+
header {
|
|
39
|
+
background-color: var(--primary-color);
|
|
40
|
+
color: white;
|
|
41
|
+
padding: 1rem 0;
|
|
42
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.header-content {
|
|
46
|
+
display: flex;
|
|
47
|
+
justify-content: space-between;
|
|
48
|
+
align-items: center;
|
|
49
|
+
flex-wrap: wrap; /* 小屏自动换行 */
|
|
50
|
+
gap: 0.5rem; /* 可选:元素间距 */
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
/* ================================
|
|
55
|
+
🌟 标题 & 文本
|
|
56
|
+
================================ */
|
|
57
|
+
h1 {
|
|
58
|
+
font-size: 1.5rem;
|
|
59
|
+
font-weight: 700;
|
|
60
|
+
text-align: center;
|
|
61
|
+
color: #fff;
|
|
62
|
+
margin-bottom: 30px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* ================================
|
|
66
|
+
🌟 标题 & 文本
|
|
67
|
+
================================ */
|
|
68
|
+
.control-panel {
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
gap: 1rem;
|
|
72
|
+
}
|
|
73
|
+
.refresh-container {
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
gap: 0.5rem;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* ================================
|
|
80
|
+
🌟 按钮 & 选择器
|
|
81
|
+
================================ */
|
|
82
|
+
button,
|
|
83
|
+
select {
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
padding: 0.25rem 0.75rem;
|
|
86
|
+
border-radius: 0.25rem;
|
|
87
|
+
border: 1px solid var(--gray-medium);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
button {
|
|
91
|
+
color: white;
|
|
92
|
+
font-size: 0.875rem;
|
|
93
|
+
transition: background-color 0.2s;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
select {
|
|
97
|
+
background-color: white;
|
|
98
|
+
height: 30px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* 按钮样式 */
|
|
102
|
+
.btn-stop { background-color: var(--danger-color); color: white; height: 30px; }
|
|
103
|
+
.btn-stop:hover { background-color: #dc2626; }
|
|
104
|
+
|
|
105
|
+
/* 主题切换按钮 */
|
|
106
|
+
#theme-toggle {
|
|
107
|
+
position: absolute;
|
|
108
|
+
right: 20px;
|
|
109
|
+
background-color: #374151;
|
|
110
|
+
color: white;
|
|
111
|
+
border: none;
|
|
112
|
+
border-radius: 20px;
|
|
113
|
+
padding: 5px 15px;
|
|
114
|
+
cursor: pointer;
|
|
115
|
+
transition: all 0.3s ease;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
#theme-toggle:hover {
|
|
119
|
+
background-color: #3b6fd9;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* ================================
|
|
123
|
+
🌟 Tabs & 选项卡样式
|
|
124
|
+
================================ */
|
|
125
|
+
.tabs {
|
|
126
|
+
display: flex;
|
|
127
|
+
border-bottom: 1px solid #e5e7eb;
|
|
128
|
+
margin: 1rem 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.tab-btn {
|
|
132
|
+
background: transparent;
|
|
133
|
+
border: none;
|
|
134
|
+
color: var(--gray-dark);
|
|
135
|
+
padding: 0.5rem 1rem;
|
|
136
|
+
border-bottom: 2px solid transparent;
|
|
137
|
+
margin-bottom: -1px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.tab-btn.active {
|
|
141
|
+
color: var(--primary-color);
|
|
142
|
+
border-bottom-color: var(--primary-color);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.tab-btn:hover {
|
|
146
|
+
background-color: #f9fafb;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* ================================
|
|
150
|
+
🌟 卡片布局样式
|
|
151
|
+
================================ */
|
|
152
|
+
.card {
|
|
153
|
+
background-color: white;
|
|
154
|
+
border-radius: 1rem;
|
|
155
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
156
|
+
padding: 24px;
|
|
157
|
+
transition: transform 0.2s ease;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.card:hover {
|
|
161
|
+
transform: translateY(-2px);
|
|
162
|
+
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.card-header {
|
|
166
|
+
display: flex;
|
|
167
|
+
justify-content: space-between;
|
|
168
|
+
align-items: center;
|
|
169
|
+
margin-bottom: 0.75rem;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.card-title {
|
|
173
|
+
font-size: 1.25rem;
|
|
174
|
+
font-weight: 600;
|
|
175
|
+
padding-bottom: 1rem;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* ================================
|
|
179
|
+
🌟 状态徽章
|
|
180
|
+
================================ */
|
|
181
|
+
.badge {
|
|
182
|
+
padding: 0.25rem 0.5rem;
|
|
183
|
+
border-radius: 0.25rem;
|
|
184
|
+
font-size: 0.75rem;
|
|
185
|
+
color: white;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.badge-inactive { background-color: var(--gray-medium); }
|
|
189
|
+
.badge-running { background-color: var(--success-color); }
|
|
190
|
+
.badge-completed { background-color: var(--gray-medium); }
|
|
191
|
+
|
|
192
|
+
/* ================================
|
|
193
|
+
🌟 文字颜色辅助类
|
|
194
|
+
================================ */
|
|
195
|
+
.text-red { color: var(--danger-color); }
|
|
196
|
+
.text-blue { color: var(--primary-color); }
|
|
197
|
+
.text-green { color: var(--success-color); }
|
|
198
|
+
.text-yellow { color: var(--warning-color); }
|
|
199
|
+
.text-sm { font-size: 0.875rem; }
|
|
200
|
+
.text-gray { color: var(--gray-medium); }
|
|
201
|
+
|
|
202
|
+
/* ================================
|
|
203
|
+
🌟 响应式调整(移动设备)
|
|
204
|
+
================================ */
|
|
205
|
+
@media (max-width: 2048px) {
|
|
206
|
+
h1 {
|
|
207
|
+
width: 100%;
|
|
208
|
+
text-align: center; /* 或 center */
|
|
209
|
+
}
|
|
210
|
+
#theme-toggle {
|
|
211
|
+
position: static; /* 取消绝对定位 */
|
|
212
|
+
order: 3; /* 小屏下放到最后 */
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* ================================
|
|
217
|
+
🌟 暗黑模式
|
|
218
|
+
================================ */
|
|
219
|
+
.dark-theme {
|
|
220
|
+
background-color: #1a1a1a;
|
|
221
|
+
color: #e0e0e0;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.dark-theme body,
|
|
225
|
+
.dark-theme .container {
|
|
226
|
+
background-color: #1a1a1a;
|
|
227
|
+
color: #e0e0e0;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.dark-theme header {
|
|
231
|
+
background-color: #1a1a1a; /* 深蓝灰 */
|
|
232
|
+
color: #f3f4f6;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.dark-theme h1 {
|
|
236
|
+
color: #f3f4f6;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.dark-theme .control-panel select,
|
|
240
|
+
.dark-theme .control-panel button {
|
|
241
|
+
background-color: #374151;
|
|
242
|
+
color: #f3f4f6;
|
|
243
|
+
border: 1px solid #4b5563;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.dark-theme .btn-stop:hover { background-color: #4b5563; }
|
|
247
|
+
|
|
248
|
+
.dark-theme #theme-toggle {
|
|
249
|
+
background-color: #3b6fd9;
|
|
250
|
+
color: #f3f4f6;
|
|
251
|
+
border: 1px solid #4b5563;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.dark-theme #theme-toggle:hover {
|
|
255
|
+
background-color: #4b5563;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.dark-theme .tabs {
|
|
259
|
+
border-bottom: 2px solid #374151;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.dark-theme .tab-btn {
|
|
263
|
+
color: #cbd5e1;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.dark-theme .tab-btn.active {
|
|
267
|
+
color: #3b82f6;
|
|
268
|
+
border-bottom: none;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.dark-theme .tab-btn:hover {
|
|
272
|
+
background-color: #2a2a2a;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.dark-theme .card {
|
|
276
|
+
background-color: #2a2a2a;
|
|
277
|
+
color: #e0e0e0;
|
|
278
|
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.dark-theme .card-title {
|
|
282
|
+
color: #f3f4f6;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.dark-theme .badge-running { background-color: #16a34a; }
|
|
286
|
+
.dark-theme .badge-inactive { background-color: #6b7280; }
|
|
287
|
+
|
|
288
|
+
.dark-theme .text-gray { color: #9ca3af; }
|
|
289
|
+
|
|
290
|
+
/* ================================
|
|
291
|
+
🌟 可选:全局辅助样式
|
|
292
|
+
================================ */
|
|
293
|
+
/* 用于辅助布局的工具类可以在此扩展,比如 flex、grid、gap 等 */
|