Compare commits

...

43 Commits

Author SHA1 Message Date
lijiahangmax
56eaf3d46f Merge pull request #6 from lijiahangmax/dev
Dev
2024-04-15 21:29:11 +08:00
lijiahangmax
3e0bef46aa 📝 修改文档. 2024-04-15 21:22:43 +08:00
lijiahangmax
f363f3f463 Merge remote-tracking branch 'origin/dev' into dev 2024-04-15 21:03:43 +08:00
lijiahangmax
fb81b2893b 📝 更新文档. 2024-04-15 21:03:28 +08:00
lijiahang
e8626fc484 修改配置. 2024-04-15 18:43:28 +08:00
lijiahang
3a05c82cde 📝 修改文档. 2024-04-15 16:18:03 +08:00
lijiahang
d7663466ea 🚀 修复构建问题. 2024-04-15 14:08:00 +08:00
lijiahang
a74f3d8789 📝 修改文档. 2024-04-15 14:01:20 +08:00
lijiahangmax
f63216cb44 Merge remote-tracking branch 'origin/dev' into dev 2024-04-14 23:47:59 +08:00
lijiahangmax
a7c62dc7bf 📝 更新文档. 2024-04-14 23:47:09 +08:00
lijiahangmax
46cdb060c4 🔖 升级版本 2024-04-14 23:17:03 +08:00
lijiahang
7e8e5d4d08 计划任务中断及清理. 2024-04-12 17:23:59 +08:00
lijiahang
b78d03b751 🚚 去除 cache query. 2024-04-12 16:41:58 +08:00
lijiahang
a4c5d25815 🔨 抽象执行日志. 2024-04-12 15:23:15 +08:00
lijiahang
40d0ec2025 计划任务选择模板. 2024-04-12 10:37:03 +08:00
lijiahangmax
c26e749b0c 🎨 执行模板交互优化. 2024-04-12 00:09:18 +08:00
lijiahangmax
d757e13b46 🚧 定时任务. 2024-04-12 00:07:36 +08:00
lijiahangmax
8d550b9057 🔨 计划任务详情. 2024-04-11 21:49:49 +08:00
lijiahang
ee7f1042a0 🔨 定时执行配置. 2024-04-11 19:14:20 +08:00
lijiahang
484cfb8f80 🔨 定时执行日志. 2024-04-11 12:12:24 +08:00
lijiahang
8d1be2ac15 🐛 修改执行权限. 2024-04-11 11:42:16 +08:00
lijiahangmax
ac6ccd5830 🎨 修改批量执行模块格式. 2024-04-11 00:21:42 +08:00
lijiahangmax
bcef835de3 🎨 修改批量执行模块格式. 2024-04-11 00:06:43 +08:00
lijiahangmax
e2c0b9c44a 📄 修订免责声明. 2024-04-10 23:27:12 +08:00
lijiahang
3249508808 🎨 修改执行模块代码结构. 2024-04-10 19:24:59 +08:00
lijiahang
31af860d7b 配置命令提示符. 2024-04-10 16:43:05 +08:00
lijiahang
3f1d56a8c2 🔨 定时执行. 2024-04-10 14:03:09 +08:00
lijiahang
0934703509 🔨 定时执行. 2024-04-09 18:41:07 +08:00
lijiahangmax
1771f05b65 🐛 修复配置性的问题. 2024-04-07 22:48:35 +08:00
lijiahang
c674860885 ⬆️ 升级 orion-kit 版本. 2024-04-07 18:59:43 +08:00
lijiahangmax
d1a73dc7d8 Merge remote-tracking branch 'origin/dev' into dev 2024-04-06 23:12:38 +08:00
lijiahangmax
3623e6bd4a 🔨 修改 defineProps 规范. 2024-04-06 23:11:30 +08:00
lijiahang
2209f08242 🔨 集成定时执行. 2024-04-03 11:00:18 +08:00
lijiahang
7050b438f9 获取 cron 下次执行时间. 2024-04-02 16:56:57 +08:00
lijiahang
812286a2e7 🎨 规范字段. 2024-04-02 16:22:10 +08:00
lijiahang
c90fa80090 🔨 定时执行. 2024-04-02 14:54:57 +08:00
lijiahang
7b26fb3aa9 📝 docs. 2024-04-01 19:05:13 +08:00
lijiahang
1ba3519e29 🔨 quartz 工具类. 2024-03-29 11:12:34 +08:00
lijiahangmax
247a688a7d 🚧 定时任务. 2024-03-28 12:05:30 +08:00
lijiahang
833ced5748 🎨 规范化 framework 配置. 2024-03-27 16:33:42 +08:00
lijiahang
e45908130c 🔧 修改 redisson 配置. 2024-03-27 15:30:03 +08:00
lijiahangmax
c23eb89e7e 🚧 定时任务. 2024-03-27 01:07:47 +08:00
lijiahangmax
eb75877ea6 🚧 定时任务. 2024-03-26 23:56:26 +08:00
299 changed files with 7997 additions and 2555 deletions

17
DISCLAIMER.md Normal file
View File

@@ -0,0 +1,17 @@
## 免责声明
> 欢迎您选择使用 orion-ops-pro以下简称「本项目」。在使用本项目前请您仔细阅读本免责声明并确保您已充分理解其中的内容。您的使用行为将视为对本声明全部内容的认可和接受。
> 本项目为一款开源免费的运维管理工具,采用 Apache 2.0 许可证授权。您可在遵守相关法律法规及许可证条款的前提下,自由修改和使用本项目。
1. 本项目尊重并保护所有用户的个人隐私权。本项目不会收集、存储或传输用户的任何个人信息。
2. 您承诺秉着合法、合理的原则使用本项目,不利用本项目进行任何违法、侵害他人合法利益等恶意的行为,亦不将本项目运用于任何违反我国法律法规的平台。
3. 任何单位或个人因下载使用本项目而产生的任何意外、疏忽、合约毁坏、诽谤、版权或知识产权侵犯及其造成的损失 (包括但不限于直接、间接、附带或衍生的损失等),本人不承担任何法律责任。
4. 用户明确并同意本声明条款列举的全部内容,对使用本项目可能存在的风险和相关后果将完全由用户自行承担,本人不承担任何法律责任。
5. 任何单位或个人在阅读本免责声明后应在《Apache 2.0
开源许可证》所允许的范围内进行合法的发布、传播和使用本项目等行为,若违反本免责声明条款或违反法律法规所造成的法律责任(包括但不限于民事赔偿和刑事责任),由违约者自行承担。
6. 本人对本项目拥有知识产权(包括但不限于商标权、专利权、著作权、商业秘密等),上述产品均受到相关法律法规的保护。
7. 任何单位或个人不得在未经本人书面授权的情况下对本项目本身申请相关的知识产权。
8. 如果本声明的任何部分被认为无效或不可执行,则该部分将被解释为反映本人的初衷,其余部分仍具有完全效力。不可执行的部分声明,并不构成我们放弃执行该声明的权利。
9. 本人有权随时对本声明条款及附件内容进行单方面的变更,并以消息推送、网页公告等方式予以公布,公布后立即自动生效,无需另行单独通知;若您在本声明内容公告变更后继续使用的,表示您已充分阅读、理解并接受修改后的声明内容。
10. 本人对本声明拥有最终解释权。

View File

@@ -2,7 +2,8 @@
<img style="margin-right: 8px;" src="https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/2/27/8c687ef1-5711-4a93-9db0-79c010af7902.png" width="32px" height="32px"/> orion-ops-pro 是什么
</h1>
`orion-ops-pro` 是一款现代化、高颜值的一站式智能运维管理平台集资产管理、资产授权、批量执行、Web终端、WebSftp、角色管理、系统管理等功能于一体致力于简化运维团队的治理工作。它是基于 `orion-ops`
`orion-ops-pro`
是一款现代化、高颜值的一站式智能运维管理平台集资产管理、资产授权、批量执行、计划任务、Web终端、WebSftp、角色管理、系统管理等功能于一体致力于简化运维团队的治理工作。它是基于 `orion-ops`
的产品思路进行重构,技术架构升级,并优化了交互逻辑,让操作更快捷更友好。
<p style="text-align: left">
@@ -28,7 +29,7 @@
<br/>
当前版本: **1.0.3**
当前版本: **1.0.4**
github: https://github.com/lijiahangmax/orion-ops-pro
gitee: https://gitee.com/lijiahangmax/orion-ops-pro
文档: https://lijiahangmax.gitee.io/orion-ops-pro/#/
@@ -48,11 +49,10 @@ demo: http://101.43.254.243:1081/
* 在线终端: 提供便捷的在线 Web 终端服务, 支持快捷命令、自定义快捷键和主题风格。
* 文件管理: 实现远程主机大文件的批量上传、下载和在线编辑等操作。
* 批量操作: 支持远程主机批量执行 shell 命令。
* 计划任务: 支持配置 cron 表达式, 定时执行主机 shell 命令。
* 操作日志: 记录用户操作日志,确保操作可追溯, 提高系统安全性。
* 可扩展性: 前后端代码规范统一、代码质量高、健壮且易于阅读和扩展。
[comment]: <> ( FIXME * 调度任务: 维护 cron 表达式, 定时执行主机命令)
## 快速开始
docker安装: https://lijiahangmax.gitee.io/orion-ops-pro/#/quickstart/docker-install
@@ -71,8 +71,6 @@ roadmap: https://lijiahangmax.gitee.io/orion-ops-pro/#/about/roadmap
* Vue3
* Arco Design
[//]: # ( fixme 免责声明 &#40;注意事项&#41; &#40;在使用平台之前, 请确保您已经了解并同意相关的使用协议和隐私政策。&#41; &#40;为了数据安全, 请定期备份数据和配置, 以防意外丢失或损坏。&#41;)
## 功能预览
> 工作台
@@ -99,6 +97,12 @@ roadmap: https://lijiahangmax.gitee.io/orion-ops-pro/#/about/roadmap
![执行日志](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/3/22/06d02d38-70ef-43c2-950c-9f8c73a105ba.png "执行日志")
![执行记录](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/3/22/0e474cc2-f7cf-49bc-be3c-f6445783ad7c.png "执行记录")
> 计划任务
![计划任务](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/4/15/ba5c0635-50c1-4c43-8062-3470ad33830e.png "计划任务")
![计划任务编辑](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/4/15/03176f22-0e21-4a07-8511-7b08211594d6.png "计划任务编辑")
![计划任务日志](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/4/15/1528c6a2-4813-4c3c-aa7b-f13a979065ba.png "计划任务日志")
> 用户管理
![用户列表](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/3/22/0d5f26e0-de4e-4342-800c-30a0d5d3078e.png "用户列表")
@@ -126,6 +130,10 @@ roadmap: https://lijiahangmax.gitee.io/orion-ops-pro/#/about/roadmap
🎁 为了项目能健康持续的发展, 我期望获得相应的资金支持, 你们的支持是我不断更新前进的动力!
## 免责声明
在使用本项目之前, 请确保您已经了解并同意相关的使用协议和隐私政策。[免责声明](https://github.com/lijiahangmax/orion-ops-pro/blob/main/DISCLAIMER.md)
## License
本项目遵循 [Apache-2.0](https://github.com/lijiahangmax/orion-ops-pro/blob/main/LICENSE) 开源许可证。

View File

@@ -1,7 +1,7 @@
version: '3.3'
services:
orion-ops-pro:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-pro:1.0.3
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-pro:1.0.4
ports:
- 1081:80
environment:

View File

@@ -5,5 +5,6 @@ COPY sql/init-3-data.sql /tmp
COPY docker/mysql/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-data.sql >> /tmp/init.sql && \
cat /tmp/init-3-schema-quartz.sql >> /tmp/init.sql && \
cat /tmp/init-4-data.sql >> /tmp/init.sql && \
cp /tmp/init.sql /docker-entrypoint-initdb.d

View File

@@ -1,3 +1,3 @@
mv ../../orion-ops-launch/target/orion-ops-launch.jar ./
mv ../../orion-ops-ui/dist ./dist
docker build -t orion-ops-pro:1.0.3 .
docker build -t orion-ops-pro:1.0.4 .

17
docs/DISCLAIMER.md Normal file
View File

@@ -0,0 +1,17 @@
## 免责声明
> 欢迎您选择使用 orion-ops-pro以下简称「本项目」。在使用本项目前请您仔细阅读本免责声明并确保您已充分理解其中的内容。您的使用行为将视为对本声明全部内容的认可和接受。
> 本项目为一款开源免费的运维管理工具,采用 Apache 2.0 许可证授权。您可在遵守相关法律法规及许可证条款的前提下,自由修改和使用本项目。
1. 本项目尊重并保护所有用户的个人隐私权。本项目不会收集、存储或传输用户的任何个人信息。
2. 您承诺秉着合法、合理的原则使用本项目,不利用本项目进行任何违法、侵害他人合法利益等恶意的行为,亦不将本项目运用于任何违反我国法律法规的平台。
3. 任何单位或个人因下载使用本项目而产生的任何意外、疏忽、合约毁坏、诽谤、版权或知识产权侵犯及其造成的损失 (包括但不限于直接、间接、附带或衍生的损失等),本人不承担任何法律责任。
4. 用户明确并同意本声明条款列举的全部内容,对使用本项目可能存在的风险和相关后果将完全由用户自行承担,本人不承担任何法律责任。
5. 任何单位或个人在阅读本免责声明后应在《Apache 2.0
开源许可证》所允许的范围内进行合法的发布、传播和使用本项目等行为,若违反本免责声明条款或违反法律法规所造成的法律责任(包括但不限于民事赔偿和刑事责任),由违约者自行承担。
6. 本人对本项目拥有知识产权(包括但不限于商标权、专利权、著作权、商业秘密等),上述产品均受到相关法律法规的保护。
7. 任何单位或个人不得在未经本人书面授权的情况下对本项目本身申请相关的知识产权。
8. 如果本声明的任何部分被认为无效或不可执行,则该部分将被解释为反映本人的初衷,其余部分仍具有完全效力。不可执行的部分声明,并不构成我们放弃执行该声明的权利。
9. 本人有权随时对本声明条款及附件内容进行单方面的变更,并以消息推送、网页公告等方式予以公布,公布后立即自动生效,无需另行单独通知;若您在本声明内容公告变更后继续使用的,表示您已充分阅读、理解并接受修改后的声明内容。
10. 本人对本声明拥有最终解释权。

View File

@@ -3,7 +3,7 @@
</h1>
`orion-ops-pro`
是一款现代化、高颜值的一站式智能运维管理平台集资产管理、资产授权、批量执行、Web终端、WebSftp、角色管理、系统管理等功能于一体致力于简化运维团队的治理工作。它是基于 `orion-ops`
是一款现代化、高颜值的一站式智能运维管理平台,集资产管理、资产授权、批量执行、计划任务、Web终端、WebSftp、角色管理、系统管理等功能于一体致力于简化运维团队的治理工作。它是基于 `orion-ops`
的产品思路进行重构,技术架构升级,并优化了交互逻辑,让操作更快捷更友好。
<p style="text-align: left">
@@ -29,7 +29,7 @@
<br/>
当前版本: **1.0.3**
当前版本: **1.0.4**
github: https://github.com/lijiahangmax/orion-ops-pro
gitee: https://gitee.com/lijiahangmax/orion-ops-pro
文档: https://lijiahangmax.gitee.io/orion-ops-pro/#/
@@ -49,6 +49,7 @@ demo: http://101.43.254.243:1081/
* 在线终端: 提供便捷的在线 Web 终端服务, 支持快捷命令、自定义快捷键和主题风格。
* 文件管理: 实现远程主机大文件的批量上传、下载和在线编辑等操作。
* 批量操作: 支持远程主机批量执行 shell 命令。
* 计划任务: 支持配置 cron 表达式, 定时执行主机 shell 命令。
* 操作日志: 记录用户操作日志,确保操作可追溯, 提高系统安全性。
* 可扩展性: 前后端代码规范统一、代码质量高、健壮且易于阅读和扩展。
@@ -70,8 +71,6 @@ roadmap: https://lijiahangmax.gitee.io/orion-ops-pro/#/about/roadmap
* Vue3
* Arco Design
[//]: # ( fixme 免责声明 &#40;注意事项&#41; &#40;在使用平台之前, 请确保您已经了解并同意相关的使用协议和隐私政策。&#41; &#40;为了数据安全, 请定期备份数据和配置, 以防意外丢失或损坏。&#41;)
## 功能预览
> 工作台
@@ -98,6 +97,12 @@ roadmap: https://lijiahangmax.gitee.io/orion-ops-pro/#/about/roadmap
![执行日志](./assert/img/batch_exec_log.png "执行日志")
![执行记录](./assert/img/batch_exec_record.png "执行记录")
> 计划任务
![计划任务](./assert/img/exec_job.png "计划任务")
![计划任务编辑](./assert/img/exec_job_edit.png "计划任务编辑")
![计划任务日志](./assert/img/exec_job_log.png "计划任务日志")
> 用户管理
![用户列表](./assert/img/user_list.png "用户列表")
@@ -125,6 +130,10 @@ roadmap: https://lijiahangmax.gitee.io/orion-ops-pro/#/about/roadmap
🎁 为了项目能健康持续的发展, 我期望获得相应的资金支持, 你们的支持是我不断更新前进的动力!
## 免责声明
在使用本项目之前, 请确保您已经了解并同意相关的使用协议和隐私政策。[免责声明](DISCLAIMER.md)
## License
本项目遵循 [Apache-2.0](https://github.com/lijiahangmax/orion-ops-pro/blob/main/LICENSE) 开源许可证。

View File

@@ -1,4 +1,4 @@
# orion-ops-pro <small>1.0.3</small>
# orion-ops-pro <small>1.0.4</small>
> 一款开箱即用的运维平台。

View File

@@ -1,7 +1,6 @@
* 关于
* [Roadmap](about/roadmap.md)
* [更新日志](about/change-log.md)
* [如何升级](about/update.md)
* 快速开始
* [docker安装](quickstart/docker-install.md)
* [普通安装](quickstart/install.md)
@@ -10,6 +9,7 @@
* 操作手册
* [资产管理](operator/asset.md)
* [主机运维](operator/host-ops.md)
* [命令执行](operator/exec.md)
* [运维审计](operator/asset-audit.md)
* [用户管理](operator/user.md)
* [系统管理](operator/system.md)

View File

@@ -1,5 +1,29 @@
> 版本号严格遵循 Semver 规范。
⚡ 注意: 应用不支持跨版本升级, 可以进行多次升级
## v1.0.4
`2024-04-15` `release`
* 🚀 升级 `orion-kit``1.0.7`
* 🐞 修复 批量执行选择模板后默认参数未自动设置
* 🐞 修复 主机列表卡片视图重置条件后 tag 消失
* 🐞 修复 主机分组授权页面刷新不显示 loading
* 🐞 修复 面包屑组件路径显示不全的问题
* 🐞 修复 数据字典历史提示无权限
* 🐞 修复 批量执行较短命令日志不显示
* 🩰 修改 主机终端亮色模式配色
* 🩰 修改 执行模板 UI 修改
* 🌈 新增 计划任务模块
* 🌈 新增 计划任务日志模块
* 🔨 添加 quartz 配置
* 🔨 修改 redisson 配置
* 🔨 优化 orion-ops-framework 配置规范化
* 🔨 优化 前端 props 命名规范化
[如何升级](/update/v1.0.4.md)
## v1.0.3
`2024-03-25` `release`
@@ -10,12 +34,12 @@
* 🐞 修复 工作台页面快捷操作面板会展示隐藏的菜单
* 🐞 修复 主机终端无法粘贴 (浏览器安全策略)
* 🐞 修复 卡片列表组件控制台 warn 提示
* 🐞 修复 关闭终端时控制台提示 handleResize 错误信息
* 🐞 修复 关闭终端时控制台提示 handleResize 错误信息
* 🔨 修改 系统菜单渲染逻辑 (移除 JSX 构建时不会提示 JSX.IntrinsicElements)
[如何升级](/about/update.md?id=_v103)
[如何升级](/update/v1.0.3.md)
## v1.0.3
## v1.0.2
`2024-03-22` `release`
@@ -32,7 +56,7 @@
* 🌈 新增 命令执行日志
* 🌈 新增 执行模板功能
[如何升级](/about/update.md?id=_v102)
[如何升级](/update/v1.0.2.md)
## v1.0.1
@@ -47,7 +71,7 @@
* 🌈 新增 用户操作日志日志删除/清理
* 🔨 优化 用户锁定次数/时间可配置
[如何升级](/about/update.md?id=_v101)
[如何升级](/update/v1.0.1.md)
## v1.0.0
@@ -56,7 +80,7 @@
* 🌈 新增 用户自定义终端标签颜色
* 🔨 拓展数据模块添加缓存
[如何升级](/about/update.md?id=_v100)
[如何升级](/update/v1.0.0.md)
## v1.0.0-beta.1

View File

@@ -1,17 +1,23 @@
## 功能排期 ⏳
* 定时执行
* 文件夹书签
* tracker 使用配置文件
* 文件重复删除/重命名 可配置
* tracker 可配置
* 断开连接后回车重新连接
* template 配置默认主机
* 定时删除未引用的 tag
* 管理员也需要自行授权资产
* 使用文件执行命令
* 主机身份类型
* 文件夹书签
* 批量上传
* 优化文件传输列表进度显示
* 终端断开连接后回车重新连接
* 站内消息
* 终端背景图片
* 资产授权 UI 改版
* RDP 远程桌面
* 接入 config 后端动态配置
* 文档中巡检模板
* 批量执行 模板 定时任务 配置是否使用文件执行
* 使用 vite press 开发文档
## 已知问题 🐞

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

View File

@@ -7,7 +7,7 @@
* 删除: 删除连接记录
* 清理: 根据条件清理数据
### SFTP 操作日志
### 文件操作日志
查看用户 SFTP 操作日志, 是从用户操作日志中过滤查询。

92
docs/operator/exec.md Normal file
View File

@@ -0,0 +1,92 @@
### 批量执行
批量执行 ssh 主机 shell 脚本。
* 重置: 重置全部参数
* 执行: 执行所输入的命令
* 返回: 返回到执行命令页面
* 从模板中选择: 从模板中选择需要执行的命令
* 执行历史: 点击历史命令可以快速填入
### 批量执行日志
查看批量执行任务日志。
* 执行命令: 跳转到批量执行页面
* 清空: 清空执行日志
* 删除: 删除执行日志
* 重新执行: 重新执行此命令
* 命令: 查看执行时的命令
* 参数: 查看执行时的参数
* 中断: 中断命令执行
* 日志: 查看执行日志, ctrl + 左键点击会用新页面打开
* 下载: 下载执行日志
### 计划任务
维护计划任务, 定时执行命令。
* 新增: 新增计划任务
* 详情: 查看计划任务详情
* 修改: 修改计划任务
* 状态: 修改计划任务状态
* 手动触发: 手动触发计划任务
* 删除: 删除计划任务
### 计划任务日志
查看计划任务执行日志
* 清空: 清空执行日志
* 删除: 删除执行日志
* 命令: 查看执行时的命令
* 参数: 查看执行时的参数
* 中断: 中断命令执行
* 日志: 查看执行日志, ctrl + 左键点击会用新页面打开
* 下载: 下载执行日志
### 执行模板
用来维护批量执行的命令模板, 支持动态参数, 使用 `@{{ xxx }}` 来替换命令参数。
* 新增: 新增执行模板
* 执行: 打开命令执行框并且带入模板参数
* 修改: 修改执行模板
* 删除: 删除执行模板
> 日志面板快捷键
* 回车: `Enter`
* 向上滚动一行: `↑`
* 向上滚动一页: `Home`
* 向下滚动一行: `↓`
* 向下滚动一页: `End`
* 全选: `ctrl` `A`
* 复制: `ctrl` `C`
* 搜索: `ctrl` `F`
* 清空: `ctrl` `L`
> 命令内置参数
⚡ 使用 `@{{ xxx }}` 来替换命令参数
| 参数 | 描述 |
|:----------------|:--------------------------|
| source | 执行来源 (BATCH/JOB) |
| sourceId | 执行来源id (JOB特有) |
| seq | 执行序列 (JOB特有) |
| execId | 执行记录id |
| hostId | 执行主机id |
| hostName | 执行主机名称 |
| hostCode | 执行主机编码 |
| hostAddress | 执行主机地址 |
| userId | 执行用户id |
| username | 执行用户名 |
| uuid | 生成任务维度 uuid |
| uuidShort | 生成任务维度 uuid 无 '-' |
| hostUuid | 生成机器维度 uuid |
| hostUuidShort | 生成机器维度 uuid 无 '-' |
| timestampMillis | 时间戳毫秒 |
| timestamp | 时间戳 |
| date | 执行时间 yyyy-MM-dd |
| datetime | 执行时间 yyyy-MM-dd HH:mm :ss |

View File

@@ -42,70 +42,3 @@
> 终端面板
⭐ 双击终端标签可快速复制会话
### 批量执行
批量执行 ssh 主机 shell 脚本。
##### 日志面板中有几个内置的快捷键
* 回车: `Enter`
* 向上滚动一行: `↑`
* 向上滚动一页: `Home`
* 向下滚动一行: `↓`
* 向下滚动一页: `End`
* 全选: `ctrl` `A`
* 复制: `ctrl` `C`
* 搜索: `ctrl` `F`
* 清空: `ctrl` `L`
⭐ 内置参数同执行模板参数
* 重置: 重置全部参数
* 执行: 执行所输入的命令
* 返回: 返回到执行命令页面
* 从模板中选择: 从模板中选择需要执行的命令
* 执行历史: 点击历史命令可以快速填入
### 执行记录
查看批量执行任务记录。
* 执行命令: 跳转到批量执行页面
* 清空: 清空执行记录
* 删除: 删除执行记录
* 重新执行: 重新执行此命令
* 命令: 查看执行时的命令
* 参数: 查看执行时的参数
* 日志: 查看执行日志, ctrl + 左键点击会用新页面打开
* 下载: 下载执行日志
### 执行模板
用来维护批量执行的命令模板, 支持动态参数, 使用 `@{{ xxx }}` 来替换命令参数。
* 新增: 新增执行模板
* 执行: 打开命令执行框并且带入模板参数
* 修改: 修改执行模板
* 删除: 删除执行模板
> 内置参数
| 参数 | 描述 |
|:----------------|:-------------------------|
| execId | 执行记录id |
| hostId | 执行主机id |
| hostName | 执行主机名称 |
| hostCode | 执行主机编码 |
| hostAddress | 执行主机地址 |
| userId | 执行用户id |
| username | 执行用户名 |
| uuid | 生成任务维度 uuid |
| uuidShort | 生成任务维度 uuid 无 '-' |
| hostUuid | 生成机器维度 uuid |
| hostUuidShort | 生成机器维度 uuid 无 '-' |
| timestampMillis | 时间戳毫秒 |
| timestamp | 时间戳 |
| date | 执行时间 yyyy-MM-dd |
| datetime | 执行时间 yyyy-MM-dd HH:mm:ss |

22
docs/update/v1.0.0.md Normal file
View File

@@ -0,0 +1,22 @@
## v1.0.0
> sql 脚本 - DML
```sql
-- 字典配置项
DELETE FROM `dict_key` WHERE id >= 32;
INSERT INTO `dict_key` VALUES (32, 'terminalTabColor', 'COLOR', '[]', '终端标签页颜色', '2024-03-01 15:01:44', '2024-03-01 15:01:44', '1', '1', 0);
-- 字典配置值
DELETE FROM `dict_value` WHERE id >= 203;
INSERT INTO `dict_value` VALUES (203, 32, 'terminalTabColor', 'rgb(var(--red-6))', '红色', '{}', 10, '2024-03-01 15:07:41', '2024-03-01 15:07:41', '1', '1', 0);
INSERT INTO `dict_value` VALUES (204, 32, 'terminalTabColor', 'rgb(var(--orange-6))', '橙色', '{}', 20, '2024-03-01 15:07:55', '2024-03-01 15:07:55', '1', '1', 0);
INSERT INTO `dict_value` VALUES (205, 32, 'terminalTabColor', 'rgb(var(--yellow-6))', '黄色', '{}', 30, '2024-03-01 15:08:13', '2024-03-01 15:08:13', '1', '1', 0);
INSERT INTO `dict_value` VALUES (206, 32, 'terminalTabColor', 'rgb(var(--green-6))', '绿色', '{}', 40, '2024-03-01 15:08:23', '2024-03-01 15:08:23', '1', '1', 0);
INSERT INTO `dict_value` VALUES (207, 32, 'terminalTabColor', 'rgb(var(--cyan-6))', '青色', '{}', 50, '2024-03-01 15:08:46', '2024-03-01 15:08:46', '1', '1', 0);
INSERT INTO `dict_value` VALUES (208, 32, 'terminalTabColor', 'rgb(var(--blue-6))', '浅蓝', '{}', 60, '2024-03-01 15:11:01', '2024-03-01 15:11:01', '1', '1', 0);
INSERT INTO `dict_value` VALUES (209, 32, 'terminalTabColor', 'rgb(var(--arcoblue-6))', '蓝色', '{}', 70, '2024-03-01 15:11:11', '2024-03-01 15:11:11', '1', '1', 0);
INSERT INTO `dict_value` VALUES (210, 32, 'terminalTabColor', 'rgb(var(--purple-6))', '紫色', '{}', 80, '2024-03-01 15:11:20', '2024-03-01 15:11:20', '1', '1', 0);
INSERT INTO `dict_value` VALUES (211, 32, 'terminalTabColor', 'rgb(var(--pinkpurple-6))', '粉紫', '{}', 90, '2024-03-01 15:11:41', '2024-03-01 15:11:41', '1', '1', 0);
INSERT INTO `dict_value` VALUES (213, 32, 'terminalTabColor', 'rgb(var(--gray-6))', '灰色', '{}', 100, '2024-03-01 15:12:01', '2024-03-01 15:39:34', '1', '1', 0);
```

51
docs/update/v1.0.1.md Normal file
View File

@@ -0,0 +1,51 @@
## v1.0.1
> sql 脚本 - DDL
```sql
DROP TABLE IF EXISTS `command_template`;
ALTER TABLE `operator_log` ADD INDEX `idx_type`(`type`);
```
> sql 脚本 - DML
```sql
-- 菜单配置
DELETE FROM `system_menu` WHERE id >= 148;
INSERT INTO `system_menu` VALUES (148, 152, '连接日志', NULL, 2, 10, 1, 1, 1, 0, 'IconLink', NULL, 'assetAuditConnectLog', '2023-12-26 22:53:07', '2024-03-05 23:31:23', '1', '1', 0);
INSERT INTO `system_menu` VALUES (149, 148, '查询连接日志', 'asset:host-connect-log:management:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-12-26 22:53:08', '2024-03-04 13:40:42', '1', '1', 0);
INSERT INTO `system_menu` VALUES (152, 0, '运维审计', NULL, 1, 410, 1, 1, 1, 0, 'IconSafe', NULL, 'assetAudit', '2024-01-04 17:54:56', '2024-03-05 23:31:10', '1', '1', 0);
INSERT INTO `system_menu` VALUES (153, 148, '删除连接日志', 'asset:host-connect-log:management:delete', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 13:39:46', '2024-03-04 13:40:29', '1', '1', 0);
INSERT INTO `system_menu` VALUES (154, 148, '清空连接日志', 'asset:host-connect-log:management:clear', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 13:40:05', '2024-03-04 13:40:34', '1', '1', 0);
INSERT INTO `system_menu` VALUES (155, 148, '强制断开连接', 'asset:host-connect-log:management:force-offline', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 13:41:02', '2024-03-05 23:32:01', '1', '1', 0);
INSERT INTO `system_menu` VALUES (156, 122, '删除操作日志', 'infra:operator-log:delete', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 17:06:55', '2024-03-04 17:08:22', '1', '1', 0);
INSERT INTO `system_menu` VALUES (157, 122, '清空操作日志', 'infra:operator-log:clear', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 17:07:25', '2024-03-04 17:08:27', '1', '1', 0);
INSERT INTO `system_menu` VALUES (158, 152, 'SFTP 操作日志', NULL, 2, 20, 1, 1, 1, 0, 'IconFile', NULL, 'assetAuditSftpLog', '2024-03-05 15:30:13', '2024-03-05 23:31:32', '1', '1', 0);
INSERT INTO `system_menu` VALUES (159, 158, '查询 SFTP 操作日志', 'asset:host-sftp-log:management:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-05 15:31:02', '2024-03-05 15:57:20', '1', '1', 0);
INSERT INTO `system_menu` VALUES (160, 158, '删除 SFTP 操作日志', 'asset:host-sftp-log:management:delete', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-05 15:31:17', '2024-03-05 15:57:30', '1', '1', 0);
-- 字典配置项
DELETE FROM `dict_key` WHERE id >= 33;
INSERT INTO `dict_key` VALUES (33, 'sftpOperatorType', 'STRING', '[]', 'SFTP 操作类型', '2024-03-05 16:49:54', '2024-03-05 16:49:54', '1', '1', 0);
-- 字典配置值
DELETE FROM `dict_value` WHERE id >= 214;
INSERT INTO `dict_value` VALUES (214, 28, 'hostConnectStatus', 'FORCE_OFFLINE', '强制下线', '{\"color\": \"rgb(var(--red-6))\"}', 40, '2024-03-04 12:51:13', '2024-03-04 12:51:13', '1', '1', 0);
INSERT INTO `dict_value` VALUES (215, 1, 'operatorLogModule', 'asset:host-connect-log', '主机连接日志', '{}', 2060, '2024-03-04 13:43:33', '2024-03-04 13:43:33', '1', '1', 0);
INSERT INTO `dict_value` VALUES (216, 2, 'operatorLogType', 'host-connect-log:delete', '删除记录', '{}', 10, '2024-03-04 13:44:34', '2024-03-04 13:44:34', '1', '1', 0);
INSERT INTO `dict_value` VALUES (217, 2, 'operatorLogType', 'host-connect-log:clear', '清空记录', '{}', 20, '2024-03-04 13:45:07', '2024-03-04 14:22:08', '1', '1', 0);
INSERT INTO `dict_value` VALUES (218, 2, 'operatorLogType', 'host-connect-log:force-offline', '强制下线', '{}', 30, '2024-03-04 13:45:36', '2024-03-04 13:45:36', '1', '1', 0);
INSERT INTO `dict_value` VALUES (219, 1, 'operatorLogModule', 'infra:operator-log', '操作日志', '{}', 1060, '2024-03-04 16:32:11', '2024-03-04 16:32:11', '1', '1', 0);
INSERT INTO `dict_value` VALUES (220, 2, 'operatorLogType', 'operator-log:delete', '删除操作日志', '{}', 10, '2024-03-04 16:33:11', '2024-03-04 16:33:44', '1', '1', 0);
INSERT INTO `dict_value` VALUES (221, 2, 'operatorLogType', 'operator-log:clear', '清空操作日志', '{}', 20, '2024-03-04 16:33:31', '2024-03-04 16:33:31', '1', '1', 0);
INSERT INTO `dict_value` VALUES (222, 2, 'operatorLogType', 'host-terminal:delete-sftp-log', '删除SFTP操作日志', '{}', 15, '2024-03-05 15:28:00', '2024-03-05 17:40:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (223, 33, 'sftpOperatorType', 'host-terminal:sftp-mkdir', '创建文件夹', '{}', 10, '2024-03-05 16:50:17', '2024-03-05 16:50:17', '1', '1', 0);
INSERT INTO `dict_value` VALUES (224, 33, 'sftpOperatorType', 'host-terminal:sftp-touch', '创建文件', '{}', 20, '2024-03-05 16:50:27', '2024-03-05 16:50:27', '1', '1', 0);
INSERT INTO `dict_value` VALUES (225, 33, 'sftpOperatorType', 'host-terminal:sftp-move', '移动文件', '{}', 30, '2024-03-05 16:50:41', '2024-03-05 16:50:41', '1', '1', 0);
INSERT INTO `dict_value` VALUES (226, 33, 'sftpOperatorType', 'host-terminal:sftp-remove', '删除文件', '{}', 40, '2024-03-05 16:50:53', '2024-03-05 16:50:53', '1', '1', 0);
INSERT INTO `dict_value` VALUES (227, 33, 'sftpOperatorType', 'host-terminal:sftp-truncate', '截断文件', '{}', 50, '2024-03-05 16:51:04', '2024-03-05 16:51:04', '1', '1', 0);
INSERT INTO `dict_value` VALUES (228, 33, 'sftpOperatorType', 'host-terminal:sftp-chmod', '文件提权', '{}', 60, '2024-03-05 16:51:15', '2024-03-05 16:51:15', '1', '1', 0);
INSERT INTO `dict_value` VALUES (229, 33, 'sftpOperatorType', 'host-terminal:sftp-set-content', '修改文件内容', '{}', 70, '2024-03-05 16:51:30', '2024-03-05 16:51:48', '1', '1', 0);
INSERT INTO `dict_value` VALUES (230, 33, 'sftpOperatorType', 'host-terminal:sftp-upload', '上传文件', '{}', 80, '2024-03-05 16:52:06', '2024-03-05 16:52:06', '1', '1', 0);
INSERT INTO `dict_value` VALUES (231, 33, 'sftpOperatorType', 'host-terminal:sftp-download', '下载文件', '{}', 90, '2024-03-05 16:52:18', '2024-03-05 16:52:18', '1', '1', 0);
```

View File

@@ -1,19 +1,8 @@
⚡ 注意: 应用不支持跨版本升级, 可以进行多次升级
## v1.0.3
> sql 脚本
```sql
DELETE FROM preference WHERE type = 'TERMINAL';
```
## v1.0.2
> sql 脚本
> sql 脚本 - DDL
```sql
-- 表结构
ALTER TABLE `host_connect_log`
MODIFY COLUMN `start_time` datetime(3) NULL DEFAULT NULL COMMENT '开始时间' AFTER `token`,
MODIFY COLUMN `end_time` datetime(3) NULL DEFAULT NULL COMMENT '结束时间' AFTER `start_time`;
@@ -92,7 +81,11 @@ CREATE TABLE `exec_template`
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '执行模板'
ROW_FORMAT = Dynamic;
```
> sql 脚本 - DML
```sql
-- 菜单配置
TRUNCATE `system_menu`;
INSERT INTO `system_menu` VALUES (1, 0, '工作台', NULL, 1, 10, 1, 1, 1, 0, 'IconComputer', NULL, 'workplace', '2023-07-28 10:51:50', '2023-09-11 15:27:52', '1', '1', 0);
@@ -220,64 +213,3 @@ INSERT INTO `dict_value` VALUES (251, 2, 'operatorLogType', 'exec:interrupt-host
INSERT INTO `dict_value` VALUES (252, 2, 'operatorLogType', 'exec:download-host-log', '下载执行日志', '{}', 70, '2024-03-18 17:25:44', '2024-03-18 17:26:49', '1', '1', 0);
INSERT INTO `dict_value` VALUES (253, 35, 'execHostStatus', 'TIMEOUT', '执行超时', '{\"color\": \"orangered\", \"execColor\": \"#fA8C16\"}', 50, '2024-03-19 19:05:56', '2024-03-19 19:08:14', '1', '1', 0);
```
## v1.0.1
> sql 脚本
```sql
DROP TABLE IF EXISTS `command_template`;
ALTER TABLE `operator_log` ADD INDEX `idx_type`(`type`);
-- 菜单配置
DELETE FROM `system_menu` WHERE id IN (148, 149);
INSERT INTO `system_menu` VALUES (148, 152, '连接日志', NULL, 2, 10, 1, 1, 1, 0, 'IconLink', NULL, 'assetAuditConnectLog', '2023-12-26 22:53:07', '2024-03-05 23:31:23', '1', '1', 0);
INSERT INTO `system_menu` VALUES (149, 148, '查询连接日志', 'asset:host-connect-log:management:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-12-26 22:53:08', '2024-03-04 13:40:42', '1', '1', 0);
INSERT INTO `system_menu` VALUES (152, 0, '运维审计', NULL, 1, 410, 1, 1, 1, 0, 'IconSafe', NULL, 'assetAudit', '2024-01-04 17:54:56', '2024-03-05 23:31:10', '1', '1', 0);
INSERT INTO `system_menu` VALUES (153, 148, '删除连接日志', 'asset:host-connect-log:management:delete', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 13:39:46', '2024-03-04 13:40:29', '1', '1', 0);
INSERT INTO `system_menu` VALUES (154, 148, '清空连接日志', 'asset:host-connect-log:management:clear', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 13:40:05', '2024-03-04 13:40:34', '1', '1', 0);
INSERT INTO `system_menu` VALUES (155, 148, '强制断开连接', 'asset:host-connect-log:management:force-offline', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 13:41:02', '2024-03-05 23:32:01', '1', '1', 0);
INSERT INTO `system_menu` VALUES (156, 122, '删除操作日志', 'infra:operator-log:delete', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 17:06:55', '2024-03-04 17:08:22', '1', '1', 0);
INSERT INTO `system_menu` VALUES (157, 122, '清空操作日志', 'infra:operator-log:clear', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 17:07:25', '2024-03-04 17:08:27', '1', '1', 0);
INSERT INTO `system_menu` VALUES (158, 152, 'SFTP 操作日志', NULL, 2, 20, 1, 1, 1, 0, 'IconFile', NULL, 'assetAuditSftpLog', '2024-03-05 15:30:13', '2024-03-05 23:31:32', '1', '1', 0);
INSERT INTO `system_menu` VALUES (159, 158, '查询 SFTP 操作日志', 'asset:host-sftp-log:management:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-05 15:31:02', '2024-03-05 15:57:20', '1', '1', 0);
INSERT INTO `system_menu` VALUES (160, 158, '删除 SFTP 操作日志', 'asset:host-sftp-log:management:delete', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-05 15:31:17', '2024-03-05 15:57:30', '1', '1', 0);
-- 字典配置项
INSERT INTO `dict_key` VALUES (33, 'sftpOperatorType', 'STRING', '[]', 'SFTP 操作类型', '2024-03-05 16:49:54', '2024-03-05 16:49:54', '1', '1', 0);
-- 字典配置值
INSERT INTO `dict_value` VALUES (214, 28, 'hostConnectStatus', 'FORCE_OFFLINE', '强制下线', '{\"color\": \"rgb(var(--red-6))\"}', 40, '2024-03-04 12:51:13', '2024-03-04 12:51:13', '1', '1', 0);
INSERT INTO `dict_value` VALUES (215, 1, 'operatorLogModule', 'asset:host-connect-log', '主机连接日志', '{}', 2060, '2024-03-04 13:43:33', '2024-03-04 13:43:33', '1', '1', 0);
INSERT INTO `dict_value` VALUES (216, 2, 'operatorLogType', 'host-connect-log:delete', '删除记录', '{}', 10, '2024-03-04 13:44:34', '2024-03-04 13:44:34', '1', '1', 0);
INSERT INTO `dict_value` VALUES (217, 2, 'operatorLogType', 'host-connect-log:clear', '清空记录', '{}', 20, '2024-03-04 13:45:07', '2024-03-04 14:22:08', '1', '1', 0);
INSERT INTO `dict_value` VALUES (218, 2, 'operatorLogType', 'host-connect-log:force-offline', '强制下线', '{}', 30, '2024-03-04 13:45:36', '2024-03-04 13:45:36', '1', '1', 0);
INSERT INTO `dict_value` VALUES (219, 1, 'operatorLogModule', 'infra:operator-log', '操作日志', '{}', 1060, '2024-03-04 16:32:11', '2024-03-04 16:32:11', '1', '1', 0);
INSERT INTO `dict_value` VALUES (220, 2, 'operatorLogType', 'operator-log:delete', '删除操作日志', '{}', 10, '2024-03-04 16:33:11', '2024-03-04 16:33:44', '1', '1', 0);
INSERT INTO `dict_value` VALUES (221, 2, 'operatorLogType', 'operator-log:clear', '清空操作日志', '{}', 20, '2024-03-04 16:33:31', '2024-03-04 16:33:31', '1', '1', 0);
INSERT INTO `dict_value` VALUES (222, 2, 'operatorLogType', 'host-terminal:delete-sftp-log', '删除SFTP操作日志', '{}', 15, '2024-03-05 15:28:00', '2024-03-05 17:40:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (223, 33, 'sftpOperatorType', 'host-terminal:sftp-mkdir', '创建文件夹', '{}', 10, '2024-03-05 16:50:17', '2024-03-05 16:50:17', '1', '1', 0);
INSERT INTO `dict_value` VALUES (224, 33, 'sftpOperatorType', 'host-terminal:sftp-touch', '创建文件', '{}', 20, '2024-03-05 16:50:27', '2024-03-05 16:50:27', '1', '1', 0);
INSERT INTO `dict_value` VALUES (225, 33, 'sftpOperatorType', 'host-terminal:sftp-move', '移动文件', '{}', 30, '2024-03-05 16:50:41', '2024-03-05 16:50:41', '1', '1', 0);
INSERT INTO `dict_value` VALUES (226, 33, 'sftpOperatorType', 'host-terminal:sftp-remove', '删除文件', '{}', 40, '2024-03-05 16:50:53', '2024-03-05 16:50:53', '1', '1', 0);
INSERT INTO `dict_value` VALUES (227, 33, 'sftpOperatorType', 'host-terminal:sftp-truncate', '截断文件', '{}', 50, '2024-03-05 16:51:04', '2024-03-05 16:51:04', '1', '1', 0);
INSERT INTO `dict_value` VALUES (228, 33, 'sftpOperatorType', 'host-terminal:sftp-chmod', '文件提权', '{}', 60, '2024-03-05 16:51:15', '2024-03-05 16:51:15', '1', '1', 0);
INSERT INTO `dict_value` VALUES (229, 33, 'sftpOperatorType', 'host-terminal:sftp-set-content', '修改文件内容', '{}', 70, '2024-03-05 16:51:30', '2024-03-05 16:51:48', '1', '1', 0);
INSERT INTO `dict_value` VALUES (230, 33, 'sftpOperatorType', 'host-terminal:sftp-upload', '上传文件', '{}', 80, '2024-03-05 16:52:06', '2024-03-05 16:52:06', '1', '1', 0);
INSERT INTO `dict_value` VALUES (231, 33, 'sftpOperatorType', 'host-terminal:sftp-download', '下载文件', '{}', 90, '2024-03-05 16:52:18', '2024-03-05 16:52:18', '1', '1', 0);
```
## v1.0.0
> sql 脚本
```sql
INSERT INTO `dict_key` VALUES (32, 'terminalTabColor', 'COLOR', '[]', '终端标签页颜色', '2024-03-01 15:01:44', '2024-03-01 15:01:44', '1', '1', 0);
INSERT INTO `dict_value` VALUES (203, 32, 'terminalTabColor', 'rgb(var(--red-6))', '红色', '{}', 10, '2024-03-01 15:07:41', '2024-03-01 15:07:41', '1', '1', 0);
INSERT INTO `dict_value` VALUES (204, 32, 'terminalTabColor', 'rgb(var(--orange-6))', '橙色', '{}', 20, '2024-03-01 15:07:55', '2024-03-01 15:07:55', '1', '1', 0);
INSERT INTO `dict_value` VALUES (205, 32, 'terminalTabColor', 'rgb(var(--yellow-6))', '黄色', '{}', 30, '2024-03-01 15:08:13', '2024-03-01 15:08:13', '1', '1', 0);
INSERT INTO `dict_value` VALUES (206, 32, 'terminalTabColor', 'rgb(var(--green-6))', '绿色', '{}', 40, '2024-03-01 15:08:23', '2024-03-01 15:08:23', '1', '1', 0);
INSERT INTO `dict_value` VALUES (207, 32, 'terminalTabColor', 'rgb(var(--cyan-6))', '青色', '{}', 50, '2024-03-01 15:08:46', '2024-03-01 15:08:46', '1', '1', 0);
INSERT INTO `dict_value` VALUES (208, 32, 'terminalTabColor', 'rgb(var(--blue-6))', '浅蓝', '{}', 60, '2024-03-01 15:11:01', '2024-03-01 15:11:01', '1', '1', 0);
INSERT INTO `dict_value` VALUES (209, 32, 'terminalTabColor', 'rgb(var(--arcoblue-6))', '蓝色', '{}', 70, '2024-03-01 15:11:11', '2024-03-01 15:11:11', '1', '1', 0);
INSERT INTO `dict_value` VALUES (210, 32, 'terminalTabColor', 'rgb(var(--purple-6))', '紫色', '{}', 80, '2024-03-01 15:11:20', '2024-03-01 15:11:20', '1', '1', 0);
INSERT INTO `dict_value` VALUES (211, 32, 'terminalTabColor', 'rgb(var(--pinkpurple-6))', '粉紫', '{}', 90, '2024-03-01 15:11:41', '2024-03-01 15:11:41', '1', '1', 0);
INSERT INTO `dict_value` VALUES (213, 32, 'terminalTabColor', 'rgb(var(--gray-6))', '灰色', '{}', 100, '2024-03-01 15:12:01', '2024-03-01 15:39:34', '1', '1', 0);
```

7
docs/update/v1.0.3.md Normal file
View File

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

430
docs/update/v1.0.4.md Normal file
View File

@@ -0,0 +1,430 @@
## v1.0.4
> sql 脚本 - DDL
```sql
-- 修改字段
ALTER TABLE `exec_template`
CHANGE COLUMN `parameter` `parameter_schema` json NULL COMMENT '参数定义' AFTER `timeout`;
ALTER TABLE `exec_log`
ADD COLUMN `exec_seq` int(0) NULL DEFAULT 0 COMMENT '执行序列' AFTER `description`;
-- 表结构
DROP TABLE IF EXISTS `exec_job`;
CREATE TABLE `exec_job`
(
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '任务名称',
`exec_seq` int(0) NULL DEFAULT 0 COMMENT '执行序列',
`expression` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'cron 表达式',
`timeout` int(0) NULL DEFAULT 0 COMMENT '超时时间',
`command` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '执行命令',
`parameter_schema` json NULL COMMENT '命令参数',
`status` tinyint(0) NULL DEFAULT 1 COMMENT '任务状态',
`recent_log_id` bigint(0) NULL DEFAULT NULL COMMENT '最近执行id',
`create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '创建人',
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '更新人',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '是否删除 0未删除 1已删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
AUTO_INCREMENT = 1
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '计划任务'
ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `exec_job_host`;
CREATE TABLE `exec_job_host`
(
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`job_id` bigint(0) NULL DEFAULT NULL COMMENT '任务id',
`host_id` bigint(0) NULL DEFAULT NULL COMMENT '主机id',
`create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '创建人',
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '更新人',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '是否删除 0未删除 1已删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_job_id` (`job_id`) USING BTREE
) ENGINE = InnoDB
AUTO_INCREMENT = 1
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '计划任务主机'
ROW_FORMAT = Dynamic;
-- quartz 表结构
DROP TABLE IF EXISTS `QRTZ_JOB_DETAILS`;
CREATE TABLE `QRTZ_JOB_DETAILS`
(
`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`JOB_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`JOB_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`DESCRIPTION` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`JOB_CLASS_NAME` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`IS_DURABLE` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`IS_NONCONCURRENT` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`IS_UPDATE_DATA` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`REQUESTS_RECOVERY` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`JOB_DATA` blob NULL,
PRIMARY KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) USING BTREE,
INDEX `IDX_QRTZ_J_REQ_RECOVERY` (`SCHED_NAME`, `REQUESTS_RECOVERY`) USING BTREE,
INDEX `IDX_QRTZ_J_GRP` (`SCHED_NAME`, `JOB_GROUP`) USING BTREE
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_general_ci
ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `QRTZ_TRIGGERS`;
CREATE TABLE `QRTZ_TRIGGERS`
(
`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`JOB_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`JOB_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`DESCRIPTION` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`NEXT_FIRE_TIME` bigint(0) NULL DEFAULT NULL,
`PREV_FIRE_TIME` bigint(0) NULL DEFAULT NULL,
`PRIORITY` int(0) NULL DEFAULT NULL,
`TRIGGER_STATE` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`TRIGGER_TYPE` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`START_TIME` bigint(0) NOT NULL,
`END_TIME` bigint(0) NULL DEFAULT NULL,
`CALENDAR_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`MISFIRE_INSTR` smallint(0) NULL DEFAULT NULL,
`JOB_DATA` blob NULL,
PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE,
INDEX `IDX_QRTZ_T_J` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) USING BTREE,
INDEX `IDX_QRTZ_T_JG` (`SCHED_NAME`, `JOB_GROUP`) USING BTREE,
INDEX `IDX_QRTZ_T_C` (`SCHED_NAME`, `CALENDAR_NAME`) USING BTREE,
INDEX `IDX_QRTZ_T_G` (`SCHED_NAME`, `TRIGGER_GROUP`) USING BTREE,
INDEX `IDX_QRTZ_T_STATE` (`SCHED_NAME`, `TRIGGER_STATE`) USING BTREE,
INDEX `IDX_QRTZ_T_N_STATE` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`, `TRIGGER_STATE`) USING BTREE,
INDEX `IDX_QRTZ_T_N_G_STATE` (`SCHED_NAME`, `TRIGGER_GROUP`, `TRIGGER_STATE`) USING BTREE,
INDEX `IDX_QRTZ_T_NEXT_FIRE_TIME` (`SCHED_NAME`, `NEXT_FIRE_TIME`) USING BTREE,
INDEX `IDX_QRTZ_T_NFT_ST` (`SCHED_NAME`, `TRIGGER_STATE`, `NEXT_FIRE_TIME`) USING BTREE,
INDEX `IDX_QRTZ_T_NFT_MISFIRE` (`SCHED_NAME`, `MISFIRE_INSTR`, `NEXT_FIRE_TIME`) USING BTREE,
INDEX `IDX_QRTZ_T_NFT_ST_MISFIRE` (`SCHED_NAME`, `MISFIRE_INSTR`, `NEXT_FIRE_TIME`, `TRIGGER_STATE`) USING BTREE,
INDEX `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP` (`SCHED_NAME`, `MISFIRE_INSTR`, `NEXT_FIRE_TIME`, `TRIGGER_GROUP`, `TRIGGER_STATE`) USING BTREE,
CONSTRAINT `QRTZ_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) REFERENCES `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_general_ci
ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `QRTZ_BLOB_TRIGGERS`;
CREATE TABLE `QRTZ_BLOB_TRIGGERS`
(
`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`BLOB_DATA` blob NULL,
PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE,
INDEX `SCHED_NAME` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE,
CONSTRAINT `QRTZ_BLOB_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_general_ci
ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `QRTZ_SIMPLE_TRIGGERS`;
CREATE TABLE `QRTZ_SIMPLE_TRIGGERS`
(
`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`REPEAT_COUNT` bigint(0) NOT NULL,
`REPEAT_INTERVAL` bigint(0) NOT NULL,
`TIMES_TRIGGERED` bigint(0) NOT NULL,
PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE,
CONSTRAINT `QRTZ_SIMPLE_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_general_ci
ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `QRTZ_SIMPROP_TRIGGERS`;
CREATE TABLE `QRTZ_SIMPROP_TRIGGERS`
(
`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`STR_PROP_1` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`STR_PROP_2` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`STR_PROP_3` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`INT_PROP_1` int(0) NULL DEFAULT NULL,
`INT_PROP_2` int(0) NULL DEFAULT NULL,
`LONG_PROP_1` bigint(0) NULL DEFAULT NULL,
`LONG_PROP_2` bigint(0) NULL DEFAULT NULL,
`DEC_PROP_1` decimal(13, 4) NULL DEFAULT NULL,
`DEC_PROP_2` decimal(13, 4) NULL DEFAULT NULL,
`BOOL_PROP_1` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`BOOL_PROP_2` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE,
CONSTRAINT `QRTZ_SIMPROP_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_general_ci
ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `QRTZ_CRON_TRIGGERS`;
CREATE TABLE `QRTZ_CRON_TRIGGERS`
(
`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`CRON_EXPRESSION` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`TIME_ZONE_ID` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE,
CONSTRAINT `QRTZ_CRON_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_general_ci
ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `QRTZ_FIRED_TRIGGERS`;
CREATE TABLE `QRTZ_FIRED_TRIGGERS`
(
`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`ENTRY_ID` varchar(95) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`INSTANCE_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`FIRED_TIME` bigint(0) NOT NULL,
`SCHED_TIME` bigint(0) NOT NULL,
`PRIORITY` int(0) NOT NULL,
`STATE` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`JOB_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`JOB_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`IS_NONCONCURRENT` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`REQUESTS_RECOVERY` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`SCHED_NAME`, `ENTRY_ID`) USING BTREE,
INDEX `IDX_QRTZ_FT_TRIG_INST_NAME` (`SCHED_NAME`, `INSTANCE_NAME`) USING BTREE,
INDEX `IDX_QRTZ_FT_INST_JOB_REQ_RCVRY` (`SCHED_NAME`, `INSTANCE_NAME`, `REQUESTS_RECOVERY`) USING BTREE,
INDEX `IDX_QRTZ_FT_J_G` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) USING BTREE,
INDEX `IDX_QRTZ_FT_JG` (`SCHED_NAME`, `JOB_GROUP`) USING BTREE,
INDEX `IDX_QRTZ_FT_T_G` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE,
INDEX `IDX_QRTZ_FT_TG` (`SCHED_NAME`, `TRIGGER_GROUP`) USING BTREE
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_general_ci
ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `QRTZ_PAUSED_TRIGGER_GRPS`;
CREATE TABLE `QRTZ_PAUSED_TRIGGER_GRPS`
(
`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
PRIMARY KEY (`SCHED_NAME`, `TRIGGER_GROUP`) USING BTREE
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_general_ci
ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `QRTZ_LOCKS`;
CREATE TABLE `QRTZ_LOCKS`
(
`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`LOCK_NAME` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
PRIMARY KEY (`SCHED_NAME`, `LOCK_NAME`) USING BTREE
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_general_ci
ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `QRTZ_CALENDARS`;
CREATE TABLE `QRTZ_CALENDARS`
(
`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`CALENDAR_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`CALENDAR` blob NOT NULL,
PRIMARY KEY (`SCHED_NAME`, `CALENDAR_NAME`) USING BTREE
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_general_ci
ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `QRTZ_SCHEDULER_STATE`;
CREATE TABLE `QRTZ_SCHEDULER_STATE`
(
`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`INSTANCE_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`LAST_CHECKIN_TIME` bigint(0) NOT NULL,
`CHECKIN_INTERVAL` bigint(0) NOT NULL,
PRIMARY KEY (`SCHED_NAME`, `INSTANCE_NAME`) USING BTREE
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_general_ci
ROW_FORMAT = Dynamic;
```
> sql 脚本 - DML
```sql
-- 操作日志修改
UPDATE operator_log SET module = 'asset:exec-command', type = 'exec-command:exec' WHERE type = 'exec:exec-command';
UPDATE operator_log SET module = 'asset:exec-command-log', type = 'exec-command-log:interrupt' WHERE type = 'exec:interrupt-exec';
UPDATE operator_log SET module = 'asset:exec-command-log', type = 'exec-command-log:interrupt-host' WHERE type = 'exec:interrupt-host';
UPDATE operator_log SET module = 'asset:exec-command-log', type = 'exec-command-log:delete' WHERE type = 'exec:delete-log';
UPDATE operator_log SET module = 'asset:exec-command-log', type = 'exec-command-log:clear' WHERE type = 'exec:clear-log';
UPDATE operator_log SET module = 'asset:exec-command-log', type = 'exec-command-log:delete-host' WHERE type = 'exec:delete-host-log';
UPDATE operator_log SET module = 'asset:exec-command-log', type = 'exec-command-log:download' WHERE type = 'exec:download-host-log';
-- 菜单配置
TRUNCATE `system_menu`;
INSERT INTO `system_menu` VALUES (1, 0, '工作台', NULL, 1, 10, 1, 1, 1, 0, 'IconComputer', NULL, 'workplace', '2023-07-28 10:51:50', '2023-09-11 15:27:52', '1', '1', 0);
INSERT INTO `system_menu` VALUES (5, 0, '用户设置', NULL, 1, 700, 1, 1, 1, 0, 'icon-user', NULL, 'userModule', '2023-07-28 10:55:38', '2024-04-03 00:56:30', '1', '1', 0);
INSERT INTO `system_menu` VALUES (8, 0, '项目地址 github', NULL, 1, 1000, 1, 1, 1, 0, 'icon-github', 'https://github.com/lijiahangmax/orion-ops-pro', '', '2023-07-28 11:04:59', '2023-10-12 15:21:22', '1', '1', 0);
INSERT INTO `system_menu` VALUES (10, 5, '角色管理', NULL, 2, 10, 1, 1, 1, 0, 'IconUserGroup', '', 'role', '2023-07-28 10:55:52', '2024-03-07 19:10:13', '1', '1', 0);
INSERT INTO `system_menu` VALUES (11, 0, '项目地址 gitee', NULL, 1, 1010, 1, 1, 1, 0, 'icon-gitlab', 'https://gitee.com/lijiahangmax/orion-ops-pro', '', '2023-08-02 18:08:07', '2023-08-11 18:11:34', '1', '1', 0);
INSERT INTO `system_menu` VALUES (12, 0, '系统设置', NULL, 1, 800, 1, 1, 1, 0, 'icon-tool', NULL, 'systemModule', '2023-08-02 18:24:24', '2024-04-03 00:56:17', '1', '1', 0);
INSERT INTO `system_menu` VALUES (13, 12, '系统菜单', '', 2, 10, 1, 1, 1, 0, 'icon-menu', NULL, 'systemMenu', '2023-08-02 18:29:01', '2024-03-07 22:25:00', '1', '1', 0);
INSERT INTO `system_menu` VALUES (20, 10, '创建角色', 'infra:system-role:create', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-15 16:36:54', '2023-10-27 01:20:46', '1', '1', 0);
INSERT INTO `system_menu` VALUES (21, 10, '修改角色', 'infra:system-role:update', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-15 16:37:33', '2023-10-27 01:20:46', '1', '1', 0);
INSERT INTO `system_menu` VALUES (22, 10, '更新状态', 'infra:system-role:update-status', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-15 16:37:58', '2023-10-27 01:20:46', '1', '1', 0);
INSERT INTO `system_menu` VALUES (23, 10, '查询角色', 'infra:system-role:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-15 16:38:26', '2023-10-27 01:20:46', '1', '1', 0);
INSERT INTO `system_menu` VALUES (24, 10, '分配菜单', 'infra:system-role:grant-menu', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-15 16:39:41', '2023-10-27 01:20:46', '1', '1', 0);
INSERT INTO `system_menu` VALUES (25, 10, '删除角色', 'infra:system-role:delete', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-15 16:40:45', '2023-10-27 01:20:46', '1', '1', 0);
INSERT INTO `system_menu` VALUES (26, 13, '创建菜单', 'infra:system-menu:create', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-15 16:41:30', '2023-10-27 01:16:10', '1', '1', 0);
INSERT INTO `system_menu` VALUES (27, 13, '修改菜单', 'infra:system-menu:update', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-15 16:41:55', '2023-10-27 01:16:10', '1', '1', 0);
INSERT INTO `system_menu` VALUES (28, 13, '修改状态', 'infra:system-menu:update-status', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-15 16:42:41', '2023-10-27 01:16:10', '1', '1', 0);
INSERT INTO `system_menu` VALUES (29, 13, '查询菜单', 'infra:system-menu:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-15 16:42:57', '2023-10-27 01:16:10', '1', '1', 0);
INSERT INTO `system_menu` VALUES (30, 13, '删除菜单', 'infra:system-menu:delete', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-15 16:43:16', '2023-10-27 01:16:10', '1', '1', 0);
INSERT INTO `system_menu` VALUES (48, 5, '用户管理', NULL, 2, 10, 1, 1, 1, 0, 'IconUserAdd', NULL, 'user', '2023-08-16 10:19:24', '2024-03-07 19:10:21', '1', '1', 0);
INSERT INTO `system_menu` VALUES (49, 48, '创建用户', 'infra:system-user:create', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-16 10:19:24', '2023-10-27 01:20:46', '1', '1', 0);
INSERT INTO `system_menu` VALUES (50, 48, '修改用户', 'infra:system-user:update', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-16 10:19:24', '2023-10-27 01:20:46', '1', '1', 0);
INSERT INTO `system_menu` VALUES (51, 48, '查询用户', 'infra:system-user:query', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-16 10:19:24', '2023-10-27 01:20:46', '1', '1', 0);
INSERT INTO `system_menu` VALUES (52, 48, '删除用户', 'infra:system-user:delete', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-16 10:19:24', '2023-10-27 01:20:46', '1', '1', 0);
INSERT INTO `system_menu` VALUES (53, 13, '刷新缓存', 'infra:system-menu:management:refresh-cache', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-16 10:29:10', '2023-12-27 12:39:48', '1', '1', 0);
INSERT INTO `system_menu` VALUES (60, 48, '修改用户状态', 'infra:system-user:update-status', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-16 11:49:04', '2023-10-27 01:20:46', '1', '1', 0);
INSERT INTO `system_menu` VALUES (61, 48, '分配用户角色', 'infra:system-user:grant-role', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-16 11:49:23', '2023-10-27 01:20:46', '1', '1', 0);
INSERT INTO `system_menu` VALUES (62, 48, '重置用户密码', 'infra:system-user:management:reset-password', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-16 11:49:50', '2023-12-27 12:42:10', '1', '1', 0);
INSERT INTO `system_menu` VALUES (63, 0, '资产管理', NULL, 1, 300, 1, 1, 1, 0, 'IconStorage', NULL, 'assetModule', '2023-09-11 14:17:31', '2024-04-03 00:20:16', '1', '1', 0);
INSERT INTO `system_menu` VALUES (64, 63, '主机管理', NULL, 2, 40, 1, 1, 1, 0, 'IconDesktop', NULL, 'hostList', '2023-09-11 14:17:31', '2024-03-07 19:09:20', '1', '1', 0);
INSERT INTO `system_menu` VALUES (65, 64, '查询主机', 'asset:host:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-11 14:17:31', '2023-10-27 01:15:14', '1', '1', 0);
INSERT INTO `system_menu` VALUES (66, 64, '创建主机', 'asset:host:create', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-11 14:17:31', '2023-10-27 01:15:14', '1', '1', 0);
INSERT INTO `system_menu` VALUES (67, 64, '修改主机', 'asset:host:update', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-11 14:17:31', '2023-10-27 01:15:14', '1', '1', 0);
INSERT INTO `system_menu` VALUES (68, 64, '删除主机', 'asset:host:delete', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-11 14:17:31', '2023-10-27 01:15:14', '1', '1', 0);
INSERT INTO `system_menu` VALUES (70, 64, '修改配置', 'asset:host:update-config', 3, 60, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-14 16:27:18', '2023-10-27 01:15:14', '1', '1', 0);
INSERT INTO `system_menu` VALUES (72, 63, '主机身份', NULL, 2, 60, 1, 1, 1, 0, 'IconIdcard', NULL, 'hostIdentity', '2023-09-20 11:47:18', '2024-03-07 19:09:31', '1', '1', 0);
INSERT INTO `system_menu` VALUES (73, 72, '查询主机身份', 'asset:host-identity:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
INSERT INTO `system_menu` VALUES (74, 72, '创建主机身份', 'asset:host-identity:create', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
INSERT INTO `system_menu` VALUES (75, 72, '修改主机身份', 'asset:host-identity:update', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
INSERT INTO `system_menu` VALUES (76, 72, '删除主机身份', 'asset:host-identity:delete', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
INSERT INTO `system_menu` VALUES (79, 63, '主机秘钥', NULL, 2, 50, 1, 1, 1, 0, 'IconLock', NULL, 'hostKey', '2023-09-20 11:47:18', '2024-03-07 19:09:26', '1', '1', 0);
INSERT INTO `system_menu` VALUES (80, 79, '查询主机秘钥', 'asset:host-key:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
INSERT INTO `system_menu` VALUES (81, 79, '创建主机秘钥', 'asset:host-key:create', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
INSERT INTO `system_menu` VALUES (82, 79, '修改主机秘钥', 'asset:host-key:update', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
INSERT INTO `system_menu` VALUES (83, 79, '删除主机秘钥', 'asset:host-key:delete', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
INSERT INTO `system_menu` VALUES (84, 79, '查询主机秘钥详情', 'asset:host-key:query-detail', 3, 50, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-11-09 15:52:57', '1', '1', 0);
INSERT INTO `system_menu` VALUES (94, 5, '个人中心', NULL, 2, 20, 0, 1, 0, 0, 'IconUser', NULL, 'userInfo', '2023-10-08 18:53:01', '2023-11-02 11:47:34', '1', '1', 0);
INSERT INTO `system_menu` VALUES (97, 12, '数据字典项', NULL, 2, 20, 1, 1, 1, 0, 'IconBook', NULL, 'dictKey', '2023-10-17 11:38:13', '2024-03-07 19:10:45', '1', '1', 0);
INSERT INTO `system_menu` VALUES (99, 97, '创建字典配置项', 'infra:dict-key:create', 3, 110, 1, 1, 1, 0, NULL, NULL, NULL, '2023-10-17 11:38:13', '2023-10-27 01:16:10', '1', '1', 0);
INSERT INTO `system_menu` VALUES (100, 97, '修改字典配置项', 'infra:dict-key:update', 3, 120, 1, 1, 1, 0, NULL, NULL, NULL, '2023-10-17 11:38:13', '2023-10-27 01:16:10', '1', '1', 0);
INSERT INTO `system_menu` VALUES (101, 97, '删除字典配置项', 'infra:dict-key:delete', 3, 130, 1, 1, 1, 0, NULL, NULL, NULL, '2023-10-17 11:38:13', '2023-10-27 01:16:10', '1', '1', 0);
INSERT INTO `system_menu` VALUES (105, 12, '数据字典值', NULL, 2, 30, 1, 1, 1, 0, 'IconNav', NULL, 'dictValue', '2023-10-17 11:38:13', '2024-03-07 19:10:49', '1', '1', 0);
INSERT INTO `system_menu` VALUES (106, 105, '查询字典配置值', 'infra:dict-value:query', 3, 210, 1, 1, 1, 0, NULL, NULL, NULL, '2023-10-17 11:38:18', '2023-10-27 01:16:10', '1', '1', 0);
INSERT INTO `system_menu` VALUES (107, 105, '创建字典配置值', 'infra:dict-value:create', 3, 220, 1, 1, 1, 0, NULL, NULL, NULL, '2023-10-17 11:38:18', '2023-10-27 01:16:10', '1', '1', 0);
INSERT INTO `system_menu` VALUES (108, 105, '修改字典配置值', 'infra:dict-value:update', 3, 230, 1, 1, 1, 0, NULL, NULL, NULL, '2023-10-17 11:38:18', '2023-10-27 01:16:10', '1', '1', 0);
INSERT INTO `system_menu` VALUES (109, 105, '删除字典配置值', 'infra:dict-value:delete', 3, 240, 1, 1, 1, 0, NULL, NULL, NULL, '2023-10-17 11:38:18', '2023-10-27 01:16:10', '1', '1', 0);
INSERT INTO `system_menu` VALUES (120, 97, '查询字典配置项', 'infra:dict-key:query', 3, 100, 1, 1, 1, 0, NULL, NULL, NULL, '2023-10-20 11:27:12', '2023-12-27 18:39:22', '1', '1', 0);
INSERT INTO `system_menu` VALUES (121, 97, '刷新缓存', 'infra:dict-key:management:refresh-cache', 3, 140, 1, 1, 1, 0, NULL, NULL, NULL, '2023-10-27 15:50:04', '2023-12-27 12:40:12', '1', '1', 0);
INSERT INTO `system_menu` VALUES (122, 5, '操作日志', NULL, 2, 30, 1, 1, 1, 0, 'IconCalendarClock', NULL, 'operatorLog', '2023-11-01 14:09:36', '2024-03-07 19:10:30', '1', '1', 0);
INSERT INTO `system_menu` VALUES (123, 122, '查询操作日志', 'infra:operator-log:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-02 11:22:54', '2023-11-02 11:22:54', '1', '1', 0);
INSERT INTO `system_menu` VALUES (124, 48, '查询用户会话', 'infra:system-user:query-session', 3, 50, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-02 11:24:14', '2023-11-02 11:24:14', '1', '1', 0);
INSERT INTO `system_menu` VALUES (125, 48, '下线用户会话', 'infra:system-user:management:offline-session', 3, 60, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-02 11:24:37', '2023-12-27 12:39:17', '1', '1', 0);
INSERT INTO `system_menu` VALUES (126, 48, '查询用户登录日志', 'infra:system-user:login-history', 3, 70, 1, 1, 1, 0, NULL, NULL, NULL, '2023-12-27 15:05:37', '2023-12-27 15:07:19', '1', '1', 0);
INSERT INTO `system_menu` VALUES (129, 64, '编辑主机分组', 'asset:host-group:update', 3, 100, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-13 18:16:32', '2023-12-01 01:47:58', '1', '1', 0);
INSERT INTO `system_menu` VALUES (133, 144, '主机分组授权', 'asset:host-group:grant', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-23 18:08:57', '2023-11-30 22:39:53', '1', '1', 0);
INSERT INTO `system_menu` VALUES (142, 144, '主机秘钥授权', 'asset:host-key:grant', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-30 21:06:13', '2023-11-30 22:39:47', '1', '1', 0);
INSERT INTO `system_menu` VALUES (143, 144, '主机身份授权', 'asset:host-identity:grant', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-30 21:06:26', '2023-11-30 22:40:11', '1', '1', 0);
INSERT INTO `system_menu` VALUES (144, 63, '资产授权', NULL, 2, 70, 1, 1, 1, 0, 'icon-safe', NULL, 'assetGrant', '2023-11-30 22:38:57', '2023-11-30 22:39:06', '1', '1', 0);
INSERT INTO `system_menu` VALUES (145, 0, '主机运维', NULL, 1, 400, 1, 1, 1, 1, 'IconDesktop', NULL, 'hostModule', '2023-12-04 23:33:25', '2024-04-03 00:57:16', '1', '1', 0);
INSERT INTO `system_menu` VALUES (146, 145, '主机终端', NULL, 2, 10, 1, 1, 1, 1, 'icon-code-square', NULL, 'terminal', '2023-12-04 23:38:01', '2024-03-07 19:09:44', '1', '1', 0);
INSERT INTO `system_menu` VALUES (148, 152, '连接日志', NULL, 2, 10, 1, 1, 1, 0, 'IconLink', NULL, 'connectLog', '2023-12-26 22:53:07', '2024-03-07 19:09:59', '1', '1', 0);
INSERT INTO `system_menu` VALUES (149, 148, '查询连接日志', 'asset:host-connect-log:management:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-12-26 22:53:08', '2024-03-04 13:40:42', '1', '1', 0);
INSERT INTO `system_menu` VALUES (151, 146, '连接终端', 'asset:host-terminal:access', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-12-27 18:56:33', '2023-12-27 18:56:33', '2', '2', 0);
INSERT INTO `system_menu` VALUES (152, 0, '运维审计', NULL, 1, 420, 1, 1, 1, 0, 'IconSafe', NULL, 'assetAuditModule', '2024-01-04 17:54:56', '2024-04-10 16:31:28', '1', '1', 0);
INSERT INTO `system_menu` VALUES (153, 148, '删除连接日志', 'asset:host-connect-log:management:delete', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 13:39:46', '2024-03-04 13:40:29', '1', '1', 0);
INSERT INTO `system_menu` VALUES (154, 148, '清空连接日志', 'asset:host-connect-log:management:clear', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 13:40:05', '2024-03-04 13:40:34', '1', '1', 0);
INSERT INTO `system_menu` VALUES (155, 148, '强制断开连接', 'asset:host-connect-log:management:force-offline', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 13:41:02', '2024-03-05 23:32:01', '1', '1', 0);
INSERT INTO `system_menu` VALUES (156, 122, '删除操作日志', 'infra:operator-log:delete', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 17:06:55', '2024-03-04 17:08:22', '1', '1', 0);
INSERT INTO `system_menu` VALUES (157, 122, '清空操作日志', 'infra:operator-log:management:clear', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 17:07:25', '2024-04-11 11:16:17', '1', '2', 0);
INSERT INTO `system_menu` VALUES (158, 152, '文件操作日志', NULL, 2, 20, 1, 1, 1, 0, 'IconFile', NULL, 'sftpLog', '2024-03-05 15:30:13', '2024-04-11 16:33:58', '1', '1', 0);
INSERT INTO `system_menu` VALUES (159, 158, '查询文件操作日志', 'asset:host-sftp-log:management:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-05 15:31:02', '2024-04-12 14:49:18', '1', '1', 0);
INSERT INTO `system_menu` VALUES (160, 158, '删除文件操作日志', 'asset:host-sftp-log:management:delete', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-05 15:31:17', '2024-04-12 14:49:21', '1', '1', 0);
INSERT INTO `system_menu` VALUES (161, 176, '执行模板', NULL, 2, 70, 1, 1, 1, 0, 'IconBookmark', NULL, 'execTemplate', '2024-03-07 18:32:41', '2024-04-11 13:40:58', '1', '2', 0);
INSERT INTO `system_menu` VALUES (162, 161, '查询执行模板', 'asset:exec-template:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-07 18:32:41', '2024-03-07 18:32:41', '1', '1', 0);
INSERT INTO `system_menu` VALUES (163, 161, '创建执行模板', 'asset:exec-template:create', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-07 18:32:41', '2024-03-07 18:32:41', '1', '1', 0);
INSERT INTO `system_menu` VALUES (164, 161, '修改执行模板', 'asset:exec-template:update', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-07 18:32:41', '2024-03-07 18:32:41', '1', '1', 0);
INSERT INTO `system_menu` VALUES (165, 161, '删除执行模板', 'asset:exec-template:delete', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-07 18:32:41', '2024-03-07 18:32:41', '1', '1', 0);
INSERT INTO `system_menu` VALUES (167, 176, '批量执行日志', NULL, 2, 20, 1, 1, 1, 0, 'icon-list', NULL, 'execCommandLog', '2024-03-13 15:08:23', '2024-04-11 13:40:01', '1', '2', 0);
INSERT INTO `system_menu` VALUES (168, 167, '查询执行日志', 'asset:exec-command-log:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-13 15:08:23', '2024-04-12 13:51:48', '1', '1', 0);
INSERT INTO `system_menu` VALUES (169, 167, '删除执行日志', 'asset:exec-command-log:delete', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-13 15:08:23', '2024-04-12 13:51:50', '1', '1', 0);
INSERT INTO `system_menu` VALUES (171, 167, '清理执行日志', 'asset:exec-command-log:management:clear', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-13 15:08:23', '2024-04-12 13:51:52', '1', '1', 0);
INSERT INTO `system_menu` VALUES (172, 176, '批量执行', NULL, 2, 10, 1, 1, 1, 0, 'icon-thunderbolt', NULL, 'execCommand', '2024-03-13 15:08:23', '2024-04-10 16:35:18', '1', '1', 0);
INSERT INTO `system_menu` VALUES (173, 172, '执行命令', 'asset:exec-command:exec', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-13 15:08:23', '2024-04-10 22:04:32', '1', '1', 0);
INSERT INTO `system_menu` VALUES (174, 167, '中断批量执行', 'asset:exec-command-log:interrupt', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-13 15:25:36', '2024-04-12 12:48:36', '1', '1', 0);
INSERT INTO `system_menu` VALUES (175, 176, '批量执行日志新页面', NULL, 2, 30, 0, 1, 0, 1, '', NULL, 'execCommandLogView', '2024-03-21 14:03:10', '2024-04-11 23:45:08', '1', '1', 0);
INSERT INTO `system_menu` VALUES (176, 0, '命令执行', NULL, 1, 410, 1, 1, 1, 0, 'icon-relation', NULL, 'execModule', '2024-04-10 16:13:27', '2024-04-10 16:34:00', '1', '1', 0);
INSERT INTO `system_menu` VALUES (177, 176, '计划任务', NULL, 2, 40, 1, 1, 1, 0, 'icon-calendar-clock', NULL, 'execJob', '2024-04-10 16:13:27', '2024-04-11 23:45:13', '1', '1', 0);
INSERT INTO `system_menu` VALUES (178, 177, '查询计划任务', 'asset:exec-job:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2024-04-10 16:13:27', '2024-04-10 16:13:27', '1', '1', 0);
INSERT INTO `system_menu` VALUES (179, 177, '创建计划任务', 'asset:exec-job:create', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-04-10 16:13:27', '2024-04-10 16:13:27', '1', '1', 0);
INSERT INTO `system_menu` VALUES (180, 177, '修改计划任务', 'asset:exec-job:update', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2024-04-10 16:13:27', '2024-04-10 16:13:27', '1', '1', 0);
INSERT INTO `system_menu` VALUES (181, 177, '修改任务状态', 'asset:exec-job:update-status', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2024-04-10 16:13:27', '2024-04-10 16:13:27', '1', '1', 0);
INSERT INTO `system_menu` VALUES (182, 177, '删除计划任务', 'asset:exec-job:delete', 3, 50, 1, 1, 1, 0, NULL, NULL, NULL, '2024-04-10 16:13:27', '2024-04-10 16:13:27', '1', '1', 0);
INSERT INTO `system_menu` VALUES (183, 177, '手动执行任务', 'asset:exec-job:trigger', 3, 60, 1, 1, 1, 0, NULL, NULL, NULL, '2024-04-10 16:13:27', '2024-04-10 16:13:27', '1', '1', 0);
INSERT INTO `system_menu` VALUES (184, 176, '计划任务日志', NULL, 2, 50, 1, 1, 1, 0, 'icon-history', '', 'execJobLog', '2024-04-11 13:40:47', '2024-04-11 23:45:19', '2', '1', 0);
INSERT INTO `system_menu` VALUES (185, 176, '计划任务日志新页面', NULL, 2, 60, 0, 1, 0, 1, NULL, NULL, 'execJobLogView', '2024-04-11 13:41:47', '2024-04-11 23:45:23', '2', '1', 0);
INSERT INTO `system_menu` VALUES (186, 184, '查询任务日志', 'asset:exec-job-log:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-13 15:08:23', '2024-04-12 13:52:02', '1', '1', 0);
INSERT INTO `system_menu` VALUES (187, 184, '删除任务日志', 'asset:exec-job-log:delete', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-13 15:08:23', '2024-04-12 13:51:59', '1', '1', 0);
INSERT INTO `system_menu` VALUES (189, 184, '清理任务日志', 'asset:exec-job-log:management:clear', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-13 15:08:23', '2024-04-12 13:51:58', '1', '1', 0);
INSERT INTO `system_menu` VALUES (190, 184, '中断计划任务', 'asset:exec-job-log:interrupt', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-13 15:08:23', '2024-04-12 00:00:33', '1', '1', 0);
-- 字典配置项
DELETE FROM `dict_key` WHERE `id` >= 36;
INSERT INTO `dict_key` VALUES (36, 'execJobStatus', 'INTEGER', '[{\"name\": \"color\", \"type\": \"COLOR\"}]', '计划任务状态', '2024-04-10 16:18:07', '2024-04-11 14:25:05', '1', '1', 0);
-- 字典配置值
DELETE FROM `dict_value` WHERE `id` = 222 OR `id` >= 233;
INSERT INTO `dict_value` VALUES (222, 2, 'operatorLogType', 'host-terminal:delete-sftp-log', '删除文件操作日志', '{}', 15, '2024-03-05 15:28:00', '2024-04-12 13:47:36', '1', '1', 0);
INSERT INTO `dict_value` VALUES (233, 2, 'operatorLogType', 'exec-template:create', '创建执行模板', '{}', 10, '2024-03-07 18:32:41', '2024-04-12 13:48:54', '1', '1', 0);
INSERT INTO `dict_value` VALUES (234, 2, 'operatorLogType', 'exec-template:update', '更新执行模板', '{}', 20, '2024-03-07 18:32:41', '2024-04-12 13:48:56', '1', '1', 0);
INSERT INTO `dict_value` VALUES (235, 2, 'operatorLogType', 'exec-template:delete', '删除执行模板', '{}', 30, '2024-03-07 18:32:41', '2024-04-12 13:49:01', '1', '1', 0);
INSERT INTO `dict_value` VALUES (236, 1, 'operatorLogModule', 'asset:exec-command', '批量执行', '{}', 2080, '2024-03-13 15:08:43', '2024-04-10 22:33:28', '1', '1', 0);
INSERT INTO `dict_value` VALUES (237, 2, 'operatorLogType', 'exec-command-log:delete', '删除执行日志', '{}', 10, '2024-03-13 15:08:43', '2024-04-12 13:52:50', '1', '1', 0);
INSERT INTO `dict_value` VALUES (238, 2, 'operatorLogType', 'exec-command-log:clear', '清理执行日志', '{}', 20, '2024-03-13 15:08:43', '2024-04-12 13:52:51', '1', '1', 0);
INSERT INTO `dict_value` VALUES (239, 2, 'operatorLogType', 'exec-command-log:delete-host', '删除执行主机日志', '{}', 30, '2024-03-13 15:08:43', '2024-04-12 13:52:57', '1', '1', 0);
INSERT INTO `dict_value` VALUES (240, 34, 'execStatus', 'WAITING', '等待中', '{\"color\": \"gray\"}', 10, '2024-03-13 15:08:43', '2024-03-13 15:53:55', '1', '1', 0);
INSERT INTO `dict_value` VALUES (241, 34, 'execStatus', 'RUNNING', '运行中', '{\"color\": \"green\"}', 20, '2024-03-13 15:08:43', '2024-03-13 15:53:55', '1', '1', 0);
INSERT INTO `dict_value` VALUES (242, 34, 'execStatus', 'COMPLETED', '执行完成', '{\"color\": \"arcoblue\"}', 30, '2024-03-13 15:08:43', '2024-03-13 15:53:55', '1', '1', 0);
INSERT INTO `dict_value` VALUES (243, 34, 'execStatus', 'FAILED', '执行失败', '{\"color\": \"red\"}', 40, '2024-03-13 15:08:43', '2024-03-13 15:53:55', '1', '1', 0);
INSERT INTO `dict_value` VALUES (244, 35, 'execHostStatus', 'WAITING', '等待中', '{\"color\": \"gray\", \"execColor\": \"#94D82D\"}', 10, '2024-03-13 15:09:11', '2024-03-19 19:09:53', '1', '1', 0);
INSERT INTO `dict_value` VALUES (245, 35, 'execHostStatus', 'RUNNING', '运行中', '{\"color\": \"green\", \"execColor\": \"#339AF0\"}', 20, '2024-03-13 15:09:11', '2024-03-17 20:50:53', '1', '1', 0);
INSERT INTO `dict_value` VALUES (246, 35, 'execHostStatus', 'COMPLETED', '执行完成', '{\"color\": \"arcoblue\", \"execColor\": \"#5C7CFA\"}', 30, '2024-03-13 15:09:11', '2024-03-17 20:42:17', '1', '1', 0);
INSERT INTO `dict_value` VALUES (247, 35, 'execHostStatus', 'FAILED', '执行失败', '{\"color\": \"red\", \"execColor\": \"#FF6B6B\"}', 40, '2024-03-13 15:09:11', '2024-03-17 20:42:39', '1', '1', 0);
INSERT INTO `dict_value` VALUES (248, 35, 'execHostStatus', 'INTERRUPTED', '已中断', '{\"color\": \"purple\", \"execColor\": \"#845EF7\"}', 60, '2024-03-13 15:09:11', '2024-03-19 19:05:03', '1', '1', 0);
INSERT INTO `dict_value` VALUES (249, 2, 'operatorLogType', 'exec-command:exec', '执行主机命令', '{}', 10, '2024-03-13 15:08:43', '2024-04-12 13:53:00', '1', '1', 0);
INSERT INTO `dict_value` VALUES (250, 2, 'operatorLogType', 'exec-command-log:interrupt', '中断批量执行', '{}', 50, '2024-03-13 15:08:43', '2024-04-12 12:53:58', '1', '1', 0);
INSERT INTO `dict_value` VALUES (251, 2, 'operatorLogType', 'exec-command-log:interrupt-host', '中断批量执行主机', '{}', 60, '2024-03-13 15:08:43', '2024-04-12 12:54:10', '1', '1', 0);
INSERT INTO `dict_value` VALUES (252, 2, 'operatorLogType', 'exec-command-log:download', '下载批量执行日志', '{}', 40, '2024-03-18 17:25:44', '2024-04-11 23:34:54', '1', '1', 0);
INSERT INTO `dict_value` VALUES (253, 35, 'execHostStatus', 'TIMEOUT', '执行超时', '{\"color\": \"orangered\", \"execColor\": \"#fA8C16\"}', 50, '2024-03-19 19:05:56', '2024-04-02 23:01:44', '1', '1', 0);
INSERT INTO `dict_value` VALUES (254, 1, 'operatorLogModule', 'asset:exec-job', '计划任务', '{}', 2090, '2024-04-10 16:18:07', '2024-04-10 16:18:07', '1', '1', 0);
INSERT INTO `dict_value` VALUES (255, 2, 'operatorLogType', 'exec-job:create', '创建计划任务', '{}', 10, '2024-04-10 16:18:07', '2024-04-12 12:55:11', '1', '1', 0);
INSERT INTO `dict_value` VALUES (256, 2, 'operatorLogType', 'exec-job:update', '更新计划任务', '{}', 20, '2024-04-10 16:18:07', '2024-04-12 12:55:13', '1', '1', 0);
INSERT INTO `dict_value` VALUES (257, 2, 'operatorLogType', 'exec-job:update-status', '更新任务状态', '{}', 30, '2024-04-10 16:18:07', '2024-04-12 12:55:14', '1', '1', 0);
INSERT INTO `dict_value` VALUES (258, 2, 'operatorLogType', 'exec-job:trigger', '触发计划任务', '{}', 40, '2024-04-10 16:18:07', '2024-04-12 12:55:15', '1', '1', 0);
INSERT INTO `dict_value` VALUES (259, 2, 'operatorLogType', 'exec-job:delete', '删除计划任务', '{}', 50, '2024-04-10 16:18:07', '2024-04-12 12:55:21', '1', '1', 0);
INSERT INTO `dict_value` VALUES (260, 36, 'execJobStatus', '0', '禁用', '{\"color\": \"orangered\"}', 10, '2024-04-10 16:18:07', '2024-04-11 14:25:29', '1', '1', 0);
INSERT INTO `dict_value` VALUES (261, 36, 'execJobStatus', '1', '启用', '{\"color\": \"arcoblue\"}', 20, '2024-04-10 16:18:07', '2024-04-11 14:25:21', '1', '1', 0);
INSERT INTO `dict_value` VALUES (262, 1, 'operatorLogModule', 'asset:exec-command-log', '批量执行日志', '{}', 2090, '2024-03-13 15:08:43', '2024-04-11 23:34:55', '1', '1', 0);
INSERT INTO `dict_value` VALUES (263, 1, 'operatorLogModule', 'asset:exec-job-log', '计划任务日志', '{}', 2100, '2024-04-10 16:18:07', '2024-04-11 23:33:55', '1', '1', 0);
INSERT INTO `dict_value` VALUES (264, 2, 'operatorLogType', 'exec-job-log:delete', '删除任务日志', '{}', 10, '2024-03-13 15:08:43', '2024-04-12 13:53:04', '1', '1', 0);
INSERT INTO `dict_value` VALUES (265, 2, 'operatorLogType', 'exec-job-log:clear', '清理任务日志', '{}', 20, '2024-03-13 15:08:43', '2024-04-12 13:53:05', '1', '1', 0);
INSERT INTO `dict_value` VALUES (266, 2, 'operatorLogType', 'exec-job-log:delete-host', '删除任务主机日志', '{}', 30, '2024-03-13 15:08:43', '2024-04-12 13:53:09', '1', '1', 0);
INSERT INTO `dict_value` VALUES (267, 2, 'operatorLogType', 'exec-job-log:download', '下载计划任务日志', '{}', 40, '2024-03-18 17:25:44', '2024-04-11 23:38:17', '1', '1', 0);
INSERT INTO `dict_value` VALUES (268, 2, 'operatorLogType', 'exec-job-log:interrupt', '中断计划任务', '{}', 50, '2024-03-13 15:08:43', '2024-04-12 15:23:51', '1', '1', 0);
INSERT INTO `dict_value` VALUES (269, 2, 'operatorLogType', 'exec-job-log:interrupt-host', '中断计划任务主机', '{}', 60, '2024-03-13 15:08:43', '2024-04-12 15:23:42', '1', '1', 0);
```

11
docs/update/v1.0.5.md Normal file
View File

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

View File

@@ -14,11 +14,11 @@
<url>https://github.com/lijiahangmax/orion-ops-pro</url>
<properties>
<revision>1.0.3</revision>
<revision>1.0.4</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.6</orion.kit.revision>
<orion.kit.revision>1.0.7</orion.kit.revision>
<aspectj.version>1.9.7</aspectj.version>
<lombok.version>1.18.26</lombok.version>
<springdoc.version>1.6.15</springdoc.version>
@@ -336,4 +336,4 @@
</plugins>
</build>
</project>
</project>

View File

@@ -1,5 +1,6 @@
package com.orion.ops.framework.common.config;
package com.orion.ops.framework.common.configuration;
import com.orion.ops.framework.common.configuration.config.AsyncExecutorConfig;
import com.orion.ops.framework.common.constant.AutoConfigureOrderConst;
import com.orion.ops.framework.common.thread.ThreadPoolMdcTaskExecutor;
import com.orion.spring.SpringHolder;

View File

@@ -1,4 +1,4 @@
package com.orion.ops.framework.common.config;
package com.orion.ops.framework.common.configuration.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

View File

@@ -25,19 +25,21 @@ public interface AutoConfigureOrderConst {
int FRAMEWORK_LOG = Integer.MIN_VALUE + 1500;
int FRAMEWORK_JOB = Integer.MIN_VALUE + 1600;
int FRAMEWORK_SWAGGER = Integer.MIN_VALUE + 1600;
int FRAMEWORK_SWAGGER = Integer.MIN_VALUE + 1700;
int FRAMEWORK_DATASOURCE = Integer.MIN_VALUE + 1700;
int FRAMEWORK_DATASOURCE = Integer.MIN_VALUE + 1800;
int FRAMEWORK_MYBATIS = Integer.MIN_VALUE + 1800;
int FRAMEWORK_MYBATIS = Integer.MIN_VALUE + 1900;
int FRAMEWORK_REDIS = Integer.MIN_VALUE + 1900;
int FRAMEWORK_REDIS = Integer.MIN_VALUE + 2000;
int FRAMEWORK_REDIS_CACHE = Integer.MIN_VALUE + 1950;
int FRAMEWORK_REDIS_CACHE = Integer.MIN_VALUE + 2050;
int FRAMEWORK_STORAGE = Integer.MIN_VALUE + 2000;
int FRAMEWORK_STORAGE = Integer.MIN_VALUE + 2100;
int FRAMEWORK_JOB = Integer.MIN_VALUE + 2100;
int FRAMEWORK_JOB_QUARTZ = Integer.MIN_VALUE + 2150;
int FRAMEWORK_MONITOR = Integer.MIN_VALUE + 2200;

View File

@@ -31,6 +31,10 @@ public interface Const extends com.orion.lang.constant.Const, FieldConst, CnCons
Integer DEFAULT_VERSION = 1;
Long SYSTEM_USER_ID = 0L;
String SYSTEM_USERNAME = "system";
String ERROR_LOG = "error.log";
}

View File

@@ -74,21 +74,19 @@ public enum ErrorCode implements CodeInfo {
DECRYPT_ERROR(908, "数据解密异常"),
EXPRESSION_ERROR(909, "表达式错误"),
TASK_EXECUTE_ERROR(909, "任务执行异常"),
TASK_EXECUTE_ERROR(910, "任务执行异常"),
CONNECT_ERROR(910, "建立连接失败"),
CONNECT_ERROR(911, "建立连接失败"),
INTERRUPT_ERROR(911, "操作中断"),
INTERRUPT_ERROR(912, "操作中断"),
UNSAFE_OPERATOR(912, "不安全的操作"),
UNSAFE_OPERATOR(913, "不安全的操作"),
VCS_OPETATOR_ERROR(913, "仓库操作执行失败"),
VCS_OPETATOR_ERROR(914, "仓库操作执行失败"),
DIABLED_ERROR(914, "数据已被禁用"),
DIABLED_ERROR(915, "数据已被禁用"),
UNSUPPOETED(916, "不支持此操作"),
UNSUPPOETED(915, "不支持此操作"),
;

View File

@@ -13,6 +13,8 @@ public interface ErrorMessage {
String PARAM_MISSING = "参数不能为空";
String PARAM_ERROR = "参数错误";
String ID_MISSING = "id 不能为空";
String INVALID_PARAM = "参数验证失败";
@@ -91,4 +93,6 @@ public interface ErrorMessage {
String FILE_READ_ERROR = "文件读取失败";
String PLEASE_CHECK_HOST_SSH = "请检查主机 {} 是否存在/权限/SSH配置";
}

View File

@@ -45,6 +45,8 @@ public interface FieldConst {
String TOKEN = "token";
String SEQ = "seq";
String PATH = "path";
String ADDRESS = "address";

View File

@@ -13,6 +13,4 @@ public interface FilterOrderConst {
int CORS_FILTER = Integer.MIN_VALUE + 2000;
int MYBATIS_CACHE_CLEAR_FILTER = Integer.MIN_VALUE + 100000;
}

View File

@@ -12,7 +12,7 @@ public interface OrionOpsProConst {
/**
* 同 ${orion.version} 迭代时候需要手动更改
*/
String VERSION = "1.0.3";
String VERSION = "1.0.4";
String GITHUB = "https://github.com/lijiahangmax/orion-ops-pro";

View File

@@ -2,8 +2,8 @@
"groups": [
{
"name": "orion.async.executor",
"type": "com.orion.ops.framework.common.config.AsyncExecutorConfig",
"sourceType": "com.orion.ops.framework.common.config.AsyncExecutorConfig"
"type": "com.orion.ops.framework.common.configuration.config.AsyncExecutorConfig",
"sourceType": "com.orion.ops.framework.common.configuration.config.AsyncExecutorConfig"
}
],
"properties": [

View File

@@ -1 +1 @@
com.orion.ops.framework.common.config.OrionCommonAutoConfiguration
com.orion.ops.framework.common.configuration.OrionCommonAutoConfiguration

View File

@@ -1,6 +1,6 @@
package com.orion.ops.framework.banner.config;
package com.orion.ops.framework.banner.configuration;
import com.orion.ops.framework.banner.core.BannerApplicationRunner;
import com.orion.ops.framework.banner.core.runner.BannerApplicationRunner;
import com.orion.ops.framework.common.constant.AutoConfigureOrderConst;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureOrder;

View File

@@ -1,4 +1,4 @@
package com.orion.ops.framework.banner.core;
package com.orion.ops.framework.banner.core.runner;
import com.orion.lang.utils.Threads;
import com.orion.lang.utils.ansi.AnsiAppender;

View File

@@ -1 +1 @@
com.orion.ops.framework.banner.config.OrionBannerAutoConfiguration
com.orion.ops.framework.banner.configuration.OrionBannerAutoConfiguration

View File

@@ -1,9 +1,9 @@
package com.orion.ops.framework.biz.operator.log.config;
package com.orion.ops.framework.biz.operator.log.configuration;
import com.alibaba.fastjson.serializer.SerializeFilter;
import com.alibaba.fastjson.serializer.ValueFilter;
import com.orion.ops.framework.biz.operator.log.core.aspect.OperatorLogAspect;
import com.orion.ops.framework.biz.operator.log.core.config.OperatorLogConfig;
import com.orion.ops.framework.biz.operator.log.configuration.config.OperatorLogConfig;
import com.orion.ops.framework.biz.operator.log.core.service.OperatorLogFrameworkService;
import com.orion.ops.framework.biz.operator.log.core.service.OperatorLogFrameworkServiceDelegate;
import com.orion.ops.framework.biz.operator.log.core.utils.OperatorLogFiller;

View File

@@ -1,4 +1,4 @@
package com.orion.ops.framework.biz.operator.log.core.config;
package com.orion.ops.framework.biz.operator.log.configuration.config;
import com.orion.ops.framework.common.utils.ConfigUtils;
import lombok.Data;

View File

@@ -6,7 +6,7 @@ import com.orion.lang.utils.Arrays1;
import com.orion.lang.utils.Strings;
import com.orion.ops.framework.biz.operator.log.core.annotation.IgnoreParameter;
import com.orion.ops.framework.biz.operator.log.core.annotation.OperatorLog;
import com.orion.ops.framework.biz.operator.log.core.config.OperatorLogConfig;
import com.orion.ops.framework.biz.operator.log.configuration.config.OperatorLogConfig;
import com.orion.ops.framework.biz.operator.log.core.factory.OperatorTypeHolder;
import com.orion.ops.framework.biz.operator.log.core.model.OperatorLogModel;
import com.orion.ops.framework.biz.operator.log.core.model.OperatorType;

View File

@@ -7,7 +7,7 @@ import com.orion.lang.utils.Exceptions;
import com.orion.lang.utils.Refs;
import com.orion.lang.utils.Strings;
import com.orion.lang.utils.json.matcher.ReplacementFormatters;
import com.orion.ops.framework.biz.operator.log.core.config.OperatorLogConfig;
import com.orion.ops.framework.biz.operator.log.configuration.config.OperatorLogConfig;
import com.orion.ops.framework.biz.operator.log.core.enums.ReturnType;
import com.orion.ops.framework.biz.operator.log.core.factory.OperatorTypeHolder;
import com.orion.ops.framework.biz.operator.log.core.model.OperatorLogModel;

View File

@@ -2,8 +2,8 @@
"groups": [
{
"name": "orion.operator-log",
"type": "com.orion.ops.framework.biz.operator.log.core.config.OperatorLogConfig",
"sourceType": "com.orion.ops.framework.biz.operator.log.core.config.OperatorLogConfig"
"type": "com.orion.ops.framework.biz.operator.log.configuration.config.OperatorLogConfig",
"sourceType": "com.orion.ops.framework.biz.operator.log.configuration.config.OperatorLogConfig"
}
],
"properties": [

View File

@@ -1 +1 @@
com.orion.ops.framework.biz.operator.log.config.OrionOperatorLogAutoConfiguration
com.orion.ops.framework.biz.operator.log.configuration.OrionOperatorLogAutoConfiguration

View File

@@ -1,4 +1,4 @@
package com.orion.ops.framework.datasource.config;
package com.orion.ops.framework.datasource.configuration;
import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties;
import com.orion.ops.framework.common.constant.AutoConfigureOrderConst;

View File

@@ -1 +1 @@
com.orion.ops.framework.datasource.config.OrionDataSourceAutoConfiguration
com.orion.ops.framework.datasource.configuration.OrionDataSourceAutoConfiguration

View File

@@ -22,6 +22,7 @@
<artifactId>orion-ops-framework-common</artifactId>
</dependency>
<!-- web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>

View File

@@ -1,4 +1,4 @@
package com.orion.ops.framework.desensitize.config;
package com.orion.ops.framework.desensitize.configuration;
import com.orion.ops.framework.common.constant.AutoConfigureOrderConst;
import com.orion.ops.framework.desensitize.core.filter.DesensitizeValueFilter;

View File

@@ -1 +1 @@
com.orion.ops.framework.desensitize.config.OrionDesensitizeAutoConfiguration
com.orion.ops.framework.desensitize.configuration.OrionDesensitizeAutoConfiguration

View File

@@ -26,6 +26,20 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<!-- quartz -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-quartz</artifactId>
</dependency>
<!-- druid -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,59 @@
package com.orion.ops.framework.job.configuration;
import com.orion.ops.framework.common.constant.AutoConfigureOrderConst;
import com.orion.ops.framework.job.core.utils.QuartzUtils;
import org.quartz.Scheduler;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
import org.springframework.scheduling.quartz.SpringBeanJobFactory;
import javax.sql.DataSource;
/**
* quartz 配置
*
* @author Jiahang Li
* @version 1.0.0
* @since 2024/3/27 0:58
*/
@AutoConfiguration
@AutoConfigureOrder(AutoConfigureOrderConst.FRAMEWORK_JOB_QUARTZ)
public class OrionQuartzAutoConfiguration {
/**
* @return 任务工厂
*/
@Bean
public SpringBeanJobFactory jobFactory() {
return new SpringBeanJobFactory();
}
/**
* @param dataSource dataSource
* @param jobFactory jobFactory
* @return 调度器工厂
*/
@Bean
public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource, SpringBeanJobFactory jobFactory) {
SchedulerFactoryBean factory = new SchedulerFactoryBean();
factory.setDataSource(dataSource);
factory.setJobFactory(jobFactory);
return factory;
}
/**
* @param schedulerFactoryBean 调度器工厂
* @return 调度器
*/
@Bean
public Scheduler scheduler(SchedulerFactoryBean schedulerFactoryBean) {
// 获取 scheduler
Scheduler scheduler = schedulerFactoryBean.getScheduler();
// 将其设置到 QuartzUtils
QuartzUtils.setScheduler(scheduler);
return scheduler;
}
}

View File

@@ -1,4 +1,4 @@
package com.orion.ops.framework.job.config;
package com.orion.ops.framework.job.configuration;
import com.orion.ops.framework.common.constant.AutoConfigureOrderConst;
import org.springframework.boot.autoconfigure.AutoConfiguration;
@@ -10,8 +10,6 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
/**
* 调度器配置
* <p>
* TODO 后面业务扩展需要加上quartz的配置
*
* @author Jiahang Li
* @version 1.0.0

View File

@@ -0,0 +1,198 @@
package com.orion.ops.framework.job.core.utils;
import com.orion.lang.utils.Exceptions;
import com.orion.lang.utils.Objects1;
import com.orion.lang.utils.collect.Maps;
import com.orion.ops.framework.common.constant.FieldConst;
import org.quartz.*;
import java.util.Map;
/**
* quartz 工具类
*
* @author Jiahang Li
* @version 1.0.0
* @since 2024/3/27 17:14
*/
public class QuartzUtils {
private static final String JOB_PREFIX = "Job_";
private static final String TRIGGER_PREFIX = "Trigger_";
private static Scheduler scheduler;
private QuartzUtils() {
}
/**
* 添加任务
*
* @param type type
* @param key key
* @param cron cron
* @param desc desc
* @param jobClass jobClass
*/
public static void addJob(String type, Object key,
String cron, String desc,
Class<? extends Job> jobClass) {
QuartzUtils.addJob(type, key,
cron, desc,
jobClass, Maps.newMap());
}
/**
* 添加任务
*
* @param type type
* @param key key
* @param cron cron
* @param desc desc
* @param jobClass jobClass
* @param params params
*/
public static void addJob(String type, Object key,
String cron, String desc,
Class<? extends Job> jobClass,
Map<String, Object> params) {
params.put(FieldConst.KEY, key);
// 生成 job
JobDetail jobDetail = JobBuilder.newJob(jobClass)
.withDescription(desc)
.withIdentity(getJobKey(type, key))
.usingJobData(new JobDataMap(params))
.storeDurably()
.build();
// 生成触发器
Trigger trigger = TriggerBuilder.newTrigger()
.withIdentity(getTriggerKey(type, key))
.withSchedule(CronScheduleBuilder
.cronSchedule(cron)
// 补偿一次
// .withMisfireHandlingInstructionFireAndProceed()
// 不补偿
.withMisfireHandlingInstructionDoNothing())
.build();
QuartzUtils.addJob(jobDetail, trigger);
}
/**
* 添加任务
*
* @param jobDetail jobDetail
* @param trigger trigger
*/
public static void addJob(JobDetail jobDetail, Trigger trigger) {
try {
scheduler.scheduleJob(jobDetail, trigger);
} catch (Exception e) {
throw Exceptions.task(e);
}
}
/**
* 删除任务
*
* @param type type
* @param key key
*/
public static void deleteJob(String type, Object key) {
try {
scheduler.deleteJob(getJobKey(type, key));
} catch (Exception e) {
throw Exceptions.task(e);
}
}
/**
* 暂停任务
*
* @param type type
* @param key key
*/
public static void pauseJob(String type, Object key) {
try {
scheduler.pauseJob(getJobKey(type, key));
} catch (Exception e) {
throw Exceptions.task(e);
}
}
/**
* 恢复任务
*
* @param type type
* @param key key
*/
public static void resumeJob(String type, Object key) {
try {
scheduler.resumeJob(getJobKey(type, key));
} catch (Exception e) {
throw Exceptions.task(e);
}
}
/**
* 立即执行任务
*
* @param type type
* @param key key
*/
public static void triggerJob(String type, Object key) {
triggerJob(type, key, Maps.newMap());
}
/**
* 立即执行任务
*
* @param type type
* @param key key
* @param params params
*/
public static void triggerJob(String type, Object key, Map<String, Object> params) {
try {
params.put(FieldConst.KEY, key);
scheduler.triggerJob(getJobKey(type, key), new JobDataMap(params));
} catch (Exception e) {
throw Exceptions.task(e);
}
}
/**
* 获取 jobKey
*
* @param type type
* @param key key
* @return jobKey
*/
private static JobKey getJobKey(String type, Object key) {
return new JobKey(JOB_PREFIX + type + "_" + Objects1.toString(key), JOB_PREFIX + type);
}
/**
* 获取 triggerKey
*
* @param type type
* @param key key
* @return triggerKey
*/
private static TriggerKey getTriggerKey(String type, Object key) {
return new TriggerKey(TRIGGER_PREFIX + type + "_" + Objects1.toString(key), TRIGGER_PREFIX + type);
}
/**
* 设置调度器
*
* @param scheduler scheduler
*/
public static void setScheduler(Scheduler scheduler) {
if (QuartzUtils.scheduler != null) {
// unmodified
throw Exceptions.state();
}
QuartzUtils.scheduler = scheduler;
}
}

View File

@@ -1 +1,2 @@
com.orion.ops.framework.job.config.OrionSchedulerAutoConfiguration
com.orion.ops.framework.job.configuration.OrionSchedulerAutoConfiguration
com.orion.ops.framework.job.configuration.OrionQuartzAutoConfiguration

View File

@@ -1,8 +1,8 @@
package com.orion.ops.framework.log.config;
package com.orion.ops.framework.log.configuration;
import com.orion.ops.framework.common.constant.AutoConfigureOrderConst;
import com.orion.ops.framework.common.constant.InterceptorOrderConst;
import com.orion.ops.framework.log.core.config.LogPrinterConfig;
import com.orion.ops.framework.log.configuration.config.LogPrinterConfig;
import com.orion.ops.framework.log.core.interceptor.LogPrinterInterceptor;
import com.orion.ops.framework.log.core.interceptor.PrettyLogPrinterInterceptor;
import com.orion.ops.framework.log.core.interceptor.RowLogPrinterInterceptor;

View File

@@ -1,4 +1,4 @@
package com.orion.ops.framework.log.core.config;
package com.orion.ops.framework.log.configuration.config;
import com.orion.ops.framework.common.utils.ConfigUtils;
import lombok.Data;

View File

@@ -1,4 +1,4 @@
package com.orion.ops.framework.log.core.config;
package com.orion.ops.framework.log.configuration.config;
import com.orion.ops.framework.common.utils.ConfigUtils;
import lombok.Data;

View File

@@ -11,7 +11,7 @@ import com.orion.ops.framework.common.json.filter.FieldIgnoreFilter;
import com.orion.ops.framework.common.meta.TraceIdHolder;
import com.orion.ops.framework.common.security.SecurityHolder;
import com.orion.ops.framework.log.core.annotation.IgnoreLog;
import com.orion.ops.framework.log.core.config.LogPrinterConfig;
import com.orion.ops.framework.log.configuration.config.LogPrinterConfig;
import com.orion.ops.framework.log.core.enums.IgnoreLogMode;
import org.aopalliance.intercept.MethodInvocation;
import org.springframework.validation.BindingResult;

View File

@@ -4,7 +4,7 @@ import com.orion.lang.utils.Exceptions;
import com.orion.lang.utils.Strings;
import com.orion.lang.utils.time.Dates;
import com.orion.ops.framework.common.utils.SwaggerUtils;
import com.orion.ops.framework.log.core.config.LogPrinterConfig;
import com.orion.ops.framework.log.configuration.config.LogPrinterConfig;
import com.orion.web.servlet.web.Servlets;
import lombok.extern.slf4j.Slf4j;
import org.aopalliance.intercept.MethodInvocation;

View File

@@ -5,7 +5,7 @@ import com.orion.lang.utils.Exceptions;
import com.orion.lang.utils.Strings;
import com.orion.lang.utils.time.Dates;
import com.orion.ops.framework.common.utils.SwaggerUtils;
import com.orion.ops.framework.log.core.config.LogPrinterConfig;
import com.orion.ops.framework.log.configuration.config.LogPrinterConfig;
import com.orion.ops.framework.log.core.enums.LogFieldConst;
import com.orion.web.servlet.web.Servlets;
import lombok.extern.slf4j.Slf4j;

View File

@@ -2,8 +2,8 @@
"groups": [
{
"name": "orion.logging.printer",
"type": "com.orion.ops.framework.log.core.config.LogPrinterConfig",
"sourceType": "com.orion.ops.framework.log.core.config.LogPrinterConfig"
"type": "com.orion.ops.framework.log.configuration.config.LogPrinterConfig",
"sourceType": "com.orion.ops.framework.log.configuration.config.LogPrinterConfig"
}
],
"properties": [

View File

@@ -1 +1 @@
com.orion.ops.framework.log.config.OrionLogPrinterConfiguration
com.orion.ops.framework.log.configuration.OrionLogPrinterConfiguration

View File

@@ -1,4 +1,4 @@
package com.orion.ops.framework.monitor.config;
package com.orion.ops.framework.monitor.configuration;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;

View File

@@ -1 +1 @@
com.orion.ops.framework.monitor.config.OrionAdminAutoConfiguration
com.orion.ops.framework.monitor.configuration.OrionAdminAutoConfiguration

View File

@@ -1,20 +1,16 @@
package com.orion.ops.framework.mybatis.config;
package com.orion.ops.framework.mybatis.configuration;
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
import com.orion.ops.framework.common.constant.AutoConfigureOrderConst;
import com.orion.ops.framework.common.constant.FilterOrderConst;
import com.orion.ops.framework.common.web.filter.FilterCreator;
import com.orion.ops.framework.common.security.SecurityHolder;
import com.orion.ops.framework.mybatis.core.cache.CacheClearFilter;
import com.orion.ops.framework.mybatis.core.handler.FieldFillHandler;
import com.orion.ops.framework.mybatis.core.utils.DomainFillUtils;
import org.apache.ibatis.annotations.Mapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
/**
@@ -51,12 +47,4 @@ public class OrionMybatisAutoConfiguration {
return interceptor;
}
/**
* @return mybatis 缓存清理过滤器
*/
@Bean
public FilterRegistrationBean<CacheClearFilter> rowCacheClearFilterBean() {
return FilterCreator.create(new CacheClearFilter(), FilterOrderConst.MYBATIS_CACHE_CLEAR_FILTER);
}
}

View File

@@ -1,31 +0,0 @@
package com.orion.ops.framework.mybatis.core.cache;
import org.springframework.web.filter.OncePerRequestFilter;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* mybatis 缓存清理过滤器
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/6/25 15:14
*/
public class CacheClearFilter extends OncePerRequestFilter {
@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
try {
// 执行请求
filterChain.doFilter(request, response);
} finally {
// 清理缓存
CacheHolder.remove();
}
}
}

View File

@@ -1,61 +0,0 @@
package com.orion.ops.framework.mybatis.core.cache;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.orion.lang.define.collect.MultiHashMap;
import com.orion.lang.define.wrapper.Ref;
import java.io.Serializable;
/**
* 缓存行持有者
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/6/25 14:21
*/
public class CacheHolder {
private CacheHolder() {
}
/**
* 缓存
* <p>
* key: mapper
* value: id > row
*/
private static final ThreadLocal<MultiHashMap<BaseMapper<?>, Serializable, Ref<?>>> HOLDER = ThreadLocal.withInitial(MultiHashMap::new);
/**
* 获取缓存
*
* @param mapper mapper
* @param id id
* @param <T> domain
* @return cacheWrapper
*/
@SuppressWarnings("unchecked")
public static <T> Ref<T> get(BaseMapper<?> mapper, Serializable id) {
return (Ref<T>) HOLDER.get().get(mapper, id);
}
/**
* 设置缓存
*
* @param mapper mapper
* @param id id
* @param row row
* @param <T> domainClass
*/
public static <T> void set(BaseMapper<T> mapper, Serializable id, T row) {
HOLDER.get().put(mapper, id, new Ref<>(row));
}
/**
* 清空缓存
*/
public static void remove() {
HOLDER.remove();
}
}

View File

@@ -44,28 +44,20 @@ public class CodeGenerators {
// .color("blue", "gray", "red", "green", "white")
// .valueUseFields()
// .build(),
Template.create("exec_log", "执行记录", "exec")
Template.create("exec_job", "计划任务", "exec")
.disableUnitTest()
.vue("exec", "exec-log")
.enableRowSelection()
.dict("execLogStatus", "status")
.keyName("execStatus")
.field("execStatus")
.fields("WAITING", "RUNNING", "COMPLETED", "FAILED")
.labels("等待中", "运行中", "执行完成", "执行失败")
.color("gray", "green", "arcoblue", "red")
.valueUseFields()
.vue("exec", "exec-job")
.enableDrawerForm()
.dict("execJobStatus", "status")
.comment("计划任务状态")
.field("execJobStatus")
.fields("DISABLED", "ENABLED")
.labels("禁用", "启用")
.values(0, 1)
.build(),
Template.create("exec_host_log", "主机执行记录", "exec")
Template.create("exec_job_host", "计划任务主机", "exec")
.disableUnitTest()
.vue("exec", "exec-host-log")
.dict("execHostLogStatus", "status")
.keyName("execHostStatus")
.field("execHostStatus")
.fields("WAITING", "RUNNING", "COMPLETED", "FAILED", "INTERRUPTED")
.labels("等待中", "运行中", "执行完成", "执行失败", "已中断")
.color("gray", "green", "arcoblue", "red", "purple")
.valueUseFields()
.vue("exec", "exec-job-host")
.build(),
};
// jdbc 配置 - 使用配置文件

View File

@@ -3,11 +3,9 @@ package com.orion.ops.framework.mybatis.core.mapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.toolkit.Db;
import com.orion.ops.framework.mybatis.core.query.CacheQuery;
import com.orion.ops.framework.mybatis.core.query.Conditions;
import com.orion.ops.framework.mybatis.core.query.DataQuery;
import java.io.Serializable;
import java.util.Collection;
/**
@@ -56,25 +54,6 @@ public interface IMapper<T> extends BaseMapper<T> {
return DataQuery.of(this, wrapper);
}
/**
* 获取 CacheQuery 对象
*
* @return CacheQuery
*/
default CacheQuery<T> cache() {
return CacheQuery.of(this);
}
/**
* 获取 CacheQuery 对象
*
* @param id id
* @return CacheQuery
*/
default CacheQuery<T> cache(Serializable id) {
return CacheQuery.of(this, id);
}
/**
* 批量插入
*

View File

@@ -1,95 +0,0 @@
package com.orion.ops.framework.mybatis.core.query;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.orion.lang.define.wrapper.Ref;
import com.orion.lang.utils.Valid;
import com.orion.ops.framework.mybatis.core.cache.CacheHolder;
import java.io.Serializable;
import java.util.Optional;
import java.util.function.Function;
/**
* 缓存查询器
* <p>
* 查询会存入缓存
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/6/25 13:05
*/
public class CacheQuery<T> {
private final BaseMapper<T> dao;
private Serializable id;
private boolean force;
private CacheQuery(BaseMapper<T> dao, Serializable id) {
this.dao = dao;
this.id = id;
}
public static <T> CacheQuery<T> of(BaseMapper<T> dao) {
Valid.notNull(dao, "dao is null");
return new CacheQuery<>(dao, null);
}
public static <T> CacheQuery<T> of(BaseMapper<T> dao, Serializable id) {
Valid.notNull(dao, "dao is null");
Valid.notNull(id, "id is null");
return new CacheQuery<>(dao, id);
}
/**
* 设置 id
*
* @param id id
* @return this
*/
public CacheQuery<T> id(Serializable id) {
this.id = id;
return this;
}
/**
* 强制查询
*
* @param id id
* @return this
*/
public CacheQuery<T> force(Serializable id) {
this.force = true;
this.id = id;
return this;
}
public <R> Optional<R> optional(Function<T, R> mapper) {
Valid.notNull(mapper, "convert function is null");
return Optional.ofNullable(this.get())
.map(mapper);
}
public Optional<T> optional() {
return Optional.ofNullable(this.get());
}
public T get() {
// 不查询缓存
if (!force) {
// 从缓存中获取
Ref<T> ref = CacheHolder.get(dao, id);
// 命中直接返回
if (ref != null) {
return ref.get();
}
}
// 查询
T row = dao.selectById(id);
// 设置缓存
CacheHolder.set(dao, id, row);
return row;
}
}

View File

@@ -1 +1 @@
com.orion.ops.framework.mybatis.config.OrionMybatisAutoConfiguration
com.orion.ops.framework.mybatis.configuration.OrionMybatisAutoConfiguration

View File

@@ -7,20 +7,18 @@ SELECT @MODULE_KEY_ID:= id FROM dict_key WHERE key_name = 'operatorLogModule' AN
SELECT @MODULE_KEY_MAX_SORT:= IFNULL(MAX(sort), 0) FROM dict_value where key_id = @MODULE_KEY_ID AND deleted = 0;
-- 类型 key id
SELECT @TYPE_KEY_ID:= id FROM dict_key WHERE key_name = 'operatorLogType' AND deleted = 0;
-- 类型 key 排序
SELECT @TYPE_KEY_MAX_SORT:= IFNULL(MAX(sort), 0) FROM dict_value WHERE key_id = @TYPE_KEY_ID AND deleted = 0;
-- 插入类型
INSERT INTO dict_value
(`key_id`, `key_name`, `value`, `label`, `extra`, `sort`, `create_time`, `update_time`, `creator`, `updater`, `deleted`)
VALUES
(@MODULE_KEY_ID, 'operatorLogModule', '${package.ModuleName}:${typeHyphen}', '$!{table.comment}', '{}', @MODULE_KEY_MAX_SORT + 10, now(), now(), '1', '1', 0),
(@TYPE_KEY_ID, 'operatorLogType', '${typeHyphen}:create', '创建$!{table.comment}', '{}', @TYPE_KEY_MAX_SORT + 10, now(), now(), '1', '1', 0),
(@TYPE_KEY_ID, 'operatorLogType', '${typeHyphen}:update', '更新$!{table.comment}', '{}', @TYPE_KEY_MAX_SORT + 20, now(), now(), '1', '1', 0),
(@TYPE_KEY_ID, 'operatorLogType', '${typeHyphen}:create', '创建$!{table.comment}', '{}', 10, now(), now(), '1', '1', 0),
(@TYPE_KEY_ID, 'operatorLogType', '${typeHyphen}:update', '更新$!{table.comment}', '{}', 20, now(), now(), '1', '1', 0),
#if($meta.enableExport)
(@TYPE_KEY_ID, 'operatorLogType', '${typeHyphen}:delete', '删除$!{table.comment}', '{}', @TYPE_KEY_MAX_SORT + 30, now(), now(), '1', '1', 0),
(@TYPE_KEY_ID, 'operatorLogType', '${typeHyphen}:export', '导出$!{table.comment}', '{}', @TYPE_KEY_MAX_SORT + 40, now(), now(), '1', '1', 0);
(@TYPE_KEY_ID, 'operatorLogType', '${typeHyphen}:delete', '删除$!{table.comment}', '{}', 30, now(), now(), '1', '1', 0),
(@TYPE_KEY_ID, 'operatorLogType', '${typeHyphen}:export', '导出$!{table.comment}', '{}', 40, now(), now(), '1', '1', 0);
#else
(@TYPE_KEY_ID, 'operatorLogType', '${typeHyphen}:delete', '删除$!{table.comment}', '{}', @TYPE_KEY_MAX_SORT + 30, now(), now(), '1', '1', 0);
(@TYPE_KEY_ID, 'operatorLogType', '${typeHyphen}:delete', '删除$!{table.comment}', '{}', 30, now(), now(), '1', '1', 0);
#end
#end

View File

@@ -2,9 +2,9 @@
-- 父菜单
INSERT INTO system_menu
(parent_id, name, type, sort, visible, status, cache, creator, updater, deleted)
(parent_id, name, type, sort, visible, status, cache, component, creator, updater, deleted)
VALUES
(0, '${table.comment}管理', 1, 10, 1, 1, 1, '1', '1', 0);
(0, '${table.comment}管理', 1, 10, 1, 1, 1, '${vue.moduleEntityFirstLower}Module', '1', '1', 0);
-- 设置临时父菜单id
SELECT @TMP_PARENT_ID:=LAST_INSERT_ID();

View File

@@ -1,8 +1,6 @@
#if($dictMap.entrySet().size() > 0)
#foreach($enumEntity in $dictMap.entrySet())
/**
* $enumEntity.value.comment
*/
// $enumEntity.value.comment
// FIXME 检查这里的类型
export const $enumEntity.value.field = {
#set($count = $enumEntity.value.fields.size() - 1)
@@ -10,7 +8,7 @@ export const $enumEntity.value.field = {
// $enumEntity.value.labels.get($index)
$enumEntity.value.fields.get($index): '$enumEntity.value.values.get($index)',
#end
}
};
#end
#foreach($enumEntity in $dictMap.entrySet())

View File

@@ -1,4 +1,4 @@
package com.orion.ops.framework.redis.config;
package com.orion.ops.framework.redis.configuration;
import com.orion.ops.framework.common.constant.AutoConfigureOrderConst;
import org.springframework.boot.autoconfigure.AutoConfiguration;
@@ -19,9 +19,9 @@ import org.springframework.data.redis.serializer.RedisSerializer;
* @version 1.0.0
* @since 2023/8/23 18:13
*/
@EnableCaching
@AutoConfiguration
@AutoConfigureOrder(AutoConfigureOrderConst.FRAMEWORK_REDIS_CACHE)
@EnableCaching
@EnableConfigurationProperties({CacheProperties.class})
public class OrionCacheAutoConfiguration {

View File

@@ -1,9 +1,12 @@
package com.orion.ops.framework.redis.config;
package com.orion.ops.framework.redis.configuration;
import com.orion.ops.framework.common.constant.AutoConfigureOrderConst;
import com.orion.ops.framework.redis.configuration.config.RedissonConfig;
import com.orion.ops.framework.redis.core.utils.RedisUtils;
import org.redisson.spring.starter.RedissonAutoConfigurationCustomizer;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Lazy;
import org.springframework.data.redis.connection.RedisConnectionFactory;
@@ -20,6 +23,7 @@ import org.springframework.data.redis.serializer.RedisSerializer;
@Lazy(value = false)
@AutoConfiguration
@AutoConfigureOrder(AutoConfigureOrderConst.FRAMEWORK_REDIS)
@EnableConfigurationProperties(RedissonConfig.class)
public class OrionRedisAutoConfiguration {
/**
@@ -40,5 +44,17 @@ public class OrionRedisAutoConfiguration {
return redisTemplate;
}
/**
* @param redissonConfig config
* @return redisson 自定义配置
*/
@Bean
public RedissonAutoConfigurationCustomizer redissonConfigurationCustomizer(RedissonConfig redissonConfig) {
return config -> {
config.setThreads(redissonConfig.getThreads());
config.setNettyThreads(redissonConfig.getNettyThreads());
};
}
}

View File

@@ -0,0 +1,27 @@
package com.orion.ops.framework.redis.configuration.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* redisson 配置
*
* @author Jiahang Li
* @version 1.0.0
* @since 2024/3/27 15:17
*/
@Data
@ConfigurationProperties("spring.redisson")
public class RedissonConfig {
/**
* 任务线程数
*/
private Integer threads;
/**
* netty 线程数
*/
private Integer nettyThreads;
}

View File

@@ -0,0 +1,21 @@
{
"groups": [
{
"name": "spring.redisson",
"type": "com.orion.ops.framework.redis.configuration.config.RedissonConfig",
"sourceType": "com.orion.ops.framework.redis.configuration.config.RedissonConfig"
}
],
"properties": [
{
"name": "spring.redisson.threads",
"type": "java.lang.Integer",
"description": "任务线程数."
},
{
"name": "spring.redisson.netty-threads",
"type": "java.lang.Integer",
"description": "netty 线程数."
}
]
}

View File

@@ -1,2 +1,2 @@
com.orion.ops.framework.redis.config.OrionRedisAutoConfiguration
com.orion.ops.framework.redis.config.OrionCacheAutoConfiguration
com.orion.ops.framework.redis.configuration.OrionRedisAutoConfiguration
com.orion.ops.framework.redis.configuration.OrionCacheAutoConfiguration

View File

@@ -1,7 +1,8 @@
package com.orion.ops.framework.security.config;
package com.orion.ops.framework.security.configuration;
import com.orion.ops.framework.common.constant.AutoConfigureOrderConst;
import com.orion.ops.framework.common.crypto.ValueCrypto;
import com.orion.ops.framework.security.configuration.config.CryptoConfig;
import com.orion.ops.framework.security.core.crypto.PrimaryValueCrypto;
import com.orion.ops.framework.security.core.crypto.aes.AesCryptoProcessor;
import org.springframework.boot.autoconfigure.AutoConfiguration;

View File

@@ -1,6 +1,7 @@
package com.orion.ops.framework.security.config;
package com.orion.ops.framework.security.configuration;
import com.orion.ops.framework.common.constant.AutoConfigureOrderConst;
import com.orion.ops.framework.security.configuration.config.SecurityConfig;
import com.orion.ops.framework.security.core.context.TransmittableThreadLocalSecurityContextHolderStrategy;
import com.orion.ops.framework.security.core.filter.TokenAuthenticationFilter;
import com.orion.ops.framework.security.core.handler.AuthenticationEntryPointHandler;

View File

@@ -1,4 +1,4 @@
package com.orion.ops.framework.security.config;
package com.orion.ops.framework.security.configuration.config;
import com.orion.ops.framework.security.core.crypto.aes.AesCryptoConfig;
import lombok.Data;

View File

@@ -1,4 +1,4 @@
package com.orion.ops.framework.security.config;
package com.orion.ops.framework.security.configuration.config;
import com.orion.ops.framework.common.utils.ConfigUtils;
import lombok.Data;
@@ -20,13 +20,17 @@ public class SecurityConfig {
/**
* 加密复杂度
*/
private Integer passwordEncoderLength = 4;
private Integer passwordEncoderLength;
/**
* 匿名接口
*/
private List<String> permitUrl;
public SecurityConfig() {
this.passwordEncoderLength = 4;
}
public void setPermitUrl(List<String> permitUrl) {
this.permitUrl = ConfigUtils.parseStringList(permitUrl);
}

View File

@@ -1,6 +1,6 @@
package com.orion.ops.framework.security.core.strategy;
import com.orion.ops.framework.security.config.SecurityConfig;
import com.orion.ops.framework.security.configuration.config.SecurityConfig;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer;

View File

@@ -2,13 +2,13 @@
"groups": [
{
"name": "orion.security",
"type": "com.orion.ops.framework.security.config.SecurityConfig",
"sourceType": "com.orion.ops.framework.security.config.SecurityConfig"
"type": "com.orion.ops.framework.security.configuration.config.SecurityConfig",
"sourceType": "com.orion.ops.framework.security.configuration.config.SecurityConfig"
},
{
"name": "orion.crypto",
"type": "com.orion.ops.framework.security.config.CryptoConfig",
"sourceType": "com.orion.ops.framework.security.config.CryptoConfig"
"type": "com.orion.ops.framework.security.configuration.config.CryptoConfig",
"sourceType": "com.orion.ops.framework.security.configuration.config.CryptoConfig"
},
{
"name": "orion.crypto.aes",

View File

@@ -1,2 +1,2 @@
com.orion.ops.framework.security.config.OrionSecurityAutoConfiguration
com.orion.ops.framework.security.config.OrionCryptoAutoConfiguration
com.orion.ops.framework.security.configuration.OrionSecurityAutoConfiguration
com.orion.ops.framework.security.configuration.OrionCryptoAutoConfiguration

View File

@@ -1,7 +1,8 @@
package com.orion.ops.framework.storage.config;
package com.orion.ops.framework.storage.configuration;
import com.orion.ops.framework.common.constant.AutoConfigureOrderConst;
import com.orion.ops.framework.common.file.FileClient;
import com.orion.ops.framework.storage.configuration.config.StorageConfig;
import com.orion.ops.framework.storage.core.client.PrimaryFileClient;
import com.orion.ops.framework.storage.core.client.local.LocalFileClient;
import org.springframework.boot.autoconfigure.AutoConfiguration;

View File

@@ -1,4 +1,4 @@
package com.orion.ops.framework.storage.config;
package com.orion.ops.framework.storage.configuration.config;
import com.orion.ops.framework.storage.core.client.local.LocalFileClientConfig;
import lombok.Data;

View File

@@ -2,8 +2,8 @@
"groups": [
{
"name": "orion.storage",
"type": "com.orion.ops.framework.storage.config.StorageConfig",
"sourceType": "com.orion.ops.framework.storage.config.StorageConfig"
"type": "com.orion.ops.framework.storage.configuration.config.StorageConfig",
"sourceType": "com.orion.ops.framework.storage.configuration.config.StorageConfig"
},
{
"name": "orion.storage.local",

View File

@@ -1 +1 @@
com.orion.ops.framework.storage.config.OrionStorageAutoConfiguration
com.orion.ops.framework.storage.configuration.OrionStorageAutoConfiguration

View File

@@ -1,6 +1,7 @@
package com.orion.ops.framework.swagger.config;
package com.orion.ops.framework.swagger.configuration;
import com.orion.ops.framework.common.constant.AutoConfigureOrderConst;
import com.orion.ops.framework.swagger.configuration.config.SwaggerConfig;
import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;

View File

@@ -1,4 +1,4 @@
package com.orion.ops.framework.swagger.config;
package com.orion.ops.framework.swagger.configuration.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

View File

@@ -2,8 +2,8 @@
"groups": [
{
"name": "orion.swagger",
"type": "com.orion.ops.framework.swagger.config.SwaggerConfig",
"sourceType": "com.orion.ops.framework.swagger.config.SwaggerConfig"
"type": "com.orion.ops.framework.swagger.configuration.config.SwaggerConfig",
"sourceType": "com.orion.ops.framework.swagger.configuration.config.SwaggerConfig"
}
],
"properties": [
@@ -17,6 +17,11 @@
"type": "java.lang.String",
"description": "swagger 项目描述."
},
{
"name": "orion.swagger.author",
"type": "java.lang.String",
"description": "swagger 项目作者."
},
{
"name": "orion.swagger.version",
"type": "java.lang.String",

View File

@@ -1 +1 @@
com.orion.ops.framework.swagger.config.OrionSwaggerAutoConfiguration
com.orion.ops.framework.swagger.configuration.OrionSwaggerAutoConfiguration

View File

@@ -1,4 +1,4 @@
package com.orion.ops.framework.test.config;
package com.orion.ops.framework.test.configuration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;

View File

@@ -1,4 +1,4 @@
package com.orion.ops.framework.test.config;
package com.orion.ops.framework.test.configuration;
import com.orion.lang.utils.collect.Sets;
import com.orion.ops.framework.common.security.LoginUser;

View File

@@ -1,4 +1,4 @@
package com.orion.ops.framework.test.config;
package com.orion.ops.framework.test.configuration;
import com.github.fppt.jedismock.RedisServer;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;

View File

@@ -2,13 +2,13 @@ package com.orion.ops.framework.test.core.base;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
import com.orion.ops.framework.common.config.OrionCommonAutoConfiguration;
import com.orion.ops.framework.datasource.config.OrionDataSourceAutoConfiguration;
import com.orion.ops.framework.mybatis.config.OrionMybatisAutoConfiguration;
import com.orion.ops.framework.redis.config.OrionRedisAutoConfiguration;
import com.orion.ops.framework.test.config.OrionH2SqlInitializationTestConfiguration;
import com.orion.ops.framework.test.config.OrionMockBeanTestConfiguration;
import com.orion.ops.framework.test.config.OrionMockRedisTestConfiguration;
import com.orion.ops.framework.common.configuration.OrionCommonAutoConfiguration;
import com.orion.ops.framework.datasource.configuration.OrionDataSourceAutoConfiguration;
import com.orion.ops.framework.mybatis.configuration.OrionMybatisAutoConfiguration;
import com.orion.ops.framework.redis.configuration.OrionRedisAutoConfiguration;
import com.orion.ops.framework.test.configuration.OrionH2SqlInitializationTestConfiguration;
import com.orion.ops.framework.test.configuration.OrionMockBeanTestConfiguration;
import com.orion.ops.framework.test.configuration.OrionMockRedisTestConfiguration;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.TestMethodOrder;
import org.redisson.spring.starter.RedissonAutoConfiguration;

View File

@@ -22,11 +22,13 @@
<artifactId>orion-ops-framework-common</artifactId>
</dependency>
<!-- web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- jdbc -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>

View File

@@ -1,4 +1,4 @@
package com.orion.ops.framework.web.config;
package com.orion.ops.framework.web.configuration;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;

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