Compare commits

..

205 Commits

Author SHA1 Message Date
李佳航
6f42d41344 Merge pull request #65 from dromara/dev
merge
2024-11-01 10:41:52 +08:00
lijiahang
8db677684d 修改包名. 2024-10-29 09:59:50 +08:00
李佳航
988528ccca Merge pull request #64 from dromara/dev
Dev
2024-10-24 11:13:17 +08:00
lijiahang
029a46c07d 🔖 升级版本. 2024-10-24 09:36:05 +08:00
lijiahang
8ace3ddd1f 🐛 代码生成器无法运行. 2024-10-18 18:16:41 +08:00
lijiahang
2c705f0b67 🐛 代码生成器无法运行. 2024-10-18 14:06:28 +08:00
lijiahang
3ec43bd8a5 拆分模块. 2024-10-17 15:25:45 +08:00
lijiahang
b33abd3196 拆分模块. 2024-10-17 10:20:04 +08:00
lijiahang
d82f5b4bfb 拆分模块. 2024-10-16 15:37:12 +08:00
lijiahang
3e41e17367 优化模块值. 2024-10-15 17:41:39 +08:00
lijiahang
6e3abab232 📝 修改文档. 2024-10-15 15:05:11 +08:00
lijiahang
6306baa51a 修改表名. 2024-10-15 12:36:11 +08:00
lijiahang
7ceb7e162a 📝 修改文档. 2024-10-15 11:08:21 +08:00
lijiahang
2243d3cf5b 📝 添加 license 文件头. 2024-10-11 14:58:06 +08:00
lijiahang
e6937d67c1 📝 修改许可信息. 2024-10-11 12:23:05 +08:00
lijiahangmax
6e977dabf6 优化文件下载逻辑. 2024-10-10 23:18:53 +08:00
lijiahang
c229029c1d 系统动态设置. 2024-10-10 18:32:40 +08:00
lijiahang
76aa64fe75 📝 修改初始化sql. 2024-09-30 10:25:14 +08:00
lijiahang
3b1d6ab8a4 优化按钮组件逻辑. 2024-09-29 10:20:45 +08:00
李佳航
7015468e04 Merge pull request #60 from dromara/dev
Dev
2024-09-27 10:52:27 +08:00
lijiahang
ef57040e1d 📝 修改文档. 2024-09-27 10:41:06 +08:00
lijiahang
2a6537c604 🔖 升级版本. 2024-09-27 10:21:17 +08:00
lijiahang
541a9790ad 优化批量上传逻辑. 2024-09-26 17:38:39 +08:00
lijiahang
011e8ad089 📝 修改文档. 2024-09-14 17:18:51 +08:00
李佳航
3918d36c24 Merge pull request #59 from dromara/dev
Dev
2024-09-14 16:46:32 +08:00
lijiahang
37f452c7c3 Merge remote-tracking branch 'origin/dev' into dev
# Conflicts:
#	README.md
2024-09-14 16:44:31 +08:00
lijiahang
fc885bc0ad 📝 修改文档. 2024-09-14 16:43:53 +08:00
李佳航
44c226092d Merge pull request #58 from dromara/dev
Dev
2024-09-11 21:18:41 +08:00
lijiahangmax
14cf8c2492 Merge remote-tracking branch 'origin/dev' into dev 2024-09-11 21:16:08 +08:00
lijiahangmax
d6f5898e61 📝 修改 logo. 2024-09-11 21:14:32 +08:00
lijiahang
0ab8e405cc 📝 修改文档. 2024-09-11 10:18:35 +08:00
lijiahang
4e4231d5a5 修改清理限制. 2024-09-03 10:53:39 +08:00
李佳航
2df3f2fa1a Merge pull request #56 from dromara/dev
🔖 升级版本.
2024-09-02 15:28:10 +08:00
lijiahang
d6048f78f0 🔖 升级版本. 2024-09-02 14:57:47 +08:00
李佳航
f73fa14bfd Merge pull request #55 from dromara/dev
Dev
2024-09-02 13:11:36 +08:00
lijiahang
fd88c725d3 :replace: 修改 demo 地址. 2024-09-02 13:06:17 +08:00
lijiahang
3a16f9d9ab 优化查询逻辑. 2024-09-02 12:37:11 +08:00
lijiahang
de9b89d805 🔖 升级版本. 2024-09-02 11:51:30 +08:00
lijiahangmax
a05c387ba1 修改配置. 2024-08-29 23:34:28 +08:00
lijiahangmax
3cb6e5a2d4 修改配置. 2024-08-29 23:33:46 +08:00
lijiahang
104a9a0aa3 🔨 数据清理时添加条数限制. 2024-08-29 18:26:26 +08:00
lijiahangmax
d7b747eac4 优化主机删除逻辑. 2024-08-29 00:33:13 +08:00
lijiahangmax
d2949c11f3 Merge remote-tracking branch 'origin/dev' into dev 2024-08-29 00:23:33 +08:00
lijiahangmax
cd05f71173 🐛 修复开始 webgl 终端显示错误. 2024-08-29 00:23:11 +08:00
lijiahang
e0dca73369 📝 修改文档. 2024-08-28 17:14:18 +08:00
lijiahang
b8599a6693 🐛 修复加载缓存时报错. 2024-08-28 10:46:06 +08:00
lijiahang
a0adb415fa 🔨 数据清理时添加条数限制. 2024-08-26 17:10:40 +08:00
lijiahang
6c60756e54 禁用 demo api. 2024-08-26 13:57:18 +08:00
lijiahangmax
ee9f51ce7d 🐛 修复 quartz 配置不生效. 2024-08-25 00:50:16 +08:00
lijiahangmax
924b46b41a 优化异常信息获取逻辑. 2024-08-24 19:59:45 +08:00
lijiahangmax
1fca5a1912 优化数据分组逻辑. 2024-08-23 01:44:05 +08:00
李佳航
120eb1ee69 Merge pull request #54 from dromara/dev
Dev
2024-08-22 12:27:58 +08:00
lijiahang
252c538571 🔖 升级版本. 2024-08-22 11:45:24 +08:00
lijiahang
1eec373b7e demo 禁用定时任务. 2024-08-21 13:23:31 +08:00
lijiahang
aa9b96a9c1 修改表格显示字段. 2024-08-21 12:56:07 +08:00
lijiahang
059fb30aa4 优化权限逻辑. 2024-08-20 10:20:35 +08:00
lijiahang
2afaf7ad34 Merge remote-tracking branch 'origin/dev' into dev 2024-08-19 09:53:15 +08:00
lijiahang
076a0956c5 修改心跳检测时间. 2024-08-19 09:49:41 +08:00
lijiahangmax
4a91ec47bf 添加主题. 2024-08-13 20:56:00 +08:00
lijiahangmax
1066b43b3d 全屏模式. 2024-08-12 00:07:54 +08:00
lijiahangmax
3f78125c43 Merge remote-tracking branch 'origin/dev' into dev 2024-08-11 23:07:14 +08:00
lijiahangmax
144a44673b 🐛 修复更新菜单后查询条件错误. 2024-08-11 23:06:59 +08:00
李佳航
777f7b3758 Merge pull request #52 from dromara/dev
Dev
2024-08-08 10:52:09 +08:00
lijiahang
947fa0fea3 🐳 添加 push 脚本. 2024-08-08 10:17:31 +08:00
lijiahang
7109e89fb4 🔖 升级版本. 2024-08-08 10:14:39 +08:00
lijiahang
70e7b1d544 修改终端标签颜色显示. 2024-08-07 10:18:39 +08:00
lijiahangmax
613f86155c 💄 修改终端样式. 2024-08-06 00:01:27 +08:00
lijiahang
8d0b58e48f ⬆️ 升级 orion kit 版本. 2024-08-05 13:49:52 +08:00
lijiahang
8cea9dc977 优化终端代码. 2024-08-05 09:11:54 +08:00
lijiahangmax
471acfdf00 优化自动聚焦逻辑. 2024-08-04 17:01:44 +08:00
lijiahangmax
8ed42131d0 优化命令片段处理逻辑. 2024-08-02 01:52:29 +08:00
lijiahangmax
18c605354a 🔨 修改终端逻辑. 2024-07-31 00:42:02 +08:00
李佳航
8c04411458 Merge pull request #48 from MemoryShadow/dev
perf: Use the.env file instead to modify docker-compose.yml
2024-07-30 17:53:31 +08:00
lijiahang
9a8d1d05cd 💄 修改终端样式. 2024-07-30 14:40:15 +08:00
MemoryShadow
1cbaf9c424 docs: Clarify behavior semantics and accelerate deployment efficiency 2024-07-29 07:02:32 +00:00
MemoryShadow
537c2fc108 perf: Use the.env file instead to modify docker-compose.yml 2024-07-29 07:02:21 +00:00
李佳航
122b568cf5 Merge pull request #46 from dromara/dev
Dev
2024-07-29 11:39:00 +08:00
lijiahang
8b97c02d15 🐳 修改 docker 配置. 2024-07-29 11:15:44 +08:00
lijiahang
dcfb016ce5 🔖 升级版本. 2024-07-29 10:33:59 +08:00
lijiahang
c842de9e23 修改 hook 位置. 2024-07-29 10:25:11 +08:00
李佳航
1b2753a2b7 Merge pull request #44 from dromara/dev
Dev
2024-07-26 11:11:47 +08:00
lijiahang
29b44b8b77 🚨 修复 ts 构建报错. 2024-07-26 10:56:36 +08:00
lijiahang
7290b1364c 🔖 升级版本. 2024-07-26 10:25:38 +08:00
lijiahang
3851ead8bb 💄 修改滚动条样式. 2024-07-26 10:18:39 +08:00
lijiahang
305312cc26 🐛 修复文件上传列表显示错误. 2024-07-25 13:46:48 +08:00
李佳航
b4217555d2 Merge pull request #43 from dromara/dev
Dev
2024-07-25 11:16:59 +08:00
lijiahang
87b8e405f5 🔖 升级版本. 2024-07-25 10:27:49 +08:00
lijiahang
3513196a78 修改类型定义. 2024-07-24 15:29:15 +08:00
lijiahang
0240a12321 ⬆️ 修改升级sql. 2024-07-24 15:04:29 +08:00
lijiahang
3a8eac4d4a 重构终端功能. 2024-07-23 10:47:59 +08:00
lijiahang
4bd2de4ce2 🔨 重构主机模块. 2024-07-22 19:36:02 +08:00
lijiahang
b7608fccb3 🔨 修改主机逻辑. 2024-07-22 18:05:00 +08:00
lijiahang
bb925d354d 📝 修改 md 地址. 2024-07-22 10:37:11 +08:00
lijiahang
3a476d41d2 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	README.md
2024-07-22 10:31:45 +08:00
lijiahang
1927b10bcc 📝 修改 md 地址. 2024-07-22 10:31:05 +08:00
lijiahang
0664eff151 🐛 windows 移动文件失败. 2024-07-22 10:27:21 +08:00
lijiahang
a71456b209 去除注解. 2024-07-18 15:39:31 +08:00
lijiahang
48d308b1a8 🐛 批量执行历史显示错误. 2024-07-17 13:38:51 +08:00
lijiahang
f75d097d8a 删除 http 文件. 2024-07-17 13:35:04 +08:00
lijiahang
0d46d81c4e 优化文件上传逻辑. 2024-07-15 10:15:20 +08:00
lijiahangmax
c20c83245f 🐛 修复 windows 文件备份失败. 2024-07-14 21:24:53 +08:00
lijiahangmax
849e010bc3 Merge remote-tracking branch 'origin/dev' into dev 2024-07-12 00:02:57 +08:00
lijiahangmax
95c299eea4 💄 修改主机编辑样式. 2024-07-12 00:02:45 +08:00
李佳航
ad3edd4ccd Merge pull request #41 from dromara/dev
Dev
2024-07-11 11:08:52 +08:00
lijiahang
81b7b3505e 🚀 修改启动命令. 2024-07-11 10:56:49 +08:00
lijiahang
1522a6f3ad 🔖 升级版本. 2024-07-11 10:28:44 +08:00
lijiahang
04bae45955 修改执行参数. 2024-07-10 11:46:07 +08:00
lijiahang
873e910eb1 定时任务添加参数. 2024-07-10 10:21:16 +08:00
lijiahang
a7f86bf62a 💄 修改表格样式. 2024-07-09 10:34:39 +08:00
lijiahang
7ba278d210 📝 添加 NOTICE 文件. 2024-07-08 14:45:12 +08:00
lijiahang
e9ac9b9f13 修改字典值长度. 2024-07-08 14:44:33 +08:00
lijiahangmax
d34843f90c 主机终端主题从字典中获取. 2024-07-04 21:53:21 +08:00
lijiahang
374d0bdd9c Merge remote-tracking branch 'origin/dev' into dev 2024-07-04 10:29:58 +08:00
lijiahang
5d3dc83bab 🐛 修复操作日志分页无效. 2024-07-04 10:29:39 +08:00
lijiahangmax
05d0f75cdc Merge remote-tracking branch 'origin/dev' into dev 2024-06-30 01:14:58 +08:00
lijiahangmax
711a4a6bab 🐛 修复终端大小适配失效. 2024-06-30 01:14:44 +08:00
李佳航
08895ba170 Merge pull request #37 from LinuxSuRen/fix/e2e
🐛 e2e 配置失效.
2024-06-27 15:27:11 +08:00
rick
c2c8b108ac fix: the e2e testing failure due to auth error 2024-06-27 07:23:24 +00:00
李佳航
318e9f30b8 Merge pull request #36 from dromara/dev
🚀 修改 e2e 配置.
2024-06-27 14:46:36 +08:00
lijiahang
39a1001510 🚀 修改 e2e 配置. 2024-06-27 14:43:59 +08:00
李佳航
5e7b7ebfa7 Merge pull request #35 from dromara/dev
Dev
2024-06-27 13:46:39 +08:00
lijiahang
8d85cdf173 🚀 修改 e2e 配置. 2024-06-27 13:44:39 +08:00
lijiahang
79d95d1997 📝 修改 sql. 2024-06-27 13:31:10 +08:00
李佳航
1eb07d0b24 Merge pull request #34 from dromara/dev
Dev
2024-06-27 13:06:49 +08:00
lijiahang
601564b573 🔖 升级版本. 2024-06-27 13:03:25 +08:00
lijiahang
41384fab17 🐛 字典值排序无效. 2024-06-26 10:23:32 +08:00
lijiahang
f0a122d862 自动清理配置. 2024-06-25 10:42:32 +08:00
lijiahang
b08d75be62 🔨 更新 spring 配置描述文件. 2024-06-25 10:16:15 +08:00
lijiahangmax
02f5bef6b4 📝 修改命名. 2024-06-24 22:49:17 +08:00
lijiahang
ef10c8b8b6 修改前端包结构. 2024-06-24 09:57:33 +08:00
lijiahang
6c4e9cd5c6 🚀 修改 e2e 配置. 2024-06-24 09:54:57 +08:00
lijiahang
8dec40553d 优化 terminal 逻辑. 2024-06-21 10:15:33 +08:00
lijiahang
9ae5a6c627 🐛 修复机器码获取失败. 2024-06-20 11:55:00 +08:00
lijiahang
2ec1678f01 🔨 修改 ip 获取逻辑. 2024-06-20 11:53:39 +08:00
李佳航
f9e436e885 Merge pull request #30 from LinuxSuRen/e2e
🚀 add e2e testing base on docker compose.
2024-06-20 11:28:46 +08:00
rick
2a49e7670d fix the health check command 2024-06-20 02:56:16 +00:00
Rick
95d8988f11 Update e2e.yaml 2024-06-20 10:25:23 +08:00
Rick
e04a972df5 Update Dockerfile 2024-06-20 10:24:58 +08:00
rick
1ca9311625 fix the password in e2e 2024-06-20 01:52:10 +00:00
rick
630a1fd3cd test: add e2e testing base on docker compose 2024-06-20 01:29:43 +00:00
李佳航
0f6d84dab2 Merge pull request #28 from dromara/dev
Dev
2024-06-19 12:11:39 +08:00
lijiahang
f64eb395a8 🐳 修改镜像权限. 2024-06-19 11:53:06 +08:00
lijiahang
2e69c67de0 🐳 修改镜像权限. 2024-06-19 11:29:09 +08:00
lijiahang
7747b4e52e 🔖 升级版本. 2024-06-19 11:07:03 +08:00
lijiahang
830622aafb 💄 修改样式. 2024-06-19 10:48:00 +08:00
lijiahang
2919950c5b ⬆️ 升级 arco 版本. 2024-06-18 11:53:58 +08:00
lijiahangmax
d56cfbba82 添加系统设置页面. 2024-06-18 00:35:45 +08:00
lijiahang
cfe1924f11 获取应用信息. 2024-06-17 19:12:58 +08:00
lijiahang
dfd2ec45f4 🔨 修改 spring 应用名称. 2024-06-17 10:13:23 +08:00
李佳航
19c7e31f53 Merge pull request #24 from dromara/dev
Dev
2024-06-12 16:02:47 +08:00
lijiahang
f618aef988 🔖 升级版本. 2024-06-12 15:14:24 +08:00
lijiahang
af97f752f5 📝 修改仓库地址. 2024-06-12 15:13:07 +08:00
lijiahangmax
bfb80afee2 优化标准数据模型. 2024-06-12 00:21:25 +08:00
李佳航
72695af0f0 Merge pull request #23 from lijiahangmax/dev
🐛 登录后提示系统异常.
2024-06-11 16:30:55 +08:00
lijiahang
3a5b84eec4 🐛 登录后提示系统异常. 2024-06-11 16:07:38 +08:00
李佳航
387ed53328 Merge pull request #22 from lijiahangmax/dev
Dev
2024-06-11 13:20:15 +08:00
lijiahang
c9cbc5fd55 🔖 升级版本. 2024-06-11 12:50:42 +08:00
lijiahang
ae03460a33 优化会话关闭处理逻辑. 2024-06-11 12:31:16 +08:00
lijiahang
4b060a864a 登录历史参数化. 2024-06-11 12:28:24 +08:00
李佳航
07e8e63ee6 Merge pull request #21 from lijiahangmax/main
merge
2024-06-11 11:28:39 +08:00
lijiahang
ab1d4ed97f 🔨 规范化配置. 2024-06-11 11:12:44 +08:00
lijiahang
2bd7dfd5b8 🔨 规范化注释. 2024-06-07 16:05:26 +08:00
lijiahang
c39049e5f5 🔨 规范化包结构. 2024-06-07 15:41:52 +08:00
李佳航
5113aa63bd Merge pull request #20 from lijiahangmax/dev
Dev
2024-06-06 13:00:36 +08:00
lijiahang
518fd8c839 🔖 升级版本. 2024-06-06 12:02:35 +08:00
lijiahang
a046faaa07 🔨 清理后提示. 2024-06-05 10:27:06 +08:00
lijiahangmax
dcf25392ff ⬆️ 升级 stylelint 版本. 2024-06-04 21:49:51 +08:00
lijiahang
7f24948efa 修改下载文件逻辑. 2024-06-04 20:01:05 +08:00
lijiahang
59d9739f36 优化文件下载方式. 2024-06-04 18:34:19 +08:00
lijiahang
26a6d08d96 🔨 修改 redisson 配置. 2024-06-04 11:33:09 +08:00
lijiahang
cd59c51344 升级依赖版本. 2024-06-04 10:47:32 +08:00
李佳航
8dec98406d Merge pull request #19 from lijiahangmax/dev
Dev
2024-06-03 13:33:14 +08:00
lijiahang
9386bfc5c1 📝 升级文档. 2024-06-03 13:12:50 +08:00
lijiahang
370272ca43 🔖 升级版本. 2024-06-03 11:53:53 +08:00
lijiahang
5c6758c8e7 批量删除前端. 2024-06-03 10:49:05 +08:00
lijiahang
11606e25bb 批量删除后端服务. 2024-06-03 10:19:48 +08:00
lijiahang
285f0532d3 🎨 修改代码格式. 2024-05-31 16:32:45 +08:00
lijiahang
7bfa8a73be 💄 修改样式. 2024-05-31 13:36:49 +08:00
李佳航
d1c6e0cb1c Merge pull request #18 from lijiahangmax/dev
Dev
2024-05-29 13:15:30 +08:00
lijiahang
fc34b24029 📝 修改 icon. 2024-05-29 13:09:29 +08:00
lijiahang
7e2269a040 🚀 修改端口. 2024-05-29 11:57:14 +08:00
lijiahangmax
55d4d9f7e5 🐛 修复构建后抽屉 UI 显示错误. 2024-05-29 00:57:21 +08:00
lijiahangmax
06a45c9cf2 🐛 修复计划命令执行报错. 2024-05-29 00:41:57 +08:00
lijiahangmax
16dd34ef58 📝 修改文档. 2024-05-29 00:30:04 +08:00
lijiahang
aed2436ec5 🔖 升级版本. 2024-05-28 17:07:41 +08:00
lijiahang
df0ec5b3f7 Merge remote-tracking branch 'origin/dev' into dev 2024-05-28 13:13:38 +08:00
lijiahang
9c2b37ec29 🐳 设置时区. 2024-05-28 13:13:17 +08:00
fumanjiang
47fdcad370 💄 修改 logo. 2024-05-27 17:59:37 +08:00
liushaoshuaii
76295ba1e3 📝 修改文档. 2024-05-27 12:33:11 +08:00
lixy-join
4c1f0ca2c0 🐳 修改时区. 2024-05-27 11:45:58 +08:00
lijiahang
48a53bc248 📝 修改文档. 2024-05-27 10:26:55 +08:00
lijiahangmax
6d18b016c1 Merge pull request #17 from lijiahangmax/dev
📝 更新文档.
2024-05-24 11:26:13 +08:00
lijiahang
f54acf595b 📝 更新文档. 2024-05-24 11:24:37 +08:00
lijiahangmax
8acebd5ad7 Merge pull request #16 from lijiahangmax/dev
Dev
2024-05-24 11:23:04 +08:00
lijiahang
c28c12ee01 📝 修改文档. 2024-05-24 10:47:28 +08:00
lijiahang
532c4afeaa 🐛 修复资产页面时间展示错误. 2024-05-23 14:37:12 +08:00
lijiahang
c201eb301f 添加演示模式. 2024-05-23 13:56:03 +08:00
lijiahang
ca8e629e4c chrome PWA 支持. 2024-05-22 12:50:30 +08:00
lijiahang
35ee4faffc 添加预览模式. 2024-05-22 10:12:43 +08:00
lijiahang
aee2795285 🔖 升级版本. 2024-05-21 13:42:34 +08:00
lijiahangmax
0656c18e85 Merge pull request #15 from lijiahangmax/dev
Dev
2024-05-21 13:31:34 +08:00
lijiahang
cce511c4b4 cron 生成组件. 2024-05-21 13:15:25 +08:00
lijiahang
4f0f320fcd cron 生成器. 2024-05-21 11:24:27 +08:00
lijiahang
2fed2aaa34 🔖 升级版本. 2024-05-20 11:26:55 +08:00
lijiahang
4eeedb85de 🐛 修复发送消息报错. 2024-05-20 11:24:04 +08:00
1787 changed files with 54345 additions and 33726 deletions

15
.env.example Normal file
View File

@@ -0,0 +1,15 @@
SERVICE_PORT=1081
VOLUME_BASE=/data/orion-visor-space/docker-volumes
MYSQL_HOST=mysql
MYSQL_PORT=3306
MYSQL_DATABASE=orion_visor
MYSQL_USER=orion
MYSQL_PASSWORD=Data@123456
MYSQL_ROOT_PASSWORD=Data@123456
REDIS_HOST=redis
REDIS_PASSWORD=Data@123456
SECRET_KEY=uQeacXV8b3isvKLK
DEMO_MODE=false

21
.github/workflows/e2e.yaml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: E2E
on:
pull_request:
branches:
- main
concurrency:
group: ${{github.workflow}} - ${{github.ref}}
cancel-in-progress: true
jobs:
testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: E2E Testing
run: |
sudo curl -L https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
sudo chmod u+x /usr/local/bin/docker-compose
docker compose -f docker-compose-testing.yml up --build testing --exit-code-from testing --remove-orphans

1
.gitignore vendored
View File

@@ -33,3 +33,4 @@ build/
### VS Code ###
.vscode/
.env

87
LICENSE
View File

@@ -200,90 +200,3 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Apache Dubbo Submodules:
Apache Dubbo includes a number of submodules with separate copyright notices
and license terms. Your use of these submodules is subject to the terms and
conditions of the following licenses.
For the package org.apache.dubbo.common.threadlocal and org.apache.dubbo.common.timer:
This product contains a modified portion of 'Netty', an event-driven asynchronous network application framework also
under a "Apache License 2.0" license, see https://github.com/netty/netty/blob/4.1/LICENSE.txt:
* io.netty.util.concurrent.FastThreadLocal
* io.netty.util.internal.InternalThreadLocalMap
* io.netty.util.Timer
* io.netty.util.TimerTask
* io.netty.util.Timeout
* io.netty.util.HashedWheelTimer
For the org.apache.dubbo.common.utils.CIDRUtils :
This product contains a modified portion of 'edazdarevic.commons.net.CIDRUtils' published at
https://github.com/edazdarevic/CIDRUtils. The project is licensed under a MIT License:
* The MIT License
*
* Copyright (c) 2013 Edin Dazdarevic (edin.dazdarevic@gmail.com)
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
For the file org.apache.dubbo.common.utils.Utf8Utils.java:
This product contains a portion of the Protocol Buffers project, which is published at
https://developers.google.com/protocol-buffers/ and is licensed under the following License:
Copyright 2008 Google Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Code generated by the Protocol Buffer compiler is owned by the owner
of the input file used when generating it. This code is not
standalone and requires a support library to be linked with it. This
support library is itself covered by the above license.
For the ca.proto in dubbo-registry-xds:
This product contains a modified portion of 'Istio', an open platform to connect, manage, and secure microservices also
under a "Apache License 2.0" license, see https://github.com/istio/api/blob/master/LICENSE:
* security/v1alpha1/ca.proto

9
NOTICE Normal file
View File

@@ -0,0 +1,9 @@
* 在使用本项目前,请您仔细阅读使用须知及免责声明,确保您已充分理解其中的内容
* 本项目采用 APACHE LICENSE 2.0 开源协议,如您需要源码的开发方式,需要遵循以下几点
1. 禁止修改或删除 LICENSE 文件。
2. 禁止修改或删除源码头部的版权声明。
3. 本项目可免费商业使用,商业使用请保留项目源码、出处、描述文件和作者声明等。
4. 分发源码时候,请注明软件出处 https://visor.orionsec.cn/
5. 不可二次开发或参与同类竞品的开发。

View File

@@ -1,5 +1,5 @@
<div align="center"><img src="https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/2/27/8c687ef1-5711-4a93-9db0-79c010af7902.png" alt="logo" width="32" /></div>
<p style="margin-top: 12px" align="center"><b>一款高颜值、现代化的智能运维&轻量堡垒机平台。</b></p>
<div align="center"><img src="https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/9/11/11e7e78e-2af0-4c68-9811-db8a4c4400f4.png" alt="logo" width="520" /></div>
<p style="margin-top: 12px" align="center"><b>一款高颜值、现代化的自动化运维&轻量堡垒机平台。</b></p>
<p align="center">
<a target="_blank"
style="text-decoration: none !important;"
@@ -13,61 +13,75 @@
</a>
<a target="_blank"
style="text-decoration: none !important;"
href="https://github.com/lijiahangmax/orion-visor/releases">
href="https://github.com/dromara/orion-visor/releases">
<img src="https://img.shields.io/github/v/release/lijiahangmax/orion-visor" alt="release" />
</a>
<a target="_blank"
style="text-decoration: none !important;"
href="https://gitee.com/lijiahangmax/orion-visor/stargazers">
<img src="https://gitee.com/lijiahangmax/orion-visor/badge/star.svg?theme=dark" alt="star" />
href="https://gitee.com/dromara/orion-visor/stargazers">
<img src="https://gitee.com/dromara/orion-visor/badge/star.svg?theme=gvp" alt="star" />
</a>
<a target="_blank"
style="text-decoration: none !important;"
href="https://gitee.com/lijiahangmax/orion-visor/members">
<img src="https://gitee.com/lijiahangmax/orion-visor/badge/fork.svg?theme=dark" alt="fork" />
href="https://gitee.com/dromara/orion-visor/members">
<img src="https://gitee.com/dromara/orion-visor/badge/fork.svg?theme=gvp" alt="fork" />
</a>
<a target="_blank"
style="text-decoration: none !important;"
href="https://github.com/lijiahangmax/orion-visor">
href="https://github.com/dromara/orion-visor">
<img src="https://img.shields.io/github/stars/lijiahangmax/orion-visor" alt="star" />
</a>
<a target="_blank"
style="text-decoration: none !important;"
href="https://github.com/lijiahangmax/orion-visor">
href="https://github.com/dromara/orion-visor">
<img src="https://img.shields.io/github/forks/lijiahangmax/orion-visor" alt="star" />
</a>
</p>
------------------------------
**`orion-visor`** 提供一站式服务器运维解决方案。
**`orion-visor`** 提供一站式自动化运维解决方案。
* **资产管理**:支持对资产进行分组,实现对主机、密钥和身份的统一管理和授权。
* **在线终端**:提供在线 Terminal 服务,支持快捷命令、大文件上传、在线编辑等操作
* **在线终端**:提供在线终端 SSH 服务,支持快捷命令、自定义快捷键和主题风格
* **文件管理**:支持远程主机 SFTP 大文件的批量上传、下载和在线编辑等操作。
* **批量操作**:支持批量执行主机命令、多主机文件分发等功能。
* **计划任务**:支持配置 cron 表达式,定时执行主机命令。
* **安全可靠**:动态配置权限,记录用户操作日志,提供简单的审计功能。
## 演示环境
演示地址: http://101.43.254.243:1081/
演示账号: admin/admin
⭐ 体验后可以点一下 `star` 这对我很重要!
🌈 如果本项目对你有帮助请帮忙推广一下 让更多的人知道此项目!
* 🔗 演示地址: [https://dv.orionsec.cn/](https://dv.orionsec.cn/)
* 🔏 演示账号: admin/admin
* ⭐ 体验后可以点一下 `star`
这对我很重要! [github](https://github.com/dromara/orion-visor) [gitee](https://gitee.com/dromara/orion-visor) [gitcode](https://gitcode.com/dromara/orion-visor/overview)
* 🌈 如果本项目对你有帮助请帮忙推广一下 让更多的人知道此项目!
* 🎭 演示环境部分功能不可用, 完整功能请本地部署!
* 📛 演示环境请不要随便删除数据!
* 📧 如果演示环境不可用请联系我!
## 快速开始
* [文档地址](https://lijiahangmax.github.io/orion-visor/#/)
* [docker安装](https://lijiahangmax.github.io/orion-visor/#/quickstart/docker-install)
* [普通安装](https://lijiahangmax.github.io/orion-visor/#/quickstart/install)
* [更新日志](https://lijiahangmax.github.io/orion-visor/#/about/change-log)
* [操作手册](https://lijiahangmax.github.io/orion-visor/#/operator/asset)
* [常见问题](https://lijiahangmax.github.io/orion-visor/#/quickstart/faq)
```bash
# clone
git clone --depth=1 https://github.com/dromara/orion-visor
cd orion-visor
# 启动
docker compose up -d
# 等待后端服务启动后 (2min±) 访问 http://localhost:1081/
```
## 项目文档
* [文档地址](https://visor.orionsec.cn/)
* [安装文档](https://visor.orionsec.cn/quickstart/docker.html)
* [更新日志](https://visor.orionsec.cn/update/change-log.html)
* [操作手册](https://visor.orionsec.cn/operator/asset.html)
* [常见问题](https://visor.orionsec.cn/support/faq.html)
## 技术栈
* SpringBoot 2.7.17
* SpringBoot 2.7.+
* Mysql 8.0.+
* Redis 6.0.+
* Vue3 3.2.+
@@ -77,37 +91,39 @@
#### 主机终端
![新建连接](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/17/19288b64-cdb2-4073-8df9-ecd642d4077f.png "新建连接")
![主机终端](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/17/41d9deb5-aede-48a5-a6f3-5522cfff9a9f.png "主机终端")
![sftp](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/17/366db511-0c1d-4680-9200-4da8f22b028b.png "sftp")
![主题设置](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/17/a3e4c2fb-11f5-4387-998e-6f454e336472.png "主题设置")
![新建连接](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/29/aa7efb14-f2cc-4a6f-b96b-a47964ed8f79.png "新建连接")
![主机终端](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/29/66f121de-69b6-49f6-adc4-701a22d481c4.png "主机终端")
![sftp](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/29/f7a0d141-0ee0-484e-8ddb-24cad9ed2c03.png "sftp")
![主题设置](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/29/d6f37ab3-62d2-4c5e-a503-e76a1d5ddc8e.png "主题设置")
#### 批量执行
![批量执行](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/17/99839bab-9f0e-45ea-b03d-a4c992203e95.png "批量执行")
![批量执行](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/29/3effc2fc-56a5-498d-8dfb-0f4f3b8a4056.png "批量执行")
#### 批量上传
![批量上传任务](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/17/04ccd627-8a46-43a1-acd9-740f75dbf386.png "批量上传任务")
![批量上传任务](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/29/98240fa9-4056-4520-9034-290d1aa47d80.png "批量上传任务")
#### 计划任务
![计划任务详情](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/17/0c4342fc-9fde-4fc1-b886-104a4d22c0b2.png "计划任务详情")
![计划任务详情](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/29/d5ee6f04-7b2c-42ba-a3b3-642587f40cce.png "计划任务详情")
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=lijiahangmax/orion-visor&type=Date)](https://star-history.com/#lijiahangmax/orion-visor&Date)
## 关于我
本人专注于使用 Java 和 Vue 进行全栈开发, 并在系统自动化运维方面拥有丰富开发的经验。如果您在这些领域有需求或遇到痛点, 请随时联系我, 并备注“合作”。
## 联系我
<div style="display: flex;">
<img src="https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/17/d42d91f3-f0ee-4c63-adab-a35809e0804c.jpg" alt="wx" width="298px" height="398px"/>
</div>
<img src="https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/10/11/cf72c603-3951-4171-95b4-06271dda1c80.jpg" alt="wx" width="628px"/>
![个人微信: ljh1553488](https://img.shields.io/badge/ljh1553488-blue?style=social&label=WX%3A)
![QQ群1: 755242157](https://img.shields.io/badge/755242157-blue?style=social&label=QQ%E7%BE%A41%3A%20)
微信: ljh1553488
QQ群: 755242157
📧 咨询问题微信备注: vis
📧 问题/加群微信备注: ops
📧 合作/功能定制备注: 合作
## 支持一下
@@ -118,8 +134,12 @@
## 免责声明
在使用本项目之前, 请确保您已经了解并同意相关的使用协议和隐私政策。[免责声明](https://github.com/lijiahangmax/orion-visor/blob/main/DISCLAIMER.md)
在使用本项目之前, 请确保您已经了解并同意相关的使用协议和隐私政策。[免责声明](https://github.com/dromara/orion-visor/blob/main/DISCLAIMER.md)
## License
本项目遵循 [Apache-2.0](https://github.com/lijiahangmax/orion-visor/blob/main/LICENSE) 开源许可证。
本项目遵循 [Apache-2.0](https://github.com/dromara/orion-visor/blob/main/LICENSE) 开源许可证。
## Gite 最有价值开源项目 GVP
![GVP](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/10/24/8dd98b8d-9de5-44e6-86d3-04e27ec66123.jpg "GVP")

View File

@@ -0,0 +1,79 @@
version: '3.3'
services:
service:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.2.0
privileged: true
ports:
- 1081:80
environment:
- MYSQL_HOST=mysql
- MYSQL_PORT=3306
- MYSQL_DATABASE=orion_visor
- MYSQL_USER=root
- MYSQL_PASSWORD=Data@123456
- REDIS_HOST=redis
- REDIS_PASSWORD=Data@123456
- SECRET_KEY=uQeacXV8b3isvKLK
- DEMO_MODE=false
volumes:
- /data/orion-visor-space/docker-volumes/service/root-orion:/root/orion
healthcheck:
test: [ "CMD", "curl", "http://127.0.0.1:9200/orion-visor/api/server/bootstrap/health" ]
interval: 3s
timeout: 300s
retries: 200
start_period: 3s
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
links:
- mysql
- redis
mysql:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.2.0
privileged: true
ports:
- 3307:3306
environment:
- MYSQL_DATABASE=orion_visor
- MYSQL_USER=orion
- MYSQL_PASSWORD=Data@123456
- MYSQL_ROOT_PASSWORD=Data@123456
volumes:
- /data/orion-visor-space/docker-volumes/mysql/var-lib-mysql:/var/lib/mysql
- /data/orion-visor-space/docker-volumes/mysql/var-lib-mysql-files:/var/lib/mysql-files
- /data/orion-visor-space/docker-volumes/mysql/etc-mysql:/etc/mysql
healthcheck:
test: [ "CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/3306" ]
interval: 3s
timeout: 60s
retries: 10
start_period: 3s
redis:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.2.0
privileged: true
ports:
- 6380:6379
environment:
- REDIS_PASSWORD=Data@123456
volumes:
- /data/orion-visor-space/docker-volumes/redis/data:/data
command: sh -c "redis-server /usr/local/redis.conf --requirepass $${REDIS_PASSWORD}"
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 3s
timeout: 60s
retries: 10
start_period: 3s
testing:
build:
context: ./docker/e2e
environment:
SERVER: http://service:80
depends_on:
service:
condition: service_healthy
links:
- service

View File

@@ -1,48 +1,78 @@
version: '3.3'
services:
orion-visor-service:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.0.0
service:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.2.0
privileged: true
ports:
- 1081:80
- ${SERVICE_PORT:-1081}:80
environment:
- MYSQL_HOST=orion-visor-mysql
- MYSQL_PORT=3306
- MYSQL_DATABASE=orion_visor
- MYSQL_USER=root
- MYSQL_PASSWORD=Data@123456
- REDIS_HOST=orion-visor-redis
- REDIS_PASSWORD=Data@123456
- SECRET_KEY=uQeacXV8b3isvKLK
- MYSQL_HOST=${MYSQL_HOST:-mysql}
- MYSQL_PORT=${MYSQL_PORT:-3306}
- MYSQL_DATABASE=${MYSQL_DATABASE:-orion_visor}
- MYSQL_USER=${MYSQL_USER:-root}
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-Data@123456}
- REDIS_HOST=${REDIS_HOST:-redis}
- REDIS_PASSWORD=${REDIS_PASSWORD:-Data@123456}
- SECRET_KEY=${SECRET_KEY:-uQeacXV8b3isvKLK}
- DEMO_MODE=${DEMO_MODE:-false}
volumes:
- /data/orion-visor-space/docker-volumes/orion-visor-service/root-orion:/root/orion
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/service/root-orion:/root/orion
healthcheck:
test: [ "CMD", "curl", "http://127.0.0.1:9200/orion-visor/api/server/bootstrap/health" ]
interval: 15s
timeout: 300s
retries: 15
start_period: 3s
depends_on:
- orion-visor-mysql
- orion-visor-redis
orion-visor-mysql:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.0.0
mysql:
condition: service_healthy
redis:
condition: service_healthy
links:
- mysql
- redis
mysql:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.2.0
privileged: true
ports:
- 3307:3306
environment:
- MYSQL_DATABASE=orion_visor
- MYSQL_USER=orion
- MYSQL_PASSWORD=Data@123456
- MYSQL_ROOT_PASSWORD=Data@123456
- MYSQL_DATABASE=${MYSQL_DATABASE:-orion_visor}
- MYSQL_USER=${MYSQL_USER:-orion}
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-Data@123456}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-Data@123456}
volumes:
- /data/orion-visor-space/docker-volumes/orion-visor-mysql/var-lib-mysql:/var/lib/mysql
- /data/orion-visor-space/docker-volumes/orion-visor-mysql/var-lib-mysql-files:/var/lib/mysql-files
- /data/orion-visor-space/docker-volumes/orion-visor-mysql/etc-mysql:/etc/mysql
orion-visor-redis:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.0.0
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/mysql/var-lib-mysql:/var/lib/mysql
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/mysql/var-lib-mysql-files:/var/lib/mysql-files
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/mysql/etc-mysql:/etc/mysql
healthcheck:
test: [ "CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/3306" ]
interval: 15s
timeout: 60s
retries: 15
start_period: 3s
redis:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.2.0
privileged: true
ports:
- 6380:6379
environment:
- REDIS_PASSWORD=Data@123456
- REDIS_PASSWORD=${REDIS_PASSWORD:-Data@123456}
volumes:
- /data/orion-visor-space/docker-volumes/orion-visor-redis/data:/data
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/redis/data:/data
command: sh -c "redis-server /usr/local/redis.conf --requirepass $${REDIS_PASSWORD}"
orion-visor-adminer:
image: adminer
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 15s
timeout: 60s
retries: 15
start_period: 3s
adminer:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-adminer:2.2.0
ports:
- 8081:8080
depends_on:
mysql:
condition: service_healthy
links:
- mysql

View File

@@ -1,4 +1,7 @@
#/bin/bash
docker compose down
sh ./pull.sh
docker compose up -d
# demo 启动
if [ "$1" == "demo" ]; then
sed -i 's/\${DEMO_MODE:-false}/true/g' docker-compose.yml
fi
docker compose up -d --remove-orphans

View File

@@ -0,0 +1 @@
FROM adminer:latest

4
docker/adminer/build.sh Normal file
View File

@@ -0,0 +1,4 @@
#/bin/bash
version=2.2.0
docker build -t orion-visor-adminer:${version} .
docker tag orion-visor-adminer:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-adminer:${version}

7
docker/e2e/Dockerfile Normal file
View File

@@ -0,0 +1,7 @@
FROM ghcr.io/linuxsuren/api-testing:v0.0.17
WORKDIR /workspace
COPY . .
RUN chmod 777 *
CMD [ "/workspace/entrypoint.sh" ]

3
docker/e2e/entrypoint.sh Normal file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
set -e
atest run -p testsuite.yaml --report md

49
docker/e2e/testsuite.yaml Normal file
View File

@@ -0,0 +1,49 @@
#!api-testing
# yaml-language-server: $schema=https://linuxsuren.github.io/api-testing/api-testing-schema.json
name: orion-visor
api: |
{{default "http://orion-visor-service:80" (env "SERVER")}}
items:
- name: login
request:
api: /orion-visor/api/infra/auth/login
method: POST
header:
Content-type: application/json
body: |
{"username":"admin","password":"21232f297a57a5a743894a0e4a801fc3"}
expect:
bodyFieldsExpect:
code: 200
- name: userPermission
request:
api: /orion-visor/api/infra/user-permission/user
header:
Authorization: Bearer {{.login.data.token}}
expect:
bodyFieldsExpect:
code: 200
msg: "success"
- name: menu
request:
api: /orion-visor/api/infra/user-permission/menu
header:
Authorization: Bearer {{.login.data.token}}
expect:
bodyFieldsExpect:
code: 200
msg: "success"
- name: haveUnRead
request:
api: /orion-visor/api/infra/system-message/has-unread
- name: queryOperatorLog
request:
api: /orion-visor/api/infra/mine/query-operator-log
method: POST
- name: hostList
request:
api: /orion-visor/api/infra/tag/list?type=HOST
- name: queryHost
request:
api: /orion-visor/api/asset/host/query
method: POST

View File

@@ -1,9 +1,17 @@
FROM mysql:8.0.28
# 系统时区
ARG TZ=Asia/Shanghai
# 设置时区
RUN ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && \
echo '${TZ}' > /etc/timezone
# 复制配置
COPY ./my.cnf /etc/mysql/conf.d/my.cnf
# 复制初始化脚本
COPY ./sql/init-1-schema-databases.sql /tmp
COPY ./sql/init-2-schema-tables.sql /tmp
COPY ./sql/init-3-schema-quartz.sql /tmp
COPY ./sql/init-4-data.sql /tmp
COPY ./my.cnf /etc/mysql/conf.d/my.cnf
# 设置初始化脚本
RUN cat /tmp/init-1-schema-databases.sql >> /tmp/init.sql && \
cat /tmp/init-2-schema-tables.sql >> /tmp/init.sql && \
cat /tmp/init-3-schema-quartz.sql >> /tmp/init.sql && \

View File

@@ -1,7 +1,6 @@
#/bin/bash
version=2.0.0
version=2.2.0
cp -r ../../sql ./sql
docker build -t orion-visor-mysql:${version} .
rm -rf ./sql
docker tag orion-visor-mysql:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:${version}
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:${version}

View File

@@ -1,4 +0,0 @@
FROM redis:6.0.16-alpine
WORKDIR /data
COPY ./redis.conf /tmp
RUN cat /tmp/redis.conf > /usr/local/redis.conf

View File

@@ -1,15 +0,0 @@
FROM nginx:alpine
USER root
RUN \
echo "" > /etc/apk/repositories && \
echo "http://mirrors.aliyun.com/alpine/v3.8/main" >> /etc/apk/repositories &&\
echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories && \
apk update
RUN apk add openjdk8
RUN rm -rf /etc/nginx/conf.d/*
WORKDIR /app
COPY ./orion-visor-launch.jar /app/app.jar
COPY ./dist /usr/share/nginx/html
COPY ./entrypoint.sh /app/entrypoint.sh
COPY ./nginx.conf /etc/nginx/conf.d
ENTRYPOINT [ "sh", "/app/entrypoint.sh" ]

6
docker/push.sh Normal file
View File

@@ -0,0 +1,6 @@
#/bin/bash
version=2.2.0
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-adminer:${version}
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:${version}
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:${version}
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:${version}

15
docker/redis/Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
FROM redis:6.0.16-alpine
WORKDIR /data
# 系统时区
ARG TZ=Asia/Shanghai
# 添加包
RUN \
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
apk update && \
apk add tzdata
# 设置时区
RUN ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && \
echo '${TZ}' > /etc/timezone
# redis 配置
COPY ./redis.conf /tmp
RUN cat /tmp/redis.conf > /usr/local/redis.conf

View File

@@ -1,5 +1,4 @@
#/bin/bash
version=2.0.0
version=2.2.0
docker build -t orion-visor-redis:${version} .
docker tag orion-visor-redis:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:${version}
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:${version}

24
docker/service/Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
FROM nginx:alpine
USER root
WORKDIR /app
# 系统时区
ARG TZ=Asia/Shanghai
# 添加包
RUN \
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
apk update && \
apk add tzdata && \
apk add dmidecode && \
apk add openjdk8
# 设置时区
RUN ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && \
echo '${TZ}' > /etc/timezone
# 删除原 nginx 配置
RUN rm -rf /etc/nginx/conf.d/*
# 复制包
COPY ./orion-visor-launch.jar /app/app.jar
COPY ./dist /usr/share/nginx/html
COPY ./entrypoint.sh /app/entrypoint.sh
COPY ./nginx.conf /etc/nginx/conf.d
# 启动
ENTRYPOINT [ "sh", "/app/entrypoint.sh" ]

View File

@@ -1,9 +1,8 @@
#/bin/bash
version=2.0.0
version=2.2.0
mv ../../orion-visor-launch/target/orion-visor-launch.jar ./orion-visor-launch.jar
mv ../../orion-visor-ui/dist ./dist
docker build -t orion-visor-service:${version} .
rm -f ./orion-visor-launch.jar
rm -rf ./orion-visor-launch.jar
rm -rf ./dist
docker tag orion-visor-service:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:${version}
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:${version}

View File

@@ -29,7 +29,7 @@ server {
location /orion-visor/api {
proxy_pass http://localhost:9200/orion-visor/api;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

View File

@@ -19,12 +19,12 @@
<a target="_blank"
style="text-decoration: none !important;"
href="https://gitee.com/lijiahangmax/orion-visor/stargazers">
<img src="https://gitee.com/lijiahangmax/orion-visor/badge/star.svg?theme=dark" alt="star" />
<img src="https://gitee.com/lijiahangmax/orion-visor/badge/star.svg?theme=gvp" alt="star" />
</a>
<a target="_blank"
style="text-decoration: none !important;"
href="https://gitee.com/lijiahangmax/orion-visor/members">
<img src="https://gitee.com/lijiahangmax/orion-visor/badge/fork.svg?theme=dark" alt="fork" />
<img src="https://gitee.com/lijiahangmax/orion-visor/badge/fork.svg?theme=gvp" alt="fork" />
</a>
<a target="_blank"
style="text-decoration: none !important;"
@@ -40,10 +40,17 @@
------------------------------
<p><b>⛔⛔此页面已不再维护, 请跳转至
<a target="_blank" href="https://lijiahangmax.github.io/open-orion/orion-visor">这里</a>
查看最新文档 ❗</b></p>
------------------------------
**`orion-visor`** 提供一站式服务器运维解决方案。
* **资产管理**:支持对资产进行分组,实现对主机、密钥和身份的统一管理和授权。
* **在线终端**:提供在线 Terminal 服务,支持快捷命令、大文件上传、在线编辑等操作
* **在线终端**:提供在线终端 SSH 服务,支持快捷命令、自定义快捷键和主题风格
* **文件管理**:支持远程主机 SFTP 大文件的批量上传、下载和在线编辑等操作。
* **批量操作**:支持批量执行主机命令、多主机文件分发等功能。
* **计划任务**:支持配置 cron 表达式,定时执行主机命令。
* **安全可靠**:动态配置权限,记录用户操作日志,提供简单的审计功能。
@@ -55,12 +62,22 @@
⭐ 体验后可以点一下 `star` 这对我很重要!
🌈 如果本项目对你有帮助请帮忙推广一下 让更多的人知道此项目!
[github](https://github.com/lijiahangmax/orion-visor) [gitee](https://gitee.com/lijiahangmax/orion-visor)
## 快速开始
* [文档地址](https://lijiahangmax.github.io/orion-visor/#/)
* [docker安装](/quickstart/docker-install)
* [普通安装](/quickstart/install)
```bash
# clone
git clone https://github.com/lijiahangmax/orion-visor
cd orion-visor
# 启动
docker compose up -d
```
## 项目文档
* [文档地址](/)
* [安装文档](/quickstart/docker-install)
* [更新日志](/about/change-log)
* [操作手册](/operator/asset)
* [常见问题](/quickstart/faq)

View File

@@ -1,6 +1,6 @@
# orion-visor <small>2.0.0</small>
# orion-visor
> 一款开箱即用的运维平台。
> 一款高颜值、现代化的智能运维&轻量堡垒机平台。
- 友好 易用
- 安全 稳定

View File

@@ -14,6 +14,32 @@
* 执行 升级的 `bash` 脚本
* 进入 代码目录执行 `sh docker-upgrade.sh` 进行容器升级 `down` > `pull` > `up -d`
### v2.0.3
`2024-05-29` `release`
* 🐞 修复 部分 ui 显示错误
* 🐞 修复 计划任务编辑时报错
* 🐞 修复 计划任务手动触发时报错
* 🩰 修改 logo
* 🔨 修改 docker 时区
### v2.0.2
`2024-05-24` `release`
* 🐞 修复 资产授权密钥时间显示错误
* 🌈 添加 演示模式
* ⭐ 支持 Chrome PWA
### v2.0.1
`2024-05-21` `release`
* ⭐ 添加 cron 组件
* 🐞 修复 批量执行后日志偶尔不展示的问题
* 🐞 修复 批量上传进度条显示异常的问题
### v2.0.0
`2024-05-17` `release`

View File

@@ -2,12 +2,10 @@
* 终端背景图片
* 资产授权 UI 改版
* RDP 远程桌面
* 接入 config 后端动态配置
* 文档中巡检模板
* 导入快捷命令
* 导入命令模板
* 使用 vite press 开发文档
## 已知问题

BIN
docs/assert/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 KiB

View File

@@ -1,17 +1,22 @@
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<defs>
<style>.cls-1{fill:url(#未命名的渐变_4);}.cls-2{fill:url(#未命名的渐变_6);}</style>
<linearGradient id="未命名的渐变_4" x1="0.32" y1="15.03" x2="20.16" y2="15.03" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#23b6b6"/>
<stop offset="1" stop-color="#189c98"/>
</linearGradient>
<linearGradient id="未命名的渐变_6" x1="11.84" y1="16.97" x2="31.68" y2="16.97" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#08589b"/>
<stop offset="1" stop-color="#2167b2"/>
</linearGradient>
</defs>
<path class="cls-1"
d="M20,17.37a1.56,1.56,0,0,0-2.13-.65l-7.56,4.07A4.65,4.65,0,0,1,4,18.91H4a4.65,4.65,0,0,1,1.88-6.3L13.6,8.44a1.56,1.56,0,0,0,.64-2.1h0a1.56,1.56,0,0,0-2.13-.65l-8,4.3a7.24,7.24,0,0,0-2.94,9.82l.51.94a7.24,7.24,0,0,0,9.82,2.94l7.81-4.22a1.56,1.56,0,0,0,.65-2.1Z"/>
<path class="cls-2"
d="M12,14.63a1.56,1.56,0,0,0,2.13.65l7.56-4.07A4.65,4.65,0,0,1,28,13.09h0a4.65,4.65,0,0,1-1.88,6.3L18.4,23.56a1.56,1.56,0,0,0-.64,2.1h0a1.56,1.56,0,0,0,2.13.65l8-4.3a7.24,7.24,0,0,0,2.94-9.82l-.51-.94a7.24,7.24,0,0,0-9.82-2.94l-7.81,4.22a1.56,1.56,0,0,0-.65,2.1Z"/>
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
<style type="text/css">
.st0{fill:url(#SVGID_1_);}
.st1{fill:#3B28CC;}
</style>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="27.1802" y1="7.7935" x2="15.2269" y2="25.137">
<stop offset="0" style="stop-color:#ADD7F6"/>
<stop offset="0.2512" style="stop-color:#AAD5F6"/>
<stop offset="0.4195" style="stop-color:#A1CDF7"/>
<stop offset="0.5636" style="stop-color:#92C1F8"/>
<stop offset="0.694" style="stop-color:#7DAFF9"/>
<stop offset="0.8152" style="stop-color:#6198FB"/>
<stop offset="0.9279" style="stop-color:#407CFD"/>
<stop offset="1" style="stop-color:#2667FF"/>
</linearGradient>
<path class="st0" d="M31.41,4.01h-8.04c-0.27,0-0.51,0.18-0.57,0.44c-0.64,2.56-4.19,15.45-11.86,20.81c0,0,9.5,13.77,21.03-20.47
C32.1,4.4,31.81,4.01,31.41,4.01z"/>
<path class="st1" d="M0.62,3.98h8.02c0.28,0,0.52,0.18,0.59,0.45c0.69,2.58,4.47,15.52,12.14,20.88c0,0-10.88,13.73-21.34-20.54
C-0.09,4.37,0.2,3.98,0.62,3.98z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -2,10 +2,10 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>关于 orion-visor</title>
<title>orion-visor</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="description" content="Description">
<link rel="icon" href="./assert/logo.svg">
<link rel="icon" href="./assert/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<!-- Theme: Defaults -->
<link rel="stylesheet" href="./assert/font.css">

View File

@@ -34,7 +34,3 @@
### 资产授权
给用户/角色授权资产数据, 若无授权则无法访问资产。
给用户授权时: 若当前选择的用户有管理员角色(admin)则无需配置, 管理员拥有全部权限。
给角色授权时: 无需给管理员(admin)配置, 管理员拥有全部权限。

View File

@@ -21,7 +21,7 @@
* 命令: 查看执行时的命令
* 参数: 查看执行时的参数
* 中断: 中断命令执行
* 日志: 查看执行日志, ctrl + 左键点击会用新页面打开
* 日志: 查看执行日志 `ctrl + 左键` 点击会用新页面打开
* 下载: 下载执行日志
### 批量上传
@@ -65,14 +65,14 @@
### 日志面板快捷键
* 回车: `Enter`
* 向上滚动一行: `↑`
* 向上滚动一页: `Home`
* 向下滚动一行: `↓`
* 向下滚动一页: `End`
* 全选: `ctrl` `A`
* 复制: `ctrl` `C`
* 搜索: `ctrl` `F`
* 清空: `ctrl` `L`
* 向上滚动一行: `↑`
* 向上滚动一页: `Home`
* 向下滚动一行: `↓`
* 向下滚动一页: `End`
### 命令内置参数

View File

@@ -24,6 +24,7 @@
> 右侧状态栏
* 命令片段: 自定义快速执行的命令片段, 双击直接执行
* 路径书签: 自定义快速进入的目录
* 传输列表: 打开文件传输列表, 当前会话下, 所有的文件上传下载传输都会显示在这里
* 截图: 截屏终端并且自动下载

View File

@@ -1,6 +1,6 @@
### 任务列表
⚡ 内置参数同 `批量执行 > 命令执行` [查看](/operator/exec.md?id=命令内置参数)
⚡ 内置参数同 `批量执行` > `命令执行` [查看](/operator/exec.md?id=命令内置参数)
维护计划任务, 定时执行命令。
@@ -22,5 +22,5 @@
* 命令: 查看执行时的命令
* 参数: 查看执行时的参数
* 中断: 中断命令执行
* 日志: 查看执行日志, ctrl + 左键点击会用新页面打开
* 日志: 查看执行日志 `ctrl + 左键` 点击会用新页面打开
* 下载: 下载执行日志

View File

@@ -13,7 +13,7 @@
* 新增: 添加一个字典项
* 刷新缓存: 强制刷新服务器缓存, 一般是手动修改了数据库后需要点击此按钮
* 查看: 查看字典值的json
* 查看: 查看字典值的 json
* 修改: 修改字典项
* 删除: 删除字典项以及字典值

View File

@@ -1,17 +1,17 @@
### 所需环境
* JDK 1.8
* Mysql 8.0(+)
* Redis 5.0.5(+)
* Node 16.16.0(+)
* Maven 3.5.4(+)
* jdk 1.8
* mysql 8.0.+
* redis 6.0.+
* maven 3.5.+
* node 18.12.+
* pnpm 9.1.+
⚡ maven 推荐使用阿里云 mirror
⚡ npm 建议使用淘宝镜像 `npm config set registry https://registry.npmmirror.com/`
⚡ pnpm 建议使用淘宝镜像 `pnpm config set registry https://registry.npmmirror.com/`
### 配置
1. 拉取代码
### 拉取代码
```
# github
@@ -20,7 +20,7 @@ git clone https://github.com/lijiahangmax/orion-visor
git clone https://gitee.com/lijiahangmax/orion-visor
```
2. 初始化数据库
### 初始化数据库
```
# 执行脚本
@@ -30,7 +30,7 @@ orion-visor/sql/init-3-schema-quartz.sql
orion-visor/sql/init-4-data.sql
```
3. 修改后端配置
### 修改后端配置
```
# 修改配置文件 (mysql, redis, secret-key)
@@ -44,9 +44,9 @@ mvn -U clean install -DskipTests
com.orion.visor.launch.LaunchApplication
```
4. 修改前端配置
### 修改前端配置
```
```shell
# 进入代码目录
cd orion-visor/orion-visor-ui
# 下载 pnpm

View File

@@ -19,42 +19,53 @@ Dashboard 修改)
### 拉取代码
```
```shell
# github
git clone https://github.com/lijiahangmax/orion-visor
git clone --depth=1 https://github.com/lijiahangmax/orion-visor
# gitee
git clone https://gitee.com/lijiahangmax/orion-visor
git clone --depth=1 https://gitee.com/lijiahangmax/orion-visor
```
### 构建镜像
### 拉取镜像
```
# 进入仓库目录
cd orion-visor
# 修改 docker-compose.yml (建议修改)
# MYSQL_USER mysql 用户名
# MYSQL_PASSWORD mysql 用户密码
# MYSQL_ROOT_PASSWORD mysql root 密码
# REDIS_PASSWORD redis 密码
# SECRET_KEY 加密密钥
# 构建
docker compose build
# 创建名为 .env 的 .env.example 副本
cp .env.example .env
# 将其中的值删除以保持默认或将其修改为你喜欢的值
# SERVICE_PORT 你希望服务监听的端口
# VOLUME_BASE 你希望数据持久化保存的目录, 如果不提前创建将以 docker 进程宿主身份创建(通常是 root)
# MYSQL_HOST mysql 服务所在的主机, 如果你没有现有的 MySQL 请保持值为 mysql, 如果你有自部署的请在 docker-compose.yml 中移除 services.mysql 以节约性能
# MYSQL_PORT mysql 监听的端口
# MYSQL_DATABASE mysql 数据库
# MYSQL_USER mysql 用户名
# MYSQL_PASSWORD mysql 用户密码
# MYSQL_ROOT_PASSWORD mysql root 密码
# REDIS_HOST redis 服务所在的主机, 如果你没有现有的 Redis 请保持值为 redis, 如果你有自部署的请在 docker-compose.yml 中移除 services.redis 以节约性能
# REDIS_PASSWORD redis 密码
# SECRET_KEY 加密密钥
# 拉取远程镜像
docker compose pull
```
### 启动
```
```shell
docker compose up -d
```
### 连接 mysql (如果需要在 navicat 中连接)
### 修改 MySQL 账户的加密方式
```
访问 adminer: http://localhost:8081
服务器: orion-visor-mysql
用户名: root
密码: Data@123456
数据库: orion-visor
码: Data@123456
数据库: orion_visor
点击左侧 SQL命令 输入:
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'Data@123456';
@@ -64,5 +75,5 @@ ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'Data@123456';
### 测试访问
在浏览器中输入 http://localhost:1081/ 访问
账号: admin
密码: admin
账号: `admin`
密码: `admin`

View File

@@ -1,27 +1,42 @@
> ##### 1. 数据误删除怎么办?
### 日志文件在哪?
```shell
# 宿主机
tail -f -n 200 /data/orion-visor-space/docker-volumes/orion-visor-service/root-orion/logs/orion-visor/app.log
# 容器内
tail -f -n 200 /root/orion/logs/orion-visor/app.log
# 滚动日志 .../logs/orion-visor/rolling/*
```
### 数据误删除怎么办?
数据库的数据都采用了逻辑删除, 可以将已删除的数据中的 `deleted` 字段改为 `0`
如果不知道数据是哪一条, 可以查询用户操作日志, 点击 `参数` 寻找操作的id
> ##### 2. 执行命令时为什么会找不到环境变量?
### 执行命令时为什么会找不到环境变量?
可以在执行命令的第一行设置 `source /etc/profile` 来加载环境变量
> ##### 3. 命令中途执行失败如何设置中断执行?
### 命令中途执行失败如何设置中断执行?
可以在执行命令的第一行设置 `set -e`
作用是: 当执行出现意料之外的情况时, 立即退出
> ##### 4. 在调度任务、批量执行 命令执行成功的依据是什么?
### 在调度任务、批量执行 命令执行成功的依据是什么?
是获取命令的 `exitcode` 判断是否为 `0` 如果非0则代表命令执行失败
同理, 在命令的最后一行设置 `exit 1` 结果将会是失败, 可以用此来中断后续流程
> ##### 5. 调度任务、批量执行 的日志文件中如何只保存原始输出?
### 调度任务、批量执行 的日志文件中如何只保存原始输出?
修改 `application.yaml` `app.exec-log.append-ansi``false`
> ##### 6. 为什么使用密钥认证还是无法连接机器?
### SFTP 为什么有些文件无法编辑?
只有普通文件可以在线编辑, 也就是 attr 为 `-` 开头的文件, 且文件大小不超过 `2MB` (默认)
修改 `.env.production` `VITE_SFTP_PREVIEW_MB` 改为一个合适的大小(MB) 重新构建
### 为什么使用密钥认证还是无法连接机器?
```
# 升级 openssh
@@ -41,9 +56,3 @@ AuthorizedKeysFile .ssh/authorized_keys
# 重启 sshd 服务
service sshd restart
```
<br/>
⚡ 详细使用请参考操作手册~
<br/>

View File

@@ -1,18 +1,18 @@
### 所需环境
* JDK 1.8
* Mysql 8.0(+)
* Redis 5.0.5(+)
* Node 16.16.0(+)
* Maven 3.5.4(+)
* Nginx
* jdk 1.8
* mysql 8.0.+
* redis 6.0.+
* maven 3.5.+
* node 18.12.+
* pnpm 9.1.+
* nginx
⚡ maven 推荐使用阿里云 mirror
⚡ npm 建议使用淘宝镜像 `npm config set registry https://registry.npmmirror.com/`
⚡ npm 建议使用淘宝镜像 `npm config set registry https://registry.npmmirror.com/`
⚡ pnpm 建议使用淘宝镜像 `pnpm config set registry https://registry.npmmirror.com/`
### 构建
1. 拉取代码
### 拉取代码
```
# github
@@ -21,7 +21,7 @@ git clone https://github.com/lijiahangmax/orion-visor
git clone https://gitee.com/lijiahangmax/orion-visor
```
2. 初始化数据库
### 初始化数据库
```
# 执行脚本
@@ -31,7 +31,7 @@ orion-visor/sql/init-3-schema-quartz.sql
orion-visor/sql/init-4-data.sql
```
3. 构建后端代码
### 构建后端代码
```
# 修改配置文件 (mysql, redis, secret-key)
@@ -43,7 +43,7 @@ cd orion-visor
mvn -U clean install -DskipTests
```
4. 构建前端代码
### 构建前端代码
```
# 进入代码目录
@@ -120,7 +120,7 @@ server {
```
复制 orion-visor/orion-visor-ui/dist 到 /usr/share/nginx/html
复制 orion-visor/orion-visor-launch/target/orion-visor-launch.jar 到 /data/orion
复制 orion-visor/orion-visor-launch/target/orion-visor-launch.jar 到 /data/orion-visor-space
# 启动后台服务
nohup java -jar orion-visor-launch.jar --spring.profiles.active=prod 2>&1 &
# 启动 nginx

View File

@@ -1,6 +1,6 @@
## v1.0.0
### v1.0.0
> sql 脚本 - DML
### sql 脚本 - DML
```sql
-- 字典配置项

View File

@@ -1,13 +1,13 @@
## v1.0.1
### v1.0.1
> sql 脚本 - DDL
### sql 脚本 - DDL
```sql
DROP TABLE IF EXISTS `command_template`;
ALTER TABLE `operator_log` ADD INDEX `idx_type`(`type`);
```
> sql 脚本 - DML
### sql 脚本 - DML
```sql
-- 菜单配置

View File

@@ -1,6 +1,6 @@
## v1.0.2
### v1.0.2
> sql 脚本 - DDL
### sql 脚本 - DDL
```sql
ALTER TABLE `host_connect_log`
@@ -83,7 +83,7 @@ CREATE TABLE `exec_template`
ROW_FORMAT = Dynamic;
```
> sql 脚本 - DML
### sql 脚本 - DML
```sql
-- 菜单配置

View File

@@ -1,6 +1,6 @@
## v1.0.3
### v1.0.3
> sql 脚本 - DML
### sql 脚本 - DML
```sql
DELETE FROM preference WHERE type = 'TERMINAL';

View File

@@ -1,6 +1,6 @@
## v1.0.4
### v1.0.4
> sql 脚本 - DDL
### sql 脚本 - DDL
```sql
-- 修改字段
@@ -260,7 +260,7 @@ CREATE TABLE `QRTZ_SCHEDULER_STATE`
ROW_FORMAT = Dynamic;
```
> sql 脚本 - DML
### sql 脚本 - DML
```sql
-- 操作日志修改

View File

@@ -1,6 +1,6 @@
## v1.0.5
### v1.0.5
> sql 脚本 - DDL
### sql 脚本 - DDL
```sql
ALTER TABLE `system_user`
@@ -22,7 +22,7 @@ ALTER TABLE `exec_host_log`
ADD COLUMN `script_path` varchar(512) NULL COMMENT '脚本路径' AFTER `log_path`;
```
> sql 脚本 - DML
### sql 脚本 - DML
```sql
-- 初始化主机身份类型

View File

@@ -1,6 +1,6 @@
## v1.0.6
### v1.0.6
> sql 脚本 - DDL
### sql 脚本 - DDL
```sql
-- 数据分组添加 userId
@@ -58,10 +58,9 @@ CREATE TABLE `path_bookmark`
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '路径书签'
ROW_FORMAT = Dynamic;
```
> sql 脚本 - DML
### sql 脚本 - DML
```sql
-- 设置数据分组 user_id
@@ -88,7 +87,7 @@ INSERT INTO `dict_value` VALUES (274, 39, 'pathBookmarkType', 'FILE', '文件',
INSERT INTO `dict_value` VALUES (275, 39, 'pathBookmarkType', 'DIR', '文件夹', '{}', 20, '2024-04-24 13:43:39', '2024-04-24 13:43:39', '1', '1', 0);
```
> sql 脚本 - 命令分组初始化
### sql 脚本 - 命令分组初始化
```sql
-- 插入命令片段分组

View File

@@ -1,6 +1,6 @@
## v1.0.7
### v1.0.7
> sql 脚本 - DDL
### sql 脚本 - DDL
```sql
ALTER TABLE `data_permission` COMMENT = '数据权限表';
@@ -57,7 +57,7 @@ CREATE TABLE `upload_task_file`
ROW_FORMAT = Dynamic;
```
> sql 脚本 - DML
### sql 脚本 - DML
```sql
-- 字典项

View File

@@ -1,6 +1,6 @@
## v1.0.8
### v1.0.8
> sql 脚本 - DDL
### sql 脚本 - DDL
```sql
-- 修改字段名称
@@ -32,7 +32,7 @@ CREATE TABLE `system_message`
ROW_FORMAT = Dynamic;
```
> sql 脚本 - DML
### sql 脚本 - DML
```sql
-- 菜单

View File

@@ -1,22 +1,20 @@
## v2.0.0
### v2.0.0
### ⚡ **本次升级提示 本次更新较大 请仔细查阅** ⚡
##### 本次升级思路:
* 先执行以下 **`7`** 个脚本
* 容器下线 `docker compose down`
* 删除原代码目录 `rm -rf orion-ops-pro`
* 克隆改名后的项目 `git clone https://github.com/lijiahangmax/orion-visor.git` or `gitee`
* 启动容器 `docker compose up -d`
```readme
```text
sql 在 adminer/navicat 中执行, bash 脚本直接修改后粘贴执行 不要保存为文件执行否则会出错
本次升级包含数据库重命名操作。#3 创建新数据库, #4 进行数据迁移, #5 删除旧数据库。
[不推荐] 如果不想重命名可以修改 docker-compose.yml, 将 MYSQL_DATABASE 改为 orion-ops-pro 并且跳过步骤 #3 #4 #5
```
> #1 sql 脚本 - DDL
### 1. sql 脚本 - DDL
```sql
-- 修改默认值
@@ -29,7 +27,7 @@ MODIFY COLUMN `key_id` bigint(0) NULL DEFAULT NULL COMMENT '密钥id' AFTER `pas
ALTER TABLE `host_key` COMMENT = '主机密钥';
```
> #2 sql 脚本 - DML
### 2. sql 脚本 - DML
```sql
-- 删除 quartz 配置
@@ -70,14 +68,14 @@ INSERT INTO `dict_value` VALUES (174, 26, 'hostExtraSshAuthType', 'CUSTOM_KEY',
INSERT INTO `dict_value` VALUES (271, 37, 'hostIdentityType', 'KEY', '密钥', '{\"color\": \"arcoblue\"}', 20, '2024-04-16 17:18:12', '2024-05-17 12:49:16', '2', '2', 0);
```
> #3 sql 脚本 - 创建数据库 orion_visor
### 3. sql 脚本 - 创建数据库 orion_visor
```sql
-- 创建数据库
CREATE DATABASE IF NOT EXISTS `orion_visor` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
```
> #4 bash 脚本 - 数据迁移
### 4. bash 脚本 - 数据迁移
```bash
# 可以使用 navicat 的数据迁移功能, 下面描述的是 bash 中执行, 注意下面的变量替换
@@ -97,14 +95,14 @@ rm -f /tmp/orion-ops-pro_dump.sql
exit
```
> #5 sql 脚本 - 删除数据库
### 5. sql 脚本 - 删除数据库
```sql
-- 删除数据库
DROP DATABASE `orion-ops-pro`;
```
> #6 bash 脚本 - 修改 nginx 配置
### 6. bash 脚本 - 修改 nginx 配置
```bash
pro_container_id=41dfd6aff736;
@@ -118,7 +116,7 @@ nginx -s reload
exit
```
> #7 bash 脚本 - 工作空间迁移
### 7. bash 脚本 - 工作空间迁移
```bash
# 迁移工作空间

View File

@@ -1,11 +0,0 @@
## v2.0.1
> sql 脚本 - DDL
```sql
```
> sql 脚本 - DML
```sql
```

View File

@@ -1,11 +0,0 @@
## v2.0.2
> sql 脚本 - DDL
```sql
```
> sql 脚本 - DML
```sql
```

11
docs/update/v2.0.x.md Normal file
View File

@@ -0,0 +1,11 @@
### v2.0.x
### sql 脚本 - DDL
```sql
```
### sql 脚本 - DML
```sql
```

View File

@@ -4,21 +4,21 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.orion.visor</groupId>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-dependencies</artifactId>
<version>${revision}</version>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<description>项目所有依赖</description>
<url>https://github.com/lijiahangmax/orion-visor</url>
<url>https://github.com/dromara/orion-visor</url>
<properties>
<revision>2.0.0</revision>
<revision>2.2.0</revision>
<spring.boot.version>2.7.17</spring.boot.version>
<spring.boot.admin.version>2.7.15</spring.boot.admin.version>
<flatten.maven.plugin.version>1.5.0</flatten.maven.plugin.version>
<orion.kit.revision>1.0.7</orion.kit.revision>
<orion.kit.version>2.0.0</orion.kit.version>
<aspectj.version>1.9.7</aspectj.version>
<lombok.version>1.18.26</lombok.version>
<springdoc.version>1.6.15</springdoc.version>
@@ -48,95 +48,95 @@
<!-- orion-kit -->
<dependency>
<groupId>io.github.lijiahangmax</groupId>
<groupId>cn.orionsec.kit</groupId>
<artifactId>orion-all</artifactId>
<version>${orion.kit.revision}</version>
<version>${orion.kit.version}</version>
<exclusions>
<exclusion>
<artifactId>orion-log</artifactId>
<groupId>io.github.lijiahangmax</groupId>
<groupId>cn.orionsec.kit</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- orion-visor-starter -->
<dependency>
<groupId>com.orion.visor</groupId>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-framework-common</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.orion.visor</groupId>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-banner</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.orion.visor</groupId>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-web</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.orion.visor</groupId>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-swagger</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.orion.visor</groupId>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-datasource</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.orion.visor</groupId>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-mybatis</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.orion.visor</groupId>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-job</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.orion.visor</groupId>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-websocket</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.orion.visor</groupId>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-redis</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.orion.visor</groupId>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-desensitize</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.orion.visor</groupId>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-log</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.orion.visor</groupId>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-storage</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.orion.visor</groupId>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-security</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.orion.visor</groupId>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-monitor</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.orion.visor</groupId>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-test</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.orion.visor</groupId>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-biz-operator-log</artifactId>
<version>${revision}</version>
</dependency>

View File

@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.orion.visor</groupId>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-framework</artifactId>
<version>${revision}</version>
</parent>
@@ -14,11 +14,11 @@
<packaging>jar</packaging>
<description>项目公共基准包</description>
<url>https://github.com/lijiahangmax/orion-visor</url>
<url>https://github.com/dromara/orion-visor</url>
<dependencies>
<dependency>
<groupId>io.github.lijiahangmax</groupId>
<groupId>cn.orionsec.kit</groupId>
<artifactId>orion-all</artifactId>
</dependency>

View File

@@ -1,27 +0,0 @@
package com.orion.visor.framework.common.constant;
import com.orion.lang.constant.OrionConst;
/**
* 项目常量
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/6/19 18:56
*/
public interface AppConst extends OrionConst {
/**
* 同 ${orion.version} 迭代时候需要手动更改
*/
String VERSION = "2.0.0";
String ORION_VISOR = "orion-visor";
String GITHUB = "https://github.com/lijiahangmax/orion-visor";
String GITEE = "https://gitee.com/lijiahangmax/orion-visor";
String ISSUES = "https://github.com/lijiahangmax/orion-visor/issues";
}

View File

@@ -1,16 +0,0 @@
package com.orion.visor.framework.common.constant;
/**
* 常量 - 中文
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/11/30 21:00
*/
public interface CnConst {
String CN_USER = "用户";
String CN_ROLE = "角色";
}

View File

@@ -1,38 +0,0 @@
package com.orion.visor.framework.common.constant;
/**
* 常量
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/6/23 18:49
*/
public interface Const extends com.orion.lang.constant.Const, FieldConst, CnConst {
Integer NOT_DELETE = 0;
Integer IS_DELETED = 1;
int BEARER_PREFIX_LEN = 7;
int MD5_LEN = 32;
String UNKNOWN = "未知";
String INTRANET_IP = "内网IP";
Long ROOT_PARENT_ID = 0L;
Integer DEFAULT_SORT = 10;
int LOGIN_HISTORY_COUNT = 30;
Long NONE_ID = -1L;
Integer DEFAULT_VERSION = 1;
Long SYSTEM_USER_ID = 0L;
String SYSTEM_USERNAME = "system";
}

View File

@@ -1,68 +0,0 @@
package com.orion.visor.framework.common.constant;
/**
* 字段常量
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/10/17 12:44
*/
public interface FieldConst {
String ID = "id";
String KEY = "key";
String CODE = "code";
String NAME = "name";
String TITLE = "title";
String VALUE = "value";
String LABEL = "label";
String TYPE = "type";
String COLOR = "color";
String STATUS = "status";
String INFO = "info";
String REL_ID = "relId";
String BEFORE = "before";
String AFTER = "after";
String SOURCE = "source";
String TARGET = "target";
String CHARSET = "charset";
String TOKEN = "token";
String SEQ = "seq";
String PATH = "path";
String ADDRESS = "address";
String MOD = "mod";
String COUNT = "count";
String DATE = "date";
String TIME = "time";
String LOCATION = "location";
String USER_AGENT = "userAgent";
String ERROR_MESSAGE = "errorMessage";
}

View File

@@ -1,16 +0,0 @@
package com.orion.visor.framework.common.constant;
/**
* 过滤器排序常量
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/6/16 17:04
*/
public interface FilterOrderConst {
int TRICE_ID_FILTER = Integer.MIN_VALUE + 1000;
int CORS_FILTER = Integer.MIN_VALUE + 2000;
}

View File

@@ -1,14 +0,0 @@
package com.orion.visor.framework.common.constant;
/**
* 拦截器排序常量
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/6/16 18:15
*/
public interface InterceptorOrderConst {
int LOG_FILTER = Integer.MIN_VALUE;
}

View File

@@ -1,18 +0,0 @@
package com.orion.visor.framework.common.constant;
/**
* 路径常量
*
* @author Jiahang Li
* @version 1.0.0
* @since 2024/4/17 10:35
*/
public interface PathConst {
String ERROR_LOG = "error.log";
String EXEC = "exec";
String SCRIPT = "script";
}

View File

@@ -1,14 +0,0 @@
package com.orion.visor.framework.common.constant;
/**
* 结果增强器 排序常量
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/6/29 16:09
*/
public interface ResponseAdviceOrderConst {
int WRAPPER = Integer.MIN_VALUE + 1000;
}

View File

@@ -1,20 +0,0 @@
package com.orion.visor.framework.common.constant;
/**
* 验证常量
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/10/20 11:45
*/
public interface ValidConst {
String USERNAME_4_32_PATTERN = "^[a-zA-Z0-9_]{4,32}$";
String USERNAME_4_32_MESSAGE = "只能为 4-32 位的数字,字母或下滑线";
String DICT_1_32_PATTERN = "^[a-zA-Z0-9_]{1,32}$";
String DICT_1_32_MESSAGE = "只能为 1-32 位的数字,字母或下滑线";
}

View File

@@ -1,40 +0,0 @@
package com.orion.visor.framework.common.crypto;
import com.orion.lang.utils.codec.Base62s;
import com.orion.lang.utils.crypto.symmetric.SymmetricCrypto;
/**
* 数据加密器
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/7/8 0:20
*/
public interface ValueCrypto extends SymmetricCrypto {
/**
* 初始化
*/
void init();
/**
* 加密后 base62 编码
*
* @param plain 明文
* @return 密文
*/
default String encryptBase62(String plain) {
return new String(Base62s.encode(this.encrypt(plain)));
}
/**
* base62 解码后解密
*
* @param text 密文
* @return 明文
*/
default String decryptBase62(String text) {
return new String(this.decrypt(Base62s.decode(text)));
}
}

View File

@@ -1,28 +0,0 @@
package com.orion.visor.framework.common.entity;
import com.orion.lang.define.wrapper.IPageRequest;
import com.orion.visor.framework.common.validator.group.Page;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Range;
/**
* 公共页码请求
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/7/12 23:14
*/
@Data
@Schema(description = "公共页码请求")
public class PageRequest implements IPageRequest {
@Range(min = 1, max = 10000, groups = Page.class)
@Schema(description = "页码")
private int page;
@Range(min = 1, max = 100, groups = Page.class)
@Schema(description = "大小")
private int limit;
}

View File

@@ -1,30 +0,0 @@
package com.orion.visor.framework.common.entity;
import lombok.Data;
/**
* 请求留痕模型
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/12/29 11:57
*/
@Data
public class RequestIdentityModel implements RequestIdentity {
/**
* 请求地址
*/
private String address;
/**
* 请求位置
*/
private String location;
/**
* userAgent
*/
private String userAgent;
}

View File

@@ -1,49 +0,0 @@
package com.orion.visor.framework.common.entity;
import java.util.List;
/**
* 树节点
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/11/23 16:52
*/
public interface TreeNode<T extends TreeNode<T>> {
/**
* id
*
* @return id
*/
Long getId();
/**
* parentId
*
* @return parentId
*/
Long getParentId();
/**
* sort
*
* @return sort
*/
Integer getSort();
/**
* children
*
* @return children
*/
List<T> getChildren();
/**
* 设置 children
*
* @param children children
*/
void setChildren(List<T> children);
}

View File

@@ -1,43 +0,0 @@
package com.orion.visor.framework.common.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 启用状态
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/10/12 16:02
*/
@Getter
@AllArgsConstructor
public enum EnableStatus {
/**
* 停用
*/
DISABLED(0),
/**
* 启用
*/
ENABLED(1),
;
private final Integer value;
public static EnableStatus of(Integer value) {
if (value == null) {
return null;
}
for (EnableStatus e : values()) {
if (e.value.equals(value)) {
return e;
}
}
return null;
}
}

View File

@@ -1,42 +0,0 @@
package com.orion.visor.framework.common.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 移动位置
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/11/13 17:26
*/
@Getter
@AllArgsConstructor
public enum MovePosition {
// 拖拽到目标元素上
TOP(-1),
// 拖拽到目标元素中
IN(0),
// 拖拽到目标元素下
BOTTOM(1),
;
private final Integer position;
public static MovePosition of(Integer position) {
if (position == null) {
return null;
}
for (MovePosition value : values()) {
if (value.position.equals(position)) {
return value;
}
}
return null;
}
}

View File

@@ -1,56 +0,0 @@
package com.orion.visor.framework.common.handler.data;
import com.alibaba.fastjson.JSON;
import com.orion.spring.SpringHolder;
import com.orion.visor.framework.common.handler.data.model.GenericsDataModel;
import com.orion.visor.framework.common.handler.data.strategy.MapDataStrategy;
/**
* 标准数据定义
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/12/21 0:07
*/
public interface GenericsDataDefinition {
/**
* 获取数据模型类型
*
* @return class
*/
Class<? extends GenericsDataModel> getModel();
/**
* 获取数据处理策略
*
* @return class
*/
Class<? extends MapDataStrategy<? extends GenericsDataModel>> getStrategy();
/**
* 获取数据模型策略处理器
*
* @param <Model> Model
* @param <Strategy> Strategy
* @return StrategyBean
*/
@SuppressWarnings("unchecked")
default <Model extends GenericsDataModel, Strategy extends MapDataStrategy<Model>> Strategy getStrategyBean() {
return (Strategy) SpringHolder.getBean(this.getStrategy());
}
/**
* 反序列化对象
*
* @param json json
* @param <Model> Model
* @return object
*/
@SuppressWarnings("unchecked")
default <Model extends GenericsDataModel> Model parse(String json) {
return (Model) JSON.parseObject(json, this.getModel());
}
}

View File

@@ -1,23 +0,0 @@
package com.orion.visor.framework.common.handler.data.model;
import com.alibaba.fastjson.JSON;
/**
* 标准数据模型
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/12/20 22:07
*/
public interface GenericsDataModel {
/**
* 序列化
*
* @return json
*/
default String serial() {
return JSON.toJSONString(this);
}
}

View File

@@ -1,68 +0,0 @@
package com.orion.visor.framework.common.handler.data.strategy;
import com.orion.visor.framework.common.handler.data.model.GenericsDataModel;
/**
* 标准数据处理策略
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/12/20 22:09
*/
public interface GenericsDataStrategy<Model extends GenericsDataModel, View> {
/**
* 获取默认值
*
* @return 默认值
*/
Model getDefault();
/**
* 更新填充
*
* @param beforeModel 修改前的配置
* @param afterModel 修改后的配置
*/
void updateFill(Model beforeModel, Model afterModel);
/**
* 预校验参数
*
* @param model model
*/
void preValid(Model model);
/**
* 校验参数
*
* @param model model
*/
void valid(Model model);
/**
* 执行完整验证链
* <p>
* preValid > updateFill > preValid
*
* @param beforeModel beforeModel
* @param afterModel afterModel
*/
default void doValidChain(Model beforeModel, Model afterModel) {
// 预校验参数
this.preValid(afterModel);
// 更新填充
this.updateFill(beforeModel, afterModel);
// 校验参数
this.valid(afterModel);
}
/**
* 转为视图配置
*
* @param model model
* @return 视图配置
*/
View toView(String model);
}

View File

@@ -1,22 +0,0 @@
package com.orion.visor.framework.common.handler.data.strategy;
import com.alibaba.fastjson.JSONObject;
import com.orion.visor.framework.common.handler.data.model.GenericsDataModel;
import java.util.Map;
/**
* map 数据处理策略
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/12/20 22:11
*/
public interface MapDataStrategy<Model extends GenericsDataModel> extends GenericsDataStrategy<Model, Map<String, Object>> {
@Override
default Map<String, Object> toView(String model) {
return JSONObject.parseObject(model);
}
}

View File

@@ -1,28 +0,0 @@
package com.orion.visor.framework.common.json.filter;
import com.alibaba.fastjson.serializer.PropertyFilter;
import com.orion.lang.utils.collect.Lists;
import java.util.List;
/**
* 字段忽略过滤器
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/10/12 11:21
*/
public class FieldIgnoreFilter implements PropertyFilter {
private final List<String> ignoreFields;
public FieldIgnoreFilter(List<String> ignoreFields) {
this.ignoreFields = ignoreFields;
}
@Override
public boolean apply(Object object, String name, Object value) {
return Lists.isEmpty(ignoreFields) || !ignoreFields.contains(name);
}
}

View File

@@ -1,33 +0,0 @@
package com.orion.visor.framework.common.lock;
import java.util.function.Supplier;
/**
* 分布式锁
*
* @author Jiahang Li
* @version 1.0.0
* @since 2024/5/16 12:24
*/
public interface Locker {
/**
* 尝试获取锁
*
* @param key key
* @param run run
* @return 是否获取到锁
*/
boolean tryLock(String key, Runnable run);
/**
* 尝试获取锁
*
* @param key key
* @param call call
* @param <T> T
* @return 执行结果
*/
<T> T tryLock(String key, Supplier<T> call);
}

View File

@@ -1,38 +0,0 @@
package com.orion.visor.framework.common.meta;
import com.alibaba.ttl.TransmittableThreadLocal;
/**
* traceId 持有者
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/6/16 17:35
*/
public class TraceIdHolder {
public static final String TRACE_ID_HEADER = "trace-id";
public static final String TRACE_ID_MDC = "tid";
private TraceIdHolder() {
}
/**
* 请求序列
*/
private static final ThreadLocal<String> HOLDER = new TransmittableThreadLocal<>();
public static String get() {
return HOLDER.get();
}
public static void set(String traceId) {
HOLDER.set(traceId);
}
public static void remove() {
HOLDER.remove();
}
}

View File

@@ -1,40 +0,0 @@
package com.orion.visor.framework.common.security;
import com.orion.lang.utils.Booleans;
import com.orion.lang.utils.Strings;
import com.orion.visor.framework.common.constant.Const;
import com.orion.visor.framework.common.utils.CryptoUtils;
/**
* 密码修改器
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/9/21 11:35
*/
public class PasswordModifier {
private PasswordModifier() {
}
/**
* 获取新密码
*
* @param action action
* @return password
*/
public static String getEncryptNewPassword(UpdatePasswordAction action) {
if (Booleans.isTrue(action.getUseNewPassword())) {
// 使用新密码
String password = action.getPassword();
if (Strings.isBlank(password)) {
return Const.EMPTY;
} else {
return CryptoUtils.encryptAsString(password);
}
} else {
return null;
}
}
}

View File

@@ -1,26 +0,0 @@
package com.orion.visor.framework.common.security;
/**
* SecurityUtils 的 bean 对象
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/7/7 15:20
*/
public interface SecurityHolder {
/**
* 获取当前用户
*
* @return 当前用户
*/
LoginUser getLoginUser();
/**
* 获取当前用户id
*
* @return id
*/
Long getLoginUserId();
}

View File

@@ -1,28 +0,0 @@
package com.orion.visor.framework.common.security;
import java.io.Serializable;
/**
* 更新密码操作
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/9/21 11:32
*/
public interface UpdatePasswordAction extends Serializable {
/**
* 是否使用新密码
*
* @return use
*/
Boolean getUseNewPassword();
/**
* 获取密码
*
* @return password
*/
String getPassword();
}

View File

@@ -1,28 +0,0 @@
package com.orion.visor.framework.common.security;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
/**
* 用户角色
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/11/20 23:39
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
@Schema(name = "UserRole", description = "用户角色")
public class UserRole {
@EqualsAndHashCode.Include
@Schema(description = "id")
private Long id;
@Schema(description = "角色")
private String code;
}

View File

@@ -1,33 +0,0 @@
package com.orion.visor.framework.common.thread;
import com.orion.visor.framework.common.utils.ThreadMdcUtils;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
/**
* 自动注入 MDC 异步线程池
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/7/10 15:16
*/
public class ThreadPoolMdcTaskExecutor extends ThreadPoolTaskExecutor {
@Override
public void execute(Runnable task) {
super.execute(ThreadMdcUtils.wrap(task));
}
@Override
public <T> Future<T> submit(Callable<T> task) {
return super.submit(ThreadMdcUtils.wrap(task));
}
@Override
public Future<?> submit(Runnable task) {
return super.submit(ThreadMdcUtils.wrap(task));
}
}

View File

@@ -1,28 +0,0 @@
package com.orion.visor.framework.common.utils;
import com.orion.lang.utils.time.Dates;
import com.orion.visor.framework.common.constant.Const;
/**
* 文件名称
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/8/31 17:57
*/
public class FileNames {
private FileNames() {
}
/**
* 导出文件名称
*
* @param title title
* @return name
*/
public static String exportName(String title) {
return title + "-" + Dates.current(Dates.YMD_HMS2) + "." + Const.SUFFIX_XLSX;
}
}

Some files were not shown because too many files have changed in this diff Show More