Compare commits

...

236 Commits

Author SHA1 Message Date
李佳航
80e7c28ef1 Merge pull request #111 from dromara/dev
Dev
2025-06-27 12:07:06 +08:00
lijiahangmax
154f8d56ac 🐳 修改 docker 配置. 2025-06-27 12:06:39 +08:00
lijiahangmax
156e63bef9 🐳 修改 docker 配置. 2025-06-27 11:41:09 +08:00
lijiahangmax
34d65c0bc5 🎨 格式化代码. 2025-06-27 11:39:08 +08:00
lijiahangmax
decbce5410 🎨 格式化代码. 2025-06-26 01:27:14 +08:00
lijiahangmax
8b795e889a 🎨 格式化代码. 2025-06-26 01:23:13 +08:00
lijiahangmax
b75446f405 ✏️ 修改文档. 2025-06-26 01:07:35 +08:00
lijiahangmax
2b43270896 🔨 修改终端逻辑. 2025-06-26 01:06:36 +08:00
lijiahangmax
9d4c2aaeb4 🎉 优化 terminal 模块逻辑. 2025-06-26 00:59:15 +08:00
lijiahangmax
712b175179 🎉 优化 exec 模块逻辑. 2025-06-26 00:51:21 +08:00
lijiahangmax
10178d998e 🎉 优化 asset 模块逻辑. 2025-06-25 19:16:04 +08:00
lijiahangmax
c603c57ad8 🎉 优化 infra 模块逻辑. 2025-06-25 19:06:08 +08:00
lijiahangmax
f69093de66 🎉 优化系统架构. 2025-06-25 18:59:16 +08:00
lijiahangmax
cec7e21d5a 🎉 优化系统架构. 2025-06-25 18:57:05 +08:00
lijiahangmax
f1ade56e13 升级版本. 2025-06-25 18:48:25 +08:00
lijiahangmax
b182452f30 🎉 重构终端代码. 2025-06-25 14:50:35 +08:00
lijiahangmax
5ed513f472 🎉 重构页面代码. 2025-06-25 14:50:25 +08:00
lijiahangmax
aa8b380289 🎉 重构组件代码. 2025-06-25 14:50:01 +08:00
lijiahangmax
6149010bf4 🎉 重构前端代码. 2025-06-25 14:49:36 +08:00
lijiahangmax
5183b7ccb4 添加 guacd 镜像. 2025-06-25 12:16:33 +08:00
lijiahangmax
f78958532b 🐛 右键菜单保存报错的问题. 2025-06-24 20:44:48 +08:00
lijiahangmax
603dd89be4 🔨 下线会话. 2025-06-24 20:44:14 +08:00
lijiahangmax
1a58e40607 🔨 修改 noredis 配置. 2025-06-22 00:07:13 +08:00
lijiahangmax
84721f2e17 优化连接逻辑. 2025-06-22 00:06:51 +08:00
lijiahangmax
d72ccb1df6 修改防抖时间. 2025-06-13 23:53:01 +08:00
李佳航
6d4952c483 Merge pull request #109 from dromara/dev
Dev
2025-06-06 16:39:28 +08:00
lijiahangmax
7fab68f8c0 升级版本. 2025-06-06 16:27:29 +08:00
lijiahangmax
3a586c47a3 添加更新日期. 2025-06-06 16:18:48 +08:00
lijiahangmax
1767079249 复制主机. 2025-06-06 15:58:49 +08:00
lijiahangmax
fdd3be5a91 🐛 复制主机. 2025-05-30 01:29:28 +08:00
lijiahangmax
2457a015e4 🐛 修复分组无法删除的问题. 2025-05-29 22:15:08 +08:00
李佳航
40a99eb67a Merge pull request #106 from dromara/dev
Dev
2025-05-29 19:14:53 +08:00
lijiahangmax
1fcf239561 ✏️ 修改文档. 2025-05-29 19:07:16 +08:00
lijiahangmax
bbb1bb0db6 🔨 自定义标签名称. 2025-05-28 20:39:28 +08:00
李佳航
f79d89def9 Merge pull request #101 from dromara/dev
Dev
2025-04-06 21:44:08 +08:00
lijiahangmax
fd535f00c8 🔨 优化前端逻辑. 2025-04-06 21:41:41 +08:00
lijiahangmax
2c07551b88 🐛 修复修改主机配置报错. 2025-04-06 21:17:50 +08:00
lijiahangmax
86914321a6 🔖 修改 sql 脚本. 2025-04-06 11:11:39 +08:00
lijiahangmax
f64c15a01b 🔖 升级版本. 2025-04-06 10:56:28 +08:00
李佳航
8265cc3cfd Merge pull request #100 from dromara/dev
Dev
2025-04-03 14:55:55 +08:00
lijiahangmax
84c8bc98af 🔖 修改 sql 脚本. 2025-04-03 14:34:14 +08:00
lijiahangmax
858ca1becc 🔖 升级版本. 2025-04-03 01:43:30 +08:00
lijiahangmax
0e0c9cc628 🔨 添加 SN. 2025-04-03 01:38:37 +08:00
lijiahangmax
cdc3c88507 🔨 优化前端逻辑. 2025-04-02 13:33:21 +08:00
lijiahangmax
10624b42c4 🔨 优化代码逻辑. 2025-03-31 21:00:31 +08:00
lijiahang
6479694b4b 🔨 添加主机配置逻辑. 2025-03-28 16:07:15 +08:00
lijiahang
d2e72aea56 🔨 修改基础查询. 2025-03-28 15:32:08 +08:00
lijiahang
986f0974db 🔨 优化主机逻辑. 2025-03-28 14:34:51 +08:00
lijiahang
6b5c7fd409 Merge remote-tracking branch 'origin/dev' into dev 2025-03-26 15:27:32 +08:00
lijiahang
ca803e4e5a 添加系统架构枚举. 2025-03-26 15:27:16 +08:00
lijiahang
5de22e4b41 🐳 修改 e2e 配置. 2025-03-26 15:26:30 +08:00
lijiahangmax
b8e81ee100 修改文件过滤规则. 2025-03-26 01:42:14 +08:00
李佳航
0b53924dbd Merge pull request #97 from dromara/dev
Dev
2025-03-24 09:57:29 +08:00
lijiahangmax
3359d163fb 🐳 修改 docker 配置. 2025-03-23 22:05:59 +08:00
lijiahangmax
2ef1517338 🔖 升级版本. 2025-03-23 21:39:49 +08:00
lijiahangmax
a5bee66afa 🔖 升级版本. 2025-03-23 13:23:10 +08:00
lijiahangmax
88fd0e31e0 🔖 升级版本. 2025-03-23 13:03:48 +08:00
lijiahangmax
226dfb2c25 🔖 升级版本. 2025-03-23 11:41:13 +08:00
lijiahangmax
94ed071897 🔨 表格字段. 2025-03-22 00:58:15 +08:00
lijiahangmax
4efd2b5ec2 🔨 表格字段. 2025-03-22 00:11:30 +08:00
lijiahangmax
76e766367f 🔨 查询字段. 2025-03-22 00:00:41 +08:00
lijiahangmax
b3009bb65e 🔨 查询字段. 2025-03-21 00:05:04 +08:00
lijiahangmax
819520ef73 🔨 添加排序字段. 2025-03-20 00:39:49 +08:00
lijiahangmax
a2acbc0c3a 🔨 排序字段. 2025-03-20 00:08:23 +08:00
lijiahangmax
2e8a7c40d9 🔨 添加排序字段. 2025-03-19 23:37:13 +08:00
lijiahangmax
94c0b6a785 🔨 添加排序字段. 2025-03-19 23:24:08 +08:00
lijiahangmax
9752dfa680 🐳 分离 docker 镜像. 2025-03-17 21:27:48 +08:00
lijiahangmax
bc776e4186 Merge remote-tracking branch 'origin/dev' into dev 2025-03-16 00:31:40 +08:00
lijiahangmax
cdce5a0dc1 🔨 优化导包. 2025-03-16 00:30:43 +08:00
lijiahangmax
0db732fc19 🔨 优化主机逻辑. 2025-03-16 00:20:18 +08:00
lijiahang
69f331c048 修改路由规则. 2025-03-11 15:36:41 +08:00
李佳航
032f1763f6 Merge pull request #95 from dromara/dev
Dev
2025-03-10 11:02:45 +08:00
lijiahangmax
d071ef64d8 🔨 编译问题. 2025-03-09 20:11:21 +08:00
lijiahangmax
c820443a3b 升级版本. 2025-03-09 20:00:10 +08:00
lijiahangmax
14c4e77445 修改终端提示. 2025-03-09 19:58:10 +08:00
lijiahangmax
79d9f69ed4 修改终端提示. 2025-03-08 12:44:33 +08:00
lijiahangmax
6c9065072d Merge remote-tracking branch 'origin/dev' into dev 2025-03-07 22:03:52 +08:00
lijiahang
05bc6c1fbb 修改路由规则. 2025-03-07 15:50:26 +08:00
lijiahang
a1dd9eec01 优化单元测试. 2025-03-07 14:57:26 +08:00
lijiahangmax
660df7c110 Merge remote-tracking branch 'origin/dev' into dev 2025-03-06 23:29:28 +08:00
lijiahang
093501a400 🐛 代码生成器未能读取到环境变量. 2025-03-06 10:17:48 +08:00
lijiahang
7943deb924 优化终端会话管理器. 2025-03-05 10:20:20 +08:00
lijiahangmax
490167e649 Merge remote-tracking branch 'origin/dev' into dev 2025-03-04 21:46:00 +08:00
lijiahang
8635f6bb05 🔨 修改静态资源匿名处理策略. 2025-03-04 10:27:55 +08:00
李佳航
9e31d820e0 Merge pull request #94 from dromara/dev
Dev
2025-03-03 11:25:03 +08:00
lijiahang
92353d859a 初始化 sql. 2025-03-03 11:13:42 +08:00
lijiahang
bef8d69e59 Merge remote-tracking branch 'origin/dev' into dev
# Conflicts:
#	sql/init-4-data.sql
2025-03-03 09:46:24 +08:00
lijiahangmax
ac46dd6703 🎨 优化统计样式. 2025-03-02 20:16:09 +08:00
lijiahangmax
b3ab78e063 🔖 升级版本. 2025-03-02 13:28:41 +08:00
lijiahangmax
95d2c6cb65 🔨 修改 sql 脚本. 2025-03-01 23:23:52 +08:00
lijiahang
7017c7502b 修改创建人逻辑. 2025-02-21 17:57:35 +08:00
李佳航
c14055ba8c Merge pull request #91 from dromara/dev
Dev
2025-02-19 10:17:03 +08:00
lijiahangmax
04aa6c9680 ✏️ 修改文档. 2025-02-18 23:35:48 +08:00
lijiahang
397bbb2657 🔖 升级版本. 2025-02-18 10:56:41 +08:00
lijiahang
9a68282127 🐛 修复计划任务日志无权限. 2025-02-18 10:54:10 +08:00
lijiahang
dcd02acc61 删除冗余配置. 2025-02-14 12:07:39 +08:00
李佳航
1025688e9b Merge pull request #88 from dromara/dev
Dev
2025-02-11 09:42:16 +08:00
lijiahangmax
26eeb26a75 ✏️ 修改文档. 2025-02-10 22:59:41 +08:00
lijiahang
7f76325284 🔖 升级版本. 2025-02-10 10:08:55 +08:00
lijiahang
de9a921c49 🔨 修改日志查看逻辑. 2025-02-10 09:51:53 +08:00
lijiahang
a9ac9d0f79 🔨 优化执行日志查看. 2025-02-08 10:03:07 +08:00
lijiahang
a14b28de6a 修改连接记录字段. 2025-02-07 10:07:45 +08:00
lijiahang
ccd7430b8f 🔨 自动清理任务使用系统配置. 2025-02-06 09:56:12 +08:00
lijiahang
6791ea5770 🔨 登录使用系统配置. 2025-02-06 09:55:37 +08:00
lijiahang
2d5835b150 修改文件预览逻辑. 2025-02-05 10:45:16 +08:00
lijiahang
cec11ce8c3 🔨 设置执行参数逻辑. 2025-02-05 10:18:22 +08:00
lijiahang
972103841c 🔨 优化执行日志查看逻辑. 2025-02-05 10:16:12 +08:00
lijiahang
89f6d2cd1c 🔨 优化执行日志查看逻辑. 2025-02-05 10:14:07 +08:00
lijiahang
d13008ce0c 🔨 添加修改密码时间. 2025-02-05 10:08:30 +08:00
lijiahang
abf384dd3c 🔨 修改系统设置逻辑. 2025-01-23 10:13:54 +08:00
李佳航
0abd4a893b Merge pull request #87 from dromara/hotfix
Hotfix
2025-01-22 23:17:36 +08:00
李佳航
d0710fb52b Merge branch 'dev' into hotfix 2025-01-22 23:12:47 +08:00
李佳航
534fe83ac2 Merge pull request #86 from dromara/hotfix
merge
2025-01-22 22:59:57 +08:00
lijiahangmax
d95d958de0 🔖 升级版本. 2025-01-22 22:40:28 +08:00
lijiahangmax
4e5730f31f 🐛 修复加密失败的问题. 2025-01-22 22:32:10 +08:00
lijiahang
81b9bacb96 🔨 添加日志系统设置. 2025-01-21 10:05:36 +08:00
lijiahang
dc42a31711 🔨 修改系统设置逻辑. 2025-01-20 10:24:40 +08:00
lijiahang
27e3e65ea1 🔨 使用系统配置替代配置文件. 2025-01-20 10:21:41 +08:00
lijiahang
a001ab3f16 🔨 优化批量执行模块. 2025-01-20 09:59:45 +08:00
李佳航
aeb161a482 Merge pull request #84 from dromara/dev
Dev
2025-01-20 09:47:44 +08:00
lijiahangmax
5ecb476be5 🔖 升级版本. 2025-01-19 18:56:02 +08:00
lijiahang
5389334304 ✏️ 修改 sql 脚本. 2025-01-17 10:02:57 +08:00
lijiahang
56ece9c854 🔨 添加描述字段. 2025-01-17 09:56:30 +08:00
lijiahang
a217b95783 🔨 无 redis 测试配置. 2025-01-17 09:51:21 +08:00
lijiahang
ffcdd80996 🔨 添加描述字段. 2025-01-16 10:03:38 +08:00
lijiahang
f804dc0338 🔨 添加描述字段. 2025-01-16 10:00:12 +08:00
lijiahangmax
25359f0f66 🎨 修改页面大小. 2025-01-15 23:44:54 +08:00
lijiahang
932bdb86ad 🎨 添加终端聚焦样式. 2025-01-15 10:21:01 +08:00
lijiahang
0e14e55c5a 🔨 修改系统设置逻辑. 2025-01-15 10:18:08 +08:00
lijiahang
e2a645d1e1 🔨 优化配置中心逻辑. 2025-01-15 10:16:36 +08:00
lijiahang
51392e09e2 🎨 修改系统设置样式. 2025-01-14 12:26:34 +08:00
lijiahang
8d71d64d49 ⬆️ 升级 axios 版本. 2025-01-14 10:09:07 +08:00
lijiahang
956c34176d 🔨 添加系统加密配置. 2025-01-14 10:05:01 +08:00
lijiahang
f65aa89421 🔨 加密参数. 2025-01-13 15:48:33 +08:00
lijiahang
c481cb0ae4 🔨 优化偏好处理逻辑. 2025-01-13 11:01:11 +08:00
lijiahang
a734ec40ec 🔨 优化偏好处理逻辑. 2025-01-13 09:43:43 +08:00
lijiahang
2a5bda3d00 🔨 系统设置模块优化. 2025-01-10 10:44:45 +08:00
lijiahang
72579c7e83 🎨 优化项目模块. 2025-01-09 10:02:22 +08:00
lijiahang
41797e41d2 🔨 添加配置及加密模块. 2025-01-08 11:40:42 +08:00
lijiahang
35733e80eb 🎨 优化项目模块. 2025-01-08 10:52:36 +08:00
lijiahang
4119dbad6a 🎨 优化项目模块. 2025-01-07 18:23:39 +08:00
lijiahang
c0122079c1 🎨 优化项目模块. 2025-01-07 17:55:22 +08:00
李佳航
c793ebf394 Merge pull request #79 from dromara/dev
Dev
2025-01-07 09:58:05 +08:00
lijiahangmax
45b3e0746a ✏️ 修改文档. 2025-01-07 00:08:33 +08:00
lijiahang
aaf18d79bf 🔨 修改构建错误. 2025-01-06 15:25:15 +08:00
lijiahangmax
4e3f548ac8 🔖 升级版本. 2025-01-05 18:33:38 +08:00
lijiahangmax
cbe1eeec74 🐛 修复刷新页面无参数的问题. 2024-12-30 22:50:11 +08:00
lijiahang
0557c41454 🎨 优化主机分组授权显示. 2024-12-30 15:54:07 +08:00
lijiahangmax
c2311f0682 优化缓存策略. 2024-12-29 23:58:44 +08:00
lijiahangmax
3b89e9bf29 🔨 优化会话连接逻辑. 2024-12-29 15:14:19 +08:00
lijiahangmax
6b14c2ef9c 🎨 优化策略定义逻辑. 2024-12-29 13:11:09 +08:00
lijiahangmax
6606d2ca76 🔨 工作台. 2024-12-28 23:28:23 +08:00
lijiahang
1846a496c1 🔨 资产模块统计. 2024-12-27 14:44:59 +08:00
lijiahang
7996ae5b63 🔨 基础模块统计. 2024-12-27 13:54:45 +08:00
lijiahang
cb5657c685 📝 工作台前端. 2024-12-27 11:19:52 +08:00
lijiahangmax
95759adf91 🐛 终端设置无法滚动的问题. 2024-12-27 01:11:18 +08:00
lijiahangmax
4d08a18548 🔨 添加连接操作. 2024-12-26 22:19:30 +08:00
lijiahang
8f1e976c2f 🔨 添加执行用户条件. 2024-12-26 14:03:47 +08:00
lijiahang
5ee18436b8 Merge remote-tracking branch 'origin/dev' into dev 2024-12-26 13:52:06 +08:00
lijiahang
00ea709f9e 🎨 修改代码规范. 2024-12-26 13:51:41 +08:00
lijiahangmax
4873d2cc91 📝 修改文档. 2024-12-25 20:48:39 +08:00
lijiahangmax
4c306fb4f8 🔨 修改为 latest 版本. 2024-12-25 20:19:32 +08:00
lijiahang
9017ada3aa 📝 修改文档. 2024-12-24 10:55:18 +08:00
李佳航
00c4484184 Merge pull request #75 from dromara/dev
 修改 E2E 测试样例.
2024-12-24 10:35:23 +08:00
lijiahang
5a6b1bfafd 修改 E2E 测试样例. 2024-12-24 10:34:26 +08:00
李佳航
c25e74c296 Merge pull request #74 from dromara/dev
Dev
2024-12-24 10:28:46 +08:00
lijiahang
bbe2980998 修改表结构. 2024-12-24 10:03:23 +08:00
lijiahangmax
544a01534d Merge remote-tracking branch 'origin/dev' into dev 2024-12-23 23:24:19 +08:00
lijiahangmax
41a9bebe06 🎨 规范代码. 2024-12-23 23:23:42 +08:00
lijiahang
c84452630a 🔨 修改文档. 2024-12-23 17:53:58 +08:00
lijiahang
23bf0e360f 📝 修改文档. 2024-12-23 12:31:01 +08:00
lijiahang
62eb8f2d9a 📝 修改文档. 2024-12-23 11:23:49 +08:00
lijiahang
adcc6dddef 🔖 升级版本. 2024-12-23 10:52:49 +08:00
lijiahang
8bbda6691d 📝 修改文档. 2024-12-23 10:20:54 +08:00
lijiahangmax
79f14632bb 去除无用配置. 2024-12-21 01:51:55 +08:00
lijiahangmax
d51de4a520 Merge remote-tracking branch 'origin/dev' into dev 2024-12-20 00:00:18 +08:00
lijiahangmax
f65e17c723 🐛 修复分组创建权限问题. 2024-12-20 00:00:06 +08:00
lijiahangmax
c04859294c 🐛 修复分组创建权限问题. 2024-12-19 23:59:09 +08:00
lijiahang
23363efade 📝 修改文档. 2024-12-19 16:17:15 +08:00
lijiahang
933e9d90d1 🐳 修改命名空间. 2024-12-19 15:31:59 +08:00
lijiahang
b2341ce62e 📝 去除 demo. 2024-12-19 11:26:32 +08:00
lijiahang
7fb17a173e Merge remote-tracking branch 'origin/dev' into dev 2024-12-19 09:43:11 +08:00
lijiahang
c95d52e197 📝 去除版本. 2024-12-19 09:42:50 +08:00
lijiahangmax
d651c37e87 🔨 修改 sql 脚本. 2024-12-18 21:52:58 +08:00
lijiahangmax
1d89b392b0 🔨 修改表结构. 2024-12-18 21:35:59 +08:00
lijiahang
04327c19e3 🔨 命令发送. 2024-12-18 09:49:59 +08:00
lijiahangmax
786d07907d 🔨 命令发送. 2024-12-16 23:20:57 +08:00
lijiahangmax
1227ed1770 🔨 命令发送. 2024-12-16 20:54:35 +08:00
lijiahangmax
6d74b4379e 🔨 修改聚合配置. 2024-12-16 20:37:17 +08:00
lijiahangmax
985091f42b 🔨 上传任务使用用户连接配置. 2024-12-14 12:41:06 +08:00
lijiahang
885446dc58 去除命令 tooltip. 2024-12-13 16:38:58 +08:00
lijiahangmax
dd973a46fc 🔨 命令执行用户. 2024-12-13 01:05:01 +08:00
lijiahangmax
190b78d14a 修改包结构. 2024-12-12 22:47:30 +08:00
lijiahangmax
824f7317d7 添加执行人. 2024-12-12 21:35:05 +08:00
lijiahangmax
247ae2c862 添加系统类型. 2024-12-12 21:12:08 +08:00
lijiahangmax
f52a81f9d0 🔨 修改路由配置. 2024-12-11 22:47:56 +08:00
lijiahang
32e4859ba7 修改打包配置. 2024-12-11 11:06:29 +08:00
李佳航
0de59dd77d Merge pull request #70 from dromara/dev
Dev
2024-12-10 09:58:59 +08:00
lijiahang
d0b25c38a6 Merge remote-tracking branch 'origin/dev' into dev 2024-12-09 15:28:11 +08:00
lijiahang
9fe2531d2f 📝 修改介绍. 2024-12-09 15:28:03 +08:00
lijiahangmax
28ce2317c0 merge dev into dev
合并

Created-by: liushaoshuai
Author-id: 3003091
MR-id: 5446172
Commit-by: liushaoshuai
Merged-by: lijiahangmax
E2E-issues: 
Description: ⬆️ 升级 orion-kit 版本. 

See merge request: dromara/orion-visor!15
2024-12-09 15:25:26 +08:00
liushaoshuai
f38ae06fa0 ⬆️ 升级 orion-kit 版本.
Signed-off-by: liushaoshuai <liushaoshuai@noreply.gitcode.com>
2024-12-09 15:23:27 +08:00
lijiahangmax
e434d85ea5 merge dev into dev
修改文档

Created-by: liushaoshuai
Author-id: 3003091
MR-id: 5361842
Commit-by: liushaoshuai
Merged-by: lijiahangmax
E2E-issues: 
Description: 📝修改文档. 

See merge request: dromara/orion-visor!14
2024-12-06 13:59:08 +08:00
liushaoshuai
d303406332 📝修改文档.
Signed-off-by: liushaoshuai <liushaoshuai@noreply.gitcode.com>
2024-12-06 13:58:09 +08:00
lijiahangmax
952d63b282 merge dev into dev
PR#1

Created-by: SuperOwn
Author-id: 3000065
MR-id: 5350395
Commit-by: SuperOwn
Merged-by: lijiahangmax
E2E-issues: 
Description: 🔖 升级版本. 

See merge request: dromara/orion-visor!13
2024-12-06 12:11:59 +08:00
SuperOwn
cffb3c9e90 🔖 升级版本.
Signed-off-by: SuperOwn <SuperOwn@noreply.gitcode.com>
2024-12-06 12:10:56 +08:00
lijiahangmax
d828d4a754 merge dev into dev
升级版本

Created-by: orionsec
Author-id: 3000702
MR-id: 5345512
Commit-by: orionsec
Merged-by: lijiahangmax
E2E-issues: 
Description: 🔖 升级版本. 

See merge request: dromara/orion-visor!12
2024-12-06 11:41:29 +08:00
orionsec
30ff601078 🔖 升级版本.
Signed-off-by: orionsec <orionsec@noreply.gitcode.com>
2024-12-06 11:40:36 +08:00
lijiahangmax
eb18f4281a merge dev into dev
禁用缓存

Created-by: orionsec
Author-id: 3000702
MR-id: 5345037
Commit-by: orionsec
Merged-by: lijiahangmax
E2E-issues: 
Description: 🔖 升级版本. 
🐳 禁用缓存. 

See merge request: dromara/orion-visor!11
2024-12-06 11:37:45 +08:00
orionsec
b850aa1f7f 🐳 禁用缓存.
Signed-off-by: orionsec <orionsec@noreply.gitcode.com>
2024-12-06 11:36:50 +08:00
orionsec
100b5e8740 🔖 升级版本.
Signed-off-by: orionsec <orionsec@noreply.gitcode.com>
2024-12-06 11:36:25 +08:00
lijiahangmax
148d9f1201 merge dev into dev
PR

Created-by: orionsec
Author-id: 3000702
MR-id: 5344615
Commit-by: orionsec
Merged-by: lijiahangmax
E2E-issues: 
Description: 🔖 升级版本. 

See merge request: dromara/orion-visor!10
2024-12-06 11:33:29 +08:00
orionsec
88ddc7c4b2 🔖 升级版本.
Signed-off-by: orionsec <orionsec@noreply.gitcode.com>
2024-12-06 11:31:10 +08:00
lijiahangmax
4a2c01fba6 merge dev into dev
merge

Created-by: SuperOwn
Author-id: 3000065
MR-id: 5343257
Commit-by: SuperOwn
Merged-by: lijiahangmax
E2E-issues: 
Description: 🔖 升级版本. 

See merge request: dromara/orion-visor!8
2024-12-06 11:20:14 +08:00
SuperOwn
45c83f6080 🔖 升级版本.
Signed-off-by: SuperOwn <SuperOwn@noreply.gitcode.com>
2024-12-06 11:19:27 +08:00
lijiahangmax
08a0eeb6b5 merge dev into dev
修改版本

Created-by: SuperOwn
Author-id: 3000065
MR-id: 5343027
Commit-by: SuperOwn
Merged-by: lijiahangmax
E2E-issues: 
Description: 🔖 升级版本. 

See merge request: dromara/orion-visor!7
2024-12-06 11:18:31 +08:00
SuperOwn
73b034b27c 🔖 升级版本.
Signed-off-by: SuperOwn <SuperOwn@noreply.gitcode.com>
2024-12-06 11:16:06 +08:00
lijiahang
95a31d613d Merge remote-tracking branch 'origin/dev' into dev 2024-12-06 10:53:44 +08:00
lijiahangmax
8027d39938 merge dev into dev
merge

Created-by: chaoyuyu
Author-id: 2987168
MR-id: 5338562
Commit-by: chaoyuyu
Merged-by: lijiahangmax
E2E-issues: 
Description: update: 更新文件 build.sh 

See merge request: dromara/orion-visor!5
2024-12-06 10:51:33 +08:00
chaoyuyu
e3d33295fe update: 更新文件 build.sh
Signed-off-by: chaoyuyu <chaoyuyu@noreply.gitcode.com>
2024-12-06 10:46:09 +08:00
lijiahangmax
691c61613f merge dev into dev
合并

Created-by: opensources
Author-id: 2983898
MR-id: 5338447
Commit-by: opensources
Merged-by: lijiahangmax
E2E-issues: 
Description: 🐳 修改 docker 版本. 
🔖 升级版本. 

See merge request: dromara/orion-visor!4
2024-12-06 10:42:56 +08:00
opensources
a75ce2143d 🔖 升级版本.
Signed-off-by: opensources <opensources@noreply.gitcode.com>
2024-12-06 10:35:37 +08:00
opensources
cb828e5684 🐳 修改 docker 版本.
Signed-off-by: opensources <opensources@noreply.gitcode.com>
2024-12-06 10:34:30 +08:00
lijiahangmax
168f193416 merge dev into dev
修改 docker

Created-by: opensources
Author-id: 2983898
MR-id: 5338443
Commit-by: opensources
Merged-by: lijiahangmax
E2E-issues: 
Description: 🐳 修改版本. 

See merge request: dromara/orion-visor!3
2024-12-06 10:32:00 +08:00
opensources
211a50d33d 🐳 修改版本.
Signed-off-by: opensources <opensources@noreply.gitcode.com>
2024-12-06 10:31:17 +08:00
lijiahangmax
713af9d032 merge dev into dev
升级版本

Created-by: chaoyuyu
Author-id: 2987168
MR-id: 5338426
Commit-by: chaoyuyu
Merged-by: lijiahangmax
E2E-issues: 
Description: 🔖 升级版本. 

See merge request: dromara/orion-visor!2
2024-12-06 10:29:14 +08:00
chaoyuyu
214b6fe9ac 🔖 升级版本.
Signed-off-by: chaoyuyu <chaoyuyu@noreply.gitcode.com>
2024-12-06 10:25:02 +08:00
lijiahangmax
343c188749 merge dev into dev
merge

Created-by: Hanner
Author-id: 2987512
MR-id: 5338327
Commit-by: Hanner
Merged-by: lijiahangmax
E2E-issues: 
Description: 🔖 升级版本. 
update: 更新文件 pom.xml 
🔖 升级版本. 

See merge request: dromara/orion-visor!1
2024-12-06 10:14:32 +08:00
Hanner
fc6418caf3 🔖 升级版本.
Signed-off-by: Hanner <Hanner@noreply.gitcode.com>
2024-12-06 10:11:51 +08:00
Hanner
cf093e1023 update: 更新文件 pom.xml
Signed-off-by: Hanner <Hanner@noreply.gitcode.com>
2024-12-06 10:10:27 +08:00
Hanner
90eb6003c9 🔖 升级版本.
Signed-off-by: Hanner <Hanner@noreply.gitcode.com>
2024-12-06 10:08:54 +08:00
lijiahang
652691b32b 📝 修改 README. 2024-12-04 11:37:36 +08:00
lijiahang
eb77f33574 去除轮询接口错误信息. 2024-12-03 11:28:58 +08:00
lijiahang
9bfd5888bf 修改代码生成器. 2024-11-25 10:23:40 +08:00
lijiahang
73c18c79b8 🐛 计划任务创建后会自动执行. 2024-11-13 10:00:25 +08:00
lijiahang
562052b868 优化前端代码语义. 2024-11-07 10:46:17 +08:00
1629 changed files with 62482 additions and 19374 deletions

View File

@@ -1,6 +1,11 @@
SERVICE_PORT=1081
VOLUME_BASE=/data/orion-visor-space/docker-volumes
DEMO_MODE=false
SERVICE_PORT=1081
SPRING_PROFILES_ACTIVE=prod
SECRET_KEY=uQeacXV8b3isvKLK
MYSQL_HOST=mysql
MYSQL_PORT=3306
MYSQL_DATABASE=orion_visor
@@ -11,5 +16,6 @@ MYSQL_ROOT_PASSWORD=Data@123456
REDIS_HOST=redis
REDIS_PASSWORD=Data@123456
SECRET_KEY=uQeacXV8b3isvKLK
DEMO_MODE=false
GUACD_HOST=guacd
GUACD_PORT=4822
GUACD_DRIVE_PATH=/drive

2
NOTICE
View File

@@ -5,5 +5,5 @@
1. 禁止修改或删除 LICENSE 文件。
2. 禁止修改或删除源码头部的版权声明。
3. 本项目可免费商业使用,商业使用请保留项目源码、出处、描述文件和作者声明等。
4. 分发源码时候,请注明软件出处 https://visor.orionsec.cn/
4. 分发源码时候,请注明软件出处 https://visor.dromara.org/
5. 不可二次开发或参与同类竞品的开发。

View File

@@ -1,5 +1,5 @@
<div align="center"><img src="https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/9/11/11e7e78e-2af0-4c68-9811-db8a4c4400f4.png" alt="logo" width="520" /></div>
<p style="margin-top: 12px" align="center"><b>一款高颜值、现代化的自动化运维&轻量堡垒机平台。</b></p>
<div align="center"><img src="https://oss.orionsec.cn/orion-visor/logo_horizontal.png" alt="logo" width="520" /></div>
<p style="margin-top: 12px" align="center"><b>【Dromara】 一款高颜值、现代化的自动化运维&轻量堡垒机平台。</b></p>
<p align="center">
<a target="_blank"
style="text-decoration: none !important;"
@@ -9,12 +9,12 @@
<a target="_blank"
style="text-decoration: none !important;"
href="https://www.apache.org/licenses/LICENSE-2.0">
<img src="https://img.shields.io/github/license/lijiahangmax/orion-visor" alt="License" />
<img src="https://img.shields.io/github/license/dromara/orion-visor" alt="License" />
</a>
<a target="_blank"
style="text-decoration: none !important;"
href="https://github.com/dromara/orion-visor/releases">
<img src="https://img.shields.io/github/v/release/lijiahangmax/orion-visor" alt="release" />
<img src="https://img.shields.io/github/v/release/dromara/orion-visor" alt="release" />
</a>
<a target="_blank"
style="text-decoration: none !important;"
@@ -29,12 +29,17 @@
<a target="_blank"
style="text-decoration: none !important;"
href="https://github.com/dromara/orion-visor">
<img src="https://img.shields.io/github/stars/lijiahangmax/orion-visor" alt="star" />
<img src="https://img.shields.io/github/stars/dromara/orion-visor" alt="star" />
</a>
<a target="_blank"
style="text-decoration: none !important;"
href="https://github.com/dromara/orion-visor">
<img src="https://img.shields.io/github/forks/lijiahangmax/orion-visor" alt="star" />
<img src="https://img.shields.io/github/forks/dromara/orion-visor" alt="star" />
</a>
<a target="_blank"
style="text-decoration: none !important;"
href="https://gitcode.com/dromara/orion-visor">
<img src="https://gitcode.com/dromara/orion-visor/star/badge.svg" alt="star"/>
</a>
</p>
@@ -43,7 +48,7 @@
**`orion-visor`** 提供一站式自动化运维解决方案。
* **资产管理**:支持对资产进行分组,实现对主机、密钥和身份的统一管理和授权。
* **在线终端**:提供在线终端 SSH 服务,支持快捷命令、自定义快捷键和主题风格。
* **在线终端**:提供在线终端 SSH/RDP 等多种协议,支持快捷命令、自定义快捷键和主题风格。
* **文件管理**:支持远程主机 SFTP 大文件的批量上传、下载和在线编辑等操作。
* **批量操作**:支持批量执行主机命令、多主机文件分发等功能。
* **计划任务**:支持配置 cron 表达式,定时执行主机命令。
@@ -54,11 +59,12 @@
* 🔗 演示地址: [https://dv.orionsec.cn/](https://dv.orionsec.cn/)
* 🔏 演示账号: admin/admin
* ⭐ 体验后可以点一下 `star`
这对我很重要! [github](https://github.com/dromara/orion-visor) [gitee](https://gitee.com/dromara/orion-visor) [gitcode](https://gitcode.com/dromara/orion-visor/overview)
这对我很重要! [github](https://github.com/dromara/orion-visor) [gitee](https://gitee.com/dromara/orion-visor) [gitcode](https://gitcode.com/dromara/orion-visor)
* 🌈 如果本项目对你有帮助请帮忙推广一下 让更多的人知道此项目!
* 🎭 演示环境部分功能不可用, 完整功能请本地部署!
* 📛 演示环境请不要随便删除数据!
* 📧 如果演示环境不可用请联系我!
* 📨 **作者已被毕(cai)业(yuan) 寻java高级内推 望京/5号/10号线 有坑位的联系我哦(随缘)** 微信: `ljh1553488`
## 快速开始
@@ -73,44 +79,54 @@ docker compose up -d
## 项目文档
* [文档地址](https://visor.orionsec.cn/)
* [安装文档](https://visor.orionsec.cn/quickstart/docker.html)
* [更新日志](https://visor.orionsec.cn/update/change-log.html)
* [操作手册](https://visor.orionsec.cn/operator/asset.html)
* [常见问题](https://visor.orionsec.cn/support/faq.html)
* [文档地址](https://visor.dromara.org/)
* [安装文档](https://visor.dromara.org/quickstart/docker.html)
* [更新日志](https://visor.dromara.org/update/change-log.html)
* [操作手册](https://visor.dromara.org/operator/asset.html)
* [常见问题](https://visor.dromara.org/support/faq.html)
## 技术栈
* SpringBoot 2.7.+
* Mysql 8.0.+
* Redis 6.0.+
* Vue3 3.2.+
* Arco Design 2.55.+
* SpringBoot 2.7.17
* Mysql 8.0+
* Redis 6.0+
* Vue3 3.5+
* Arco Design 2.56+
## 主要功能预览
#### 工作台
![工作台](https://oss.orionsec.cn/orion-visor/screenshot/workplace.png "工作台")
#### 主机终端
![新建连接](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/29/aa7efb14-f2cc-4a6f-b96b-a47964ed8f79.png "新建连接")
![主机终端](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/29/66f121de-69b6-49f6-adc4-701a22d481c4.png "主机终端")
![sftp](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/29/f7a0d141-0ee0-484e-8ddb-24cad9ed2c03.png "sftp")
![主题设置](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/29/d6f37ab3-62d2-4c5e-a503-e76a1d5ddc8e.png "主题设置")
![新建连接](https://oss.orionsec.cn/orion-visor/screenshot/terminal-hosts.png "新建连接")
![ssh](https://oss.orionsec.cn/orion-visor/screenshot/terminal-ssh.png "ssh")
![sftp](https://oss.orionsec.cn/orion-visor/screenshot/terminal-sftp.png "sftp")
![rdp](https://oss.orionsec.cn/orion-visor/screenshot/terminal-rdp.png "rdp")
![主题设置](https://oss.orionsec.cn/orion-visor/screenshot/terminal-theme.png "主题设置")
#### 主机列表
![主机列表](https://oss.orionsec.cn/orion-visor/screenshot/host-list.png "主机列表")
#### 批量执行
![批量执行](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/29/3effc2fc-56a5-498d-8dfb-0f4f3b8a4056.png "批量执行")
![批量执行](https://oss.orionsec.cn/orion-visor/screenshot/exec-command.png "批量执行")
![执行日志](https://oss.orionsec.cn/orion-visor/screenshot/exec-log.png "执行日志")
#### 批量上传
![批量上传任务](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/29/98240fa9-4056-4520-9034-290d1aa47d80.png "批量上传任务")
![批量上传任务](https://oss.orionsec.cn/orion-visor/screenshot/batch-upload.png "批量上传任务")
#### 计划任务
![计划任务详情](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/29/d5ee6f04-7b2c-42ba-a3b3-642587f40cce.png "计划任务详情")
![计划任务详情](https://oss.orionsec.cn/orion-visor/screenshot/exec-job.png "计划任务详情")
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=lijiahangmax/orion-visor&type=Date)](https://star-history.com/#lijiahangmax/orion-visor&Date)
[![Star History Chart](https://api.star-history.com/svg?repos=dromara/orion-visor&type=Date)](https://star-history.com/#dromara/orion-visor&Date)
## 关于我
@@ -118,7 +134,7 @@ docker compose up -d
## 联系我
<img src="https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/10/11/cf72c603-3951-4171-95b4-06271dda1c80.jpg" alt="wx" width="628px"/>
<img src="https://oss.orionsec.cn/orion-visor/vx.jpg" alt="vx" width="628px"/>
微信: ljh1553488
QQ群: 755242157
@@ -128,7 +144,7 @@ QQ群: 755242157
## 支持一下
<img src="https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/17/a5351e59-294c-4bec-b767-1a44c362fcbc.jpg" alt="收款码" width="540px"/>
<img src="https://oss.orionsec.cn/orion-visor/pay.jpg" alt="收款码" width="540px"/>
🎁 为了项目能健康持续的发展, 我期望获得相应的资金支持, 你们的支持是我不断更新前进的动力!
@@ -140,6 +156,10 @@ QQ群: 755242157
本项目遵循 [Apache-2.0](https://github.com/dromara/orion-visor/blob/main/LICENSE) 开源许可证。
## Gite 最有价值开源项目 GVP
## Gitee 最有价值开源项目 GVP
![GVP](https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/10/24/8dd98b8d-9de5-44e6-86d3-04e27ec66123.jpg "GVP")
![GVP](https://oss.orionsec.cn/orion-visor/gvp.jpg "GVP")
## GitCode 最有影响力的开源项目 G-Star
![GSTAR](https://oss.orionsec.cn/orion-visor/gstar.jpg "GSTAR")

View File

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

View File

@@ -1,78 +1,131 @@
version: '3.3'
# latest = 2.4.0
services:
service:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.2.0
privileged: true
ui:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-ui:latest
ports:
- ${SERVICE_PORT:-1081}:80
restart: unless-stopped
depends_on:
service:
condition: service_healthy
networks:
- orion-visor-net
service:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-service:latest
privileged: true
ports:
- 9200:9200
environment:
- MYSQL_HOST=${MYSQL_HOST:-mysql}
- MYSQL_PORT=${MYSQL_PORT:-3306}
- MYSQL_DATABASE=${MYSQL_DATABASE:-orion_visor}
- MYSQL_USER=${MYSQL_USER:-root}
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-Data@123456}
- REDIS_HOST=${REDIS_HOST:-redis}
- REDIS_PASSWORD=${REDIS_PASSWORD:-Data@123456}
- SECRET_KEY=${SECRET_KEY:-uQeacXV8b3isvKLK}
- DEMO_MODE=${DEMO_MODE:-false}
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE:-prod}
MYSQL_HOST: ${MYSQL_HOST:-mysql}
MYSQL_PORT: ${MYSQL_PORT:-3306}
MYSQL_DATABASE: ${MYSQL_DATABASE:-orion_visor}
MYSQL_USER: ${MYSQL_USER:-root}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-Data@123456}
REDIS_HOST: ${REDIS_HOST:-redis}
REDIS_PASSWORD: ${REDIS_PASSWORD:-Data@123456}
GUACD_HOST: ${GUACD_HOST:-guacd}
GUACD_PORT: ${GUACD_PORT:-4822}
GUACD_DRIVE_PATH: ${GUACD_DRIVE_PATH:-/drive}
SECRET_KEY: ${SECRET_KEY:-uQeacXV8b3isvKLK}
DEMO_MODE: ${DEMO_MODE:-false}
volumes:
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/service/root-orion:/root/orion
restart: unless-stopped
healthcheck:
test: [ "CMD", "curl", "http://127.0.0.1:9200/orion-visor/api/server/bootstrap/health" ]
interval: 15s
timeout: 300s
timeout: 5s
retries: 15
start_period: 3s
start_period: 30s
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
links:
- mysql
- redis
networks:
- orion-visor-net
mysql:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.2.0
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-mysql:latest
privileged: true
ports:
- 3307:3306
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE:-orion_visor}
- MYSQL_USER=${MYSQL_USER:-orion}
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-Data@123456}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-Data@123456}
MYSQL_DATABASE: ${MYSQL_DATABASE:-orion_visor}
MYSQL_USER: ${MYSQL_USER:-orion}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-Data@123456}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-Data@123456}
volumes:
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/mysql/var-lib-mysql:/var/lib/mysql
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/mysql/var-lib-mysql-files:/var/lib/mysql-files
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/mysql/etc-mysql:/etc/mysql
restart: unless-stopped
healthcheck:
test: [ "CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/3306" ]
interval: 15s
timeout: 60s
retries: 15
start_period: 3s
timeout: 5s
retries: 10
start_period: 10s
networks:
- orion-visor-net
redis:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.2.0
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:latest
privileged: true
ports:
- 6380:6379
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD:-Data@123456}
REDIS_PASSWORD: ${REDIS_PASSWORD:-Data@123456}
volumes:
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/redis/data:/data
command: sh -c "redis-server /usr/local/redis.conf --requirepass $${REDIS_PASSWORD}"
restart: unless-stopped
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 15s
timeout: 60s
retries: 15
start_period: 3s
timeout: 5s
retries: 10
start_period: 10s
networks:
- orion-visor-net
guacd:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-guacd:latest
ports:
- 4822:4822
environment:
GUACD_LOG_LEVEL: info
GUACD_LOG_FILE: /var/log/guacd.log
volumes:
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/guacd/drive:${GUACD_DRIVE_PATH:-/drive}
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/guacd/var-logs:/var/log
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/guacd/local-guacamole-lib:/usr/local/guacamole/lib
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/guacd/local-guacamole-extensions:/usr/local/guacamole/extensions
restart: unless-stopped
healthcheck:
test: [ "CMD", "nc", "-vz", "localhost", "4822" ]
interval: 15s
timeout: 5s
retries: 10
start_period: 10s
networks:
- orion-visor-net
adminer:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-adminer:2.2.0
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-adminer:latest
ports:
- 8081:8080
environment:
ADMINER_DEFAULT_SERVER: ${MYSQL_HOST:-mysql}
depends_on:
mysql:
condition: service_healthy
links:
- mysql
networks:
- orion-visor-net
networks:
orion-visor-net:
driver: bridge

View File

@@ -1,7 +1,16 @@
#/bin/bash
docker compose down
# demo 启动
#!/bin/bash
# 停止并移除现有容器
docker compose down --remove-orphans
if [ "$1" == "demo" ]; then
sed -i 's/\${DEMO_MODE:-false}/true/g' docker-compose.yml
# 设置 DEMO_MODE 环境变量为 true
export DEMO_MODE=true
echo "Starting services for demo mode..."
# 启动指定的服务
docker compose up -d --remove-orphans mysql redis ui service adminer
else
echo "Starting all services..."
# 正常启动所有服务
docker compose up -d --remove-orphans
fi
docker compose up -d --remove-orphans

View File

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

View File

@@ -2,7 +2,7 @@
# yaml-language-server: $schema=https://linuxsuren.github.io/api-testing/api-testing-schema.json
name: orion-visor
api: |
{{default "http://orion-visor-service:80" (env "SERVER")}}
{{default "http://service:9200" (env "SERVER")}}
items:
- name: login
request:
@@ -15,9 +15,9 @@ items:
expect:
bodyFieldsExpect:
code: 200
- name: userPermission
- name: user
request:
api: /orion-visor/api/infra/user-permission/user
api: /orion-visor/api/infra/user-aggregate/user
header:
Authorization: Bearer {{.login.data.token}}
expect:
@@ -26,7 +26,7 @@ items:
msg: "success"
- name: menu
request:
api: /orion-visor/api/infra/user-permission/menu
api: /orion-visor/api/infra/user-aggregate/menu
header:
Authorization: Bearer {{.login.data.token}}
expect:

10
docker/guacd/Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
FROM guacamole/guacd:1.5.5
USER root
# 系统时区
ARG TZ=Asia/Shanghai
# 设置时区
RUN ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && \
echo '${TZ}' > /etc/timezone
# 创建所需目录
RUN mkdir -p /home/guacd/drive /usr/share/guacd/drive

6
docker/guacd/build.sh Normal file
View File

@@ -0,0 +1,6 @@
#/bin/bash
set -e
version=2.4.0
docker build -t orion-visor-guacd:${version} .
docker tag orion-visor-guacd:${version} registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-guacd:${version}
docker tag orion-visor-guacd:${version} registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-guacd:latest

View File

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

View File

@@ -12,13 +12,13 @@ socket=/var/run/mysqld/mysqld.sock
# 数据目录
datadir=/var/lib/mysql
# 不区分大小 0区分 1不区分
lower_case_table_names=1
lower_case_table_names=0
# 服务器时区
default-time_zone='+8:00'
# 服务端字符集
character_set_server=utf8mb4
# 字符排序规则
collation_server=utf8mb4_general_ci
collation_server=utf8mb4_unicode_ci
# 默认存储引擎
default-storage-engine=InnoDB
# 禁止 DNS 解析

View File

@@ -1,6 +1,15 @@
#/bin/bash
version=2.2.0
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-adminer:${version}
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:${version}
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:${version}
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:${version}
set -e
version=2.4.0
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-adminer:${version}
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-mysql:${version}
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:${version}
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-guacd:${version}
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-service:${version}
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-ui:${version}
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-adminer:latest
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-mysql:latest
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:latest
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-guacd:latest
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-service:latest
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-ui:latest

View File

@@ -1,4 +1,6 @@
#/bin/bash
version=2.2.0
set -e
version=2.4.0
docker build -t orion-visor-redis:${version} .
docker tag orion-visor-redis:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:${version}
docker tag orion-visor-redis:${version} registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:${version}
docker tag orion-visor-redis:${version} registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:latest

View File

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

View File

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

View File

@@ -1,4 +0,0 @@
#!/bin/bash
cd /app
nohup java -jar app.jar --spring.profiles.active=prod 2>&1 &
nginx -g 'daemon off;'

18
docker/ui/Dockerfile Normal file
View File

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

9
docker/ui/build.sh Normal file
View File

@@ -0,0 +1,9 @@
#/bin/bash
set -e
version=2.4.0
mv ../../orion-visor-ui/dist ./dist
docker build -t orion-visor-ui:${version} .
rm -rf ./orion-visor-launch.jar
rm -rf ./dist
docker tag orion-visor-ui:${version} registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-ui:${version}
docker tag orion-visor-ui:${version} registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-ui:latest

View File

@@ -19,7 +19,7 @@ server {
root /usr/share/nginx/html;
index index.html index.htm;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# web history 模式 404
@@ -27,7 +27,7 @@ server {
}
location /orion-visor/api {
proxy_pass http://localhost:9200/orion-visor/api;
proxy_pass http://service:9200/orion-visor/api;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -35,7 +35,7 @@ server {
}
location /orion-visor/keep-alive {
proxy_pass http://localhost:9200/orion-visor/keep-alive;
proxy_pass http://service:9200/orion-visor/keep-alive;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

View File

@@ -20,7 +20,7 @@
// 左侧文档名称
name: 'orion-visor',
// 右上角仓库
repo: 'https://github.com/lijiahangmax/orion-visor',
repo: 'https://github.com/dromara/orion-visor',
coverpage: true,
// 加载侧边栏
loadSidebar: true,

View File

@@ -4,12 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-framework</artifactId>
<artifactId>orion-visor</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>orion-visor-framework-common</artifactId>
<artifactId>orion-visor-common</artifactId>
<name>${project.artifactId}</name>
<packaging>jar</packaging>

View File

@@ -0,0 +1,80 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.config;
import lombok.extern.slf4j.Slf4j;
import java.util.function.BiConsumer;
import java.util.function.Function;
/**
* 配置引用
*
* @author Jiahang Li
* @version 1.0.0
* @since 2025/1/6 18:01
*/
@Slf4j
public abstract class ConfigRef<T> {
public final String key;
public T value;
protected final Function<String, T> convert;
public ConfigRef(String key, Function<String, T> convert) {
this.key = key;
this.convert = convert;
}
/**
* 覆盖配置
*
* @param value value
*/
public abstract void override(String value);
/**
* 修改配置
*
* @param value value
*/
public abstract void set(T value);
/**
* 获取配置
*
* @return value
*/
public abstract T get();
/**
* 修改回调
*
* @param changeEvent changeEvent
* @return this
*/
public abstract ConfigRef<T> onChange(BiConsumer<T, T> changeEvent);
}

View File

@@ -0,0 +1,265 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.config;
import java.util.function.Function;
/**
* 配置中心
*
* @author Jiahang Li
* @version 1.0.0
* @since 2025/1/5 21:30
*/
public interface ConfigStore {
/**
* 获取 string 配置
*
* @param key key
* @return config
*/
String getString(String key);
/**
* 获取 string 配置
*
* @param key key
* @param defaultValue defaultValue
* @return config
*/
String getString(String key, String defaultValue);
/**
* 获取 int 配置
*
* @param key key
* @return config
*/
Integer getInteger(String key);
/**
* 获取 int 配置
*
* @param key key
* @param defaultValue defaultValue
* @return config
*/
Integer getInteger(String key, Integer defaultValue);
/**
* 获取 long 配置
*
* @param key key
* @return config
*/
Long getLong(String key);
/**
* 获取 long 配置
*
* @param key key
* @param defaultValue defaultValue
* @return config
*/
Long getLong(String key, Long defaultValue);
/**
* 获取 double 配置
*
* @param key key
* @return config
*/
Double getDouble(String key);
/**
* 获取 double 配置
*
* @param key key
* @param defaultValue defaultValue
* @return config
*/
Double getDouble(String key, Double defaultValue);
/**
* 获取 boolean 配置
*
* @param key key
* @return config
*/
Boolean getBoolean(String key);
/**
* 获取 boolean 配置
*
* @param key key
* @param defaultValue defaultValue
* @return config
*/
Boolean getBoolean(String key, Boolean defaultValue);
/**
* 获取配置
*
* @param key key
* @return conf
*/
String getConfig(String key);
/**
* 获取配置
*
* @param key key
* @param defaultValue defaultValue
* @return conf
*/
String getConfig(String key, String defaultValue);
/**
* 获取配置
*
* @param key key
* @param convert convert
* @param <T> T
* @return conf
*/
<T> T getConfig(String key, Function<String, T> convert);
/**
* 获取配置
*
* @param key key
* @param convert convert
* @param defaultValue defaultValue
* @param <T> T
* @return conf
*/
<T> T getConfig(String key, Function<String, T> convert, T defaultValue);
/**
* 获取 string 配置
*
* @param key key
* @return ref
*/
ConfigRef<String> string(String key);
/**
* 获取 string 配置
*
* @param key key
* @param defaultValue defaultValue
* @return ref
*/
ConfigRef<String> string(String key, String defaultValue);
/**
* 获取 int 配置
*
* @param key key
* @return ref
*/
ConfigRef<Integer> int32(String key);
/**
* 获取 int 配置
*
* @param key key
* @param defaultValue defaultValue
* @return ref
*/
ConfigRef<Integer> int32(String key, Integer defaultValue);
/**
* 获取 long 配置
*
* @param key key
* @return ref
*/
ConfigRef<Long> int64(String key);
/**
* 获取 long 配置
*
* @param key key
* @param defaultValue defaultValue
* @return ref
*/
ConfigRef<Long> int64(String key, Long defaultValue);
/**
* 获取 double 配置
*
* @param key key
* @return ref
*/
ConfigRef<Double> float64(String key);
/**
* 获取 double 配置
*
* @param key key
* @param defaultValue defaultValue
* @return ref
*/
ConfigRef<Double> float64(String key, Double defaultValue);
/**
* 获取 boolean 配置
*
* @param key key
* @return ref
*/
ConfigRef<Boolean> bool(String key);
/**
* 获取 boolean 配置
*
* @param key key
* @param defaultValue defaultValue
* @return ref
*/
ConfigRef<Boolean> bool(String key, Boolean defaultValue);
/**
* 获取配置
*
* @param key key
* @param convert convert
* @param <T> T
* @return ref
*/
<T> ConfigRef<T> ref(String key, Function<String, T> convert);
/**
* 获取配置
*
* @param key key
* @param convert convert
* @param defaultValue defaultValue
* @param <T> T
* @return ref
*/
<T> ConfigRef<T> ref(String key, Function<String, T> convert, T defaultValue);
}

View File

@@ -0,0 +1,47 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.configuration;
import cn.orionsec.kit.spring.SpringHolder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* spring 配置类
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/6/20 10:34
*/
@Configuration
public class SpringConfiguration {
/**
* @return spring 容器工具类
*/
@Bean
public SpringHolder.ApplicationContextAwareStore springHolderAware() {
return new SpringHolder.ApplicationContextAwareStore();
}
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.constant;
package org.dromara.visor.common.constant;
import cn.orionsec.kit.lang.constant.OrionConst;
@@ -29,7 +36,7 @@ public interface AppConst extends OrionConst {
/**
* ${orion.version} 迭代时候需要手动更改
*/
String VERSION = "2.2.0";
String VERSION = "2.4.0";
/**
* ${spring.application.name}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.constant;
package org.dromara.visor.common.constant;
/**
* 自动装配排序常量
@@ -26,14 +33,10 @@ package org.dromara.visor.framework.common.constant;
*/
public interface AutoConfigureOrderConst {
int FRAMEWORK_COMMON = Integer.MIN_VALUE + 1000;
int FRAMEWORK_WEB = Integer.MIN_VALUE + 1100;
int FRAMEWORK_SECURITY = Integer.MIN_VALUE + 1200;
int FRAMEWORK_SECURITY_CRYPTO = Integer.MIN_VALUE + 1250;
int FRAMEWORK_WEBSOCKET = Integer.MIN_VALUE + 1300;
int FRAMEWORK_DESENSITIZE = Integer.MIN_VALUE + 1400;
@@ -48,17 +51,23 @@ public interface AutoConfigureOrderConst {
int FRAMEWORK_REDIS = Integer.MIN_VALUE + 1900;
int FRAMEWORK_REDIS_CACHE = Integer.MIN_VALUE + 1950;
int FRAMEWORK_REDIS_CACHE = Integer.MIN_VALUE + 2000;
int FRAMEWORK_STORAGE = Integer.MIN_VALUE + 2000;
int FRAMEWORK_CONFIG = Integer.MIN_VALUE + 2100;
int FRAMEWORK_JOB = Integer.MIN_VALUE + 2100;
int FRAMEWORK_ENCRYPT = Integer.MIN_VALUE + 2200;
int FRAMEWORK_JOB_QUARTZ = Integer.MIN_VALUE + 2150;
int FRAMEWORK_STORAGE = Integer.MIN_VALUE + 2300;
int FRAMEWORK_MONITOR = Integer.MIN_VALUE + 2200;
int FRAMEWORK_JOB = Integer.MIN_VALUE + 2400;
int FRAMEWORK_BIZ_OPERATOR_LOG = Integer.MIN_VALUE + 3000;
int FRAMEWORK_JOB_QUARTZ = Integer.MIN_VALUE + 2500;
int FRAMEWORK_JOB_ASYNC = Integer.MIN_VALUE + 2600;
int FRAMEWORK_MONITOR = Integer.MIN_VALUE + 2700;
int FRAMEWORK_BIZ_OPERATOR_LOG = Integer.MIN_VALUE + 2800;
int FRAMEWORK_BANNER = Integer.MIN_VALUE + 10000;

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.constant;
package org.dromara.visor.common.constant;
/**
* bean 排序常量

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.constant;
package org.dromara.visor.common.constant;
/**
* 常量 - 中文

View File

@@ -0,0 +1,149 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.constant;
/**
* 配置项常量
*
* @author Jiahang Li
* @version 1.0.0
* @since 2025/1/14 16:15
*/
public interface ConfigKeys {
/**
* SFTP 文件预览大小
*/
String SFTP_PREVIEW_SIZE = "sftp_previewSize";
/**
* SFTP 重复文件备份
*/
String SFTP_UPLOAD_PRESENT_BACKUP = "sftp_uploadPresentBackup";
/**
* SFTP 备份文件名称
*/
String SFTP_UPLOAD_BACKUP_FILE_NAME = "sftp_uploadBackupFileName";
/**
* 加密公钥
*/
String ENCRYPT_PUBLIC_KEY = "encrypt_publicKey";
/**
* 加密私钥
*/
String ENCRYPT_PRIVATE_KEY = "encrypt_privateKey";
/**
* 日志前端显示行数
*/
String LOG_WEB_SCROLL_LINES = "log_webScrollLines";
/**
* 日志加载偏移行
*/
String LOG_TRACKER_LOAD_LINES = "log_trackerLoadLines";
/**
* 日志加载间隔毫秒
*/
String LOG_TRACKER_LOAD_INTERVAL = "log_trackerLoadInterval";
/**
* 是否生成详细的执行日志
*/
String LOG_EXEC_DETAIL_LOG = "log_execDetailLog";
/**
* 凭证有效期分
*/
String LOGIN_LOGIN_SESSION_TIME = "login_loginSessionTime";
/**
* 允许多端登录
*/
String LOGIN_ALLOW_MULTI_DEVICE = "login_allowMultiDevice";
/**
* 允许凭证续签
*/
String LOGIN_ALLOW_REFRESH = "login_allowRefresh";
/**
* 凭证续签最大次数
*/
String LOGIN_MAX_REFRESH_COUNT = "login_maxRefreshCount";
/**
* 凭证续签间隔分
*/
String LOGIN_REFRESH_INTERVAL = "login_refreshInterval";
/**
* 登录失败锁定
*/
String LOGIN_LOGIN_FAILED_LOCK = "login_loginFailedLock";
/**
* 登录失败锁定阈值分
*/
String LOGIN_LOGIN_FAILED_LOCK_THRESHOLD = "login_loginFailedLockThreshold";
/**
* 登录失败锁定时间分
*/
String LOGIN_LOGIN_FAILED_LOCK_TIME = "login_loginFailedLockTime";
/**
* 登录失败发信
*/
String LOGIN_LOGIN_FAILED_SEND = "login_loginFailedSend";
/**
* 登录失败发信阈值
*/
String LOGIN_LOGIN_FAILED_SEND_THRESHOLD = "login_loginFailedSendThreshold";
/**
* 是否开启自动清理命令记录
*/
String AUTO_CLEAR_EXEC_LOG_ENABLED = "autoClear_execLogEnabled";
/**
* 自动清理命令记录保留天数
*/
String AUTO_CLEAR_EXEC_LOG_KEEP_DAYS = "autoClear_execLogKeepDays";
/**
* 是否开启自动清理终端连接记录
*/
String AUTO_CLEAR_TERMINAL_LOG_ENABLED = "autoClear_terminalLogEnabled";
/**
* 自动清理终端连接记录保留天数
*/
String AUTO_CLEAR_TERMINAL_LOG_KEEP_DAYS = "autoClear_terminalLogKeepDays";
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.constant;
package org.dromara.visor.common.constant;
/**
* 常量
@@ -44,6 +51,11 @@ public interface Const extends cn.orionsec.kit.lang.constant.Const, FieldConst,
String SYSTEM_USERNAME = "system";
// FIXME KIT
String ADMINISTRATOR = "Administrator";
Long ALL_HOST_ID = -1L;
int BATCH_COUNT = 500;
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.constant;
package org.dromara.visor.common.constant;
import cn.orionsec.kit.lang.define.wrapper.CodeInfo;
import cn.orionsec.kit.lang.define.wrapper.HttpWrapper;
@@ -81,7 +88,7 @@ public enum ErrorCode implements CodeInfo {
EXCEL_PASSWORD_ERROR(905, "文档密码错误"),
PASER_FAILED(906, "解析失败"),
PASER_FAILED(906, "表达式解析失败"),
ENCRYPT_ERROR(907, "数据加密异常"),
@@ -127,9 +134,10 @@ public enum ErrorCode implements CodeInfo {
* 获取 wapper
*
* @param data data
* @param <T> T
* @return HttpWrapper
*/
public HttpWrapper<?> wrapper() {
public <T> HttpWrapper<T> wrapper() {
return HttpWrapper.of(this);
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,10 +20,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.constant;
package org.dromara.visor.common.constant;
import cn.orionsec.kit.lang.exception.ApplicationException;
import cn.orionsec.kit.lang.exception.argument.InvalidArgumentException;
import cn.orionsec.kit.lang.utils.Strings;
import org.springframework.validation.BindException;
import org.springframework.web.bind.MissingServletRequestParameterException;
import javax.validation.ConstraintViolationException;
import java.util.Iterator;
import java.util.Optional;
import java.util.Set;
/**
* 错误信息
@@ -45,6 +60,12 @@ public interface ErrorMessage {
String IDENTITY_ABSENT = "主机身份不存在";
String CHECK_IDENTITY_PASSWORD = "请选择类型为[密码]的主机身份";
String KEY_ABSENT_WITH = "主机密钥不存在 {}";
String IDENTITY_ABSENT_WITH = "主机身份不存在 {}";
String CONFIG_ABSENT = "配置不存在";
String CONFIG_PRESENT = "配置已存在";
@@ -83,6 +104,8 @@ public interface ErrorMessage {
String HOST_NOT_ENABLED = "主机未启用";
String CONFIG_NOT_ENABLED = "配置未启用";
String UNABLE_OPERATE_ADMIN_ROLE = "无法操作管理员账号";
String UNSUPPORTED_CHARSET = "不支持的编码 [{}]";
@@ -93,16 +116,30 @@ public interface ErrorMessage {
String DATA_NO_PERMISSION = "数据无权限";
String EXPRESSION_ERROR = "表达式错误";
String ANY_NO_PERMISSION = "{}无权限";
String OPT_NO_PERMISSION = "无操作权限";
String SESSION_PRESENT = "会话已存在";
String SESSION_ABSENT = "会话不存在";
String SESSION_CLOSED = "会话已关闭";
String USER_UNSUPPORTED_OPT = "用户不支持此操作";
String CURRENT_USER_UNSUPPORTED_OPT = "当前" + USER_UNSUPPORTED_OPT;
String PATH_NOT_NORMALIZE = "路径不合法";
String OPERATE_ERROR = "操作失败";
String ENCRYPT_KEY_UNSET = "加密密钥未配置";
String DECRYPT_ERROR = "数据解密失败";
String UNKNOWN_TYPE = "未知类型";
String ERROR_TYPE = "错误的类型";
@@ -119,6 +156,8 @@ public interface ErrorMessage {
String AUTH_ERROR = "认证失败";
String FILE_UPLOAD_ERROR = "文件上传失败";
String SCRIPT_UPLOAD_ERROR = "脚本上传失败";
String EXEC_ERROR = "执行失败";
@@ -135,8 +174,26 @@ public interface ErrorMessage {
String CLIENT_ABORT = "手动中断";
String COMMAND_EXEC_ERROR = "命令执行失败 [{}]";
String COMPRESS_ERROR = "压缩失败";
String DECOMPRESS_ERROR = "解压失败";
String COMPRESS_FILE_ABSENT = "压缩文件不存在";
String UNABLE_DOWNLOAD_FOLDER = "无法下载文件夹";
String VALID_ERROR = "验证失败";
String CONVERT_ERROR = "转换失败";
String PRESENT_MODIFY = "{} 已存在, 请修改后重试";
String ILLEGAL_MODIFY = "{} 不正确, 请修改后重试";
String PLEASE_SELECT_SUFFIX_FILE = "请选择 {} 类型的文件";
/**
* 是否为业务异常
*
@@ -174,4 +231,37 @@ public interface ErrorMessage {
return defaultMsg;
}
/**
* 获取验证错误消息
*
* @param ex ex
* @param defaultMsg defaultMsg
* @return message
*/
static String getValidErrorMessage(Exception ex, String defaultMsg) {
if (ex == null) {
return null;
}
// 参数不存在异常
if (ex instanceof MissingServletRequestParameterException) {
return Strings.format(ErrorMessage.MISSING, ((MissingServletRequestParameterException) ex).getParameterName());
}
// 参数绑定异常
if (ex instanceof BindException) {
return Optional.ofNullable(((BindException) ex)
.getFieldError())
.map(error -> error.getField() + Const.SPACE + error.getDefaultMessage())
.orElse(defaultMsg);
}
// 参数验证异常
if (ex instanceof ConstraintViolationException) {
return Optional.ofNullable(((ConstraintViolationException) ex).getConstraintViolations())
.map(Set::iterator)
.map(Iterator::next)
.map(s -> s.getPropertyPath().toString() + Const.SPACE + s.getMessage())
.orElse(defaultMsg);
}
return getErrorMessage(ex, defaultMsg);
}
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.constant;
package org.dromara.visor.common.constant;
/**
* 额外字段常量
@@ -48,7 +55,7 @@ public interface ExtraFieldConst extends FieldConst {
String GRANT_NAME = "grantName";
String CHANNEL_ID = "channelId";
String CHANNEL = "channel";
String SESSION_ID = "sessionId";

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.constant;
package org.dromara.visor.common.constant;
/**
* 字段常量
@@ -96,6 +103,20 @@ public interface FieldConst {
String FILTER = "filter";
String LICENSE = "license";
String SESSION = "session";
String CONNECT = "connect";
String ALL = "all";
String PROPS = "props";
String SENDER = "sender";
String RESULT = "result";
String CONFIG = "config";
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.constant;
package org.dromara.visor.common.constant;
/**
* 文件常量

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.constant;
package org.dromara.visor.common.constant;
/**
* 过滤器排序常量

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.constant;
package org.dromara.visor.common.constant;
/**
* 验证常量

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,8 +20,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.entity;
package org.dromara.visor.common.entity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
@@ -25,16 +33,13 @@ import lombok.Data;
* @since 2024/6/24 15:03
*/
@Data
@Schema(name = "AutoClearConfig", description = "自动清理配置")
public class AutoClearConfig {
/**
* 是否开启
*/
@Schema(description = "是否开启")
private Boolean enabled;
/**
* 保留周期 ()
*/
@Schema(description = "保留周期 (天)")
private Integer keepPeriod;
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,26 +20,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.entity;
package org.dromara.visor.common.entity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.dromara.visor.framework.common.validator.group.Page;
import org.dromara.visor.common.validator.group.Page;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
/**
* 公共页码请求
* 基本查询请求
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/7/12 23:14
*/
@Data
@Schema(description = "公共页码请求")
public class PageRequest {
@Schema(name = "BaseQueryRequest", description = "基本查询请求")
public class BaseQueryRequest implements IPageRequest, IOrderRequest {
@NotNull(groups = Page.class)
@Min(value = 1, groups = Page.class)
@@ -46,4 +53,7 @@ public class PageRequest {
@Schema(description = "大小")
private Integer limit;
@Schema(description = "查询排序")
private Integer order;
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.entity;
package org.dromara.visor.common.entity;
/**
* 数据清理请求 定义

View File

@@ -0,0 +1,41 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.entity;
/**
* 查询排序请求
*
* @author Jiahang Li
* @version 1.0.0
* @since 2025/3/17 22:04
*/
public interface IOrderRequest {
/**
* 查询排序
*
* @return sort 0DESC 1ASC 其他不排序
*/
Integer getOrder();
}

View File

@@ -0,0 +1,48 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.entity;
/**
* 页码请求
*
* @author Jiahang Li
* @version 1.0.0
* @since 2025/3/17 22:02
*/
public interface IPageRequest {
/**
* 页码
*
* @return page
*/
Integer getPage();
/**
* 大小
*
* @return limit
*/
Integer getLimit();
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.entity;
package org.dromara.visor.common.entity;
import java.io.Serializable;

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,8 +20,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.entity;
package org.dromara.visor.common.entity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
@@ -25,21 +33,16 @@ import lombok.Data;
* @since 2023/12/29 11:57
*/
@Data
@Schema(name = "RequestIdentityModel", description = "请求留痕模型")
public class RequestIdentityModel implements RequestIdentity {
/**
* 请求地址
*/
@Schema(description = "请求地址")
private String address;
/**
* 请求位置
*/
@Schema(description = "请求位置")
private String location;
/**
* userAgent
*/
@Schema(description = "userAgent")
private String userAgent;
}

View File

@@ -0,0 +1,148 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.entity;
import cn.orionsec.kit.lang.utils.collect.Lists;
import cn.orionsec.kit.lang.utils.time.DateStream;
import cn.orionsec.kit.lang.utils.time.Dates;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* 统计区间枚举
*
* @author Jiahang Li
* @version 1.0.0
* @since 2024/12/23 14:02
*/
public enum StatisticsRange {
/**
* 当天
*/
TODAY {
@Override
public Date getRangeEndTime(Date startTime) {
return DateStream.of(startTime)
.dayEnd()
.date();
}
@Override
public List<String> getDateRanges(Date startTime) {
return Lists.singleton(Dates.format(startTime, Dates.YMD));
}
},
/**
* 日视图
*/
DAY {
@Override
public Date getRangeEndTime(Date startTime) {
return DateStream.of(startTime)
.dayEnd()
.date();
}
@Override
public List<String> getDateRanges(Date startTime) {
return Lists.singleton(Dates.format(startTime, Dates.YMD));
}
},
/**
* 周视图
*/
WEEK {
@Override
public Date getRangeEndTime(Date startTime) {
return DateStream.of(startTime)
.addDay(7)
.dayEnd()
.date();
}
@Override
public List<String> getDateRanges(Date startTime) {
return Arrays.stream(Dates.getIncrementDayDates(startTime, 1, 7))
.map(s -> Dates.format(s, Dates.YMD))
.collect(Collectors.toList());
}
},
/**
* 月视图
*/
MONTH {
@Override
public Date getRangeEndTime(Date startTime) {
return DateStream.of(startTime)
.addMonth(1)
.dayEnd()
.date();
}
@Override
public List<String> getDateRanges(Date startTime) {
int monthLastDay = Dates.getMonthLastDay(startTime);
return Arrays.stream(Dates.getIncrementDayDates(startTime, 1, monthLastDay - 1))
.map(s -> Dates.format(s, Dates.YMD))
.collect(Collectors.toList());
}
},
;
/**
* 获取区间结束时间
*
* @param startTime startTime
* @return end
*/
public abstract Date getRangeEndTime(Date startTime);
/**
* 获取时间区间
*
* @param startTime startTime
* @return ranges
*/
public abstract List<String> getDateRanges(Date startTime);
public static StatisticsRange of(String type) {
if (type == null) {
return TODAY;
}
for (StatisticsRange value : values()) {
if (value.name().equals(type)) {
return value;
}
}
return TODAY;
}
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.entity;
package org.dromara.visor.common.entity;
import java.util.List;

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.entity.chart;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Map;
/**
* 柱状图图单系列数据
*
* @author Jiahang Li
* @version 1.0.0
* @since 2024/12/23 13:42
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "BarSingleChartData", description = "柱状图图单系列数据")
public class BarSingleChartData {
@Schema(description = "数据")
private Map<String, Integer> data;
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.module.asset.entity.request.exec;
package org.dromara.visor.common.entity.chart;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
@@ -21,31 +28,27 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Map;
/**
* 执行日志查看 请求对象
* 折线图多系列数据
*
* @author Jiahang Li
* @version 1.0.0
* @since 2024/3/11 11:46
* @since 2024/12/23 13:41
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "ExecLogTailRequest", description = "执行日志查看 请求对象")
public class ExecLogTailRequest {
@Schema(name = "LineChartData", description = "折线图多系列数据")
public class LineChartData {
@Schema(description = "执行来源")
private String source;
@Schema(description = "x轴")
private List<String> x;
@NotNull
@Schema(description = "执行id")
private Long execId;
@Schema(description = "执行主机id")
private List<Long> hostExecIdList;
@Schema(description = "数据")
private Map<String, List<Integer>> data;
}

View File

@@ -0,0 +1,53 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.entity.chart;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* 折线图单系列数据
*
* @author Jiahang Li
* @version 1.0.0
* @since 2024/12/23 13:42
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "LineSingleChartData", description = "折线图单系列数据")
public class LineSingleChartData {
@Schema(description = "x轴")
private List<String> x;
@Schema(description = "数据")
private List<Integer> data;
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.module.asset.entity.vo;
package org.dromara.visor.common.entity.chart;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
@@ -24,26 +31,20 @@ import lombok.NoArgsConstructor;
import java.util.Map;
/**
* 主机配置 视图响应对象
* 饼图数据
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/9/11 17:58
* @since 2024/12/23 13:42
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "HostConfigVO", description = "主机配置 视图响应对象")
public class HostConfigVO {
@Schema(name = "PieChartData", description = "饼图数据")
public class PieChartData {
@Schema(description = "id")
private Long id;
@Schema(description = "type")
private String type;
@Schema(description = "config")
private Map<String, Object> config;
@Schema(description = "数据")
private Map<String, Integer> data;
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.enums;
package org.dromara.visor.common.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.enums;
package org.dromara.visor.common.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -45,14 +52,26 @@ public enum EnableStatus {
public static EnableStatus of(Integer value) {
if (value == null) {
return null;
return DISABLED;
}
for (EnableStatus e : values()) {
if (e.value.equals(value)) {
return e;
}
}
return null;
return DISABLED;
}
public static EnableStatus of(String value) {
if (value == null) {
return DISABLED;
}
for (EnableStatus e : values()) {
if (e.name().equals(value)) {
return e;
}
}
return DISABLED;
}
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.enums;
package org.dromara.visor.common.enums;
import cn.orionsec.kit.lang.utils.Strings;
import lombok.AllArgsConstructor;

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.enums;
package org.dromara.visor.common.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;

View File

@@ -0,0 +1,148 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.enums;
import cn.orionsec.kit.lang.utils.collect.Lists;
import cn.orionsec.kit.lang.utils.time.DateStream;
import cn.orionsec.kit.lang.utils.time.Dates;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* 统计区间枚举
*
* @author Jiahang Li
* @version 1.0.0
* @since 2024/12/23 14:02
*/
public enum StatisticsRange {
/**
* 当天
*/
TODAY {
@Override
public Date getRangeEndTime(Date startTime) {
return DateStream.of(startTime)
.dayEnd()
.date();
}
@Override
public List<String> getDateRanges(Date startTime) {
return Lists.singleton(Dates.format(startTime, Dates.YMD));
}
},
/**
* 日视图
*/
DAY {
@Override
public Date getRangeEndTime(Date startTime) {
return DateStream.of(startTime)
.dayEnd()
.date();
}
@Override
public List<String> getDateRanges(Date startTime) {
return Lists.singleton(Dates.format(startTime, Dates.YMD));
}
},
/**
* 周视图
*/
WEEK {
@Override
public Date getRangeEndTime(Date startTime) {
return DateStream.of(startTime)
.addDay(7)
.dayEnd()
.date();
}
@Override
public List<String> getDateRanges(Date startTime) {
return Arrays.stream(Dates.getIncrementDayDates(startTime, 1, 7))
.map(s -> Dates.format(s, Dates.YMD))
.collect(Collectors.toList());
}
},
/**
* 月视图
*/
MONTH {
@Override
public Date getRangeEndTime(Date startTime) {
return DateStream.of(startTime)
.addMonth(1)
.dayEnd()
.date();
}
@Override
public List<String> getDateRanges(Date startTime) {
int monthLastDay = Dates.getMonthLastDay(startTime);
return Arrays.stream(Dates.getIncrementDayDates(startTime, 1, monthLastDay - 1))
.map(s -> Dates.format(s, Dates.YMD))
.collect(Collectors.toList());
}
},
;
/**
* 获取区间结束时间
*
* @param startTime startTime
* @return end
*/
public abstract Date getRangeEndTime(Date startTime);
/**
* 获取时间区间
*
* @param startTime startTime
* @return ranges
*/
public abstract List<String> getDateRanges(Date startTime);
public static StatisticsRange of(String type) {
if (type == null) {
return TODAY;
}
for (StatisticsRange value : values()) {
if (value.name().equals(type)) {
return value;
}
}
return TODAY;
}
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,11 +20,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.handler.data;
package org.dromara.visor.common.handler.data;
import cn.orionsec.kit.spring.SpringHolder;
import org.dromara.visor.framework.common.handler.data.model.GenericsDataModel;
import org.dromara.visor.framework.common.handler.data.strategy.GenericsDataStrategy;
import org.dromara.visor.common.handler.data.model.GenericsDataModel;
import org.dromara.visor.common.handler.data.strategy.GenericsDataStrategy;
/**
* 标准数据定义
@@ -27,7 +34,7 @@ import org.dromara.visor.framework.common.handler.data.strategy.GenericsDataStra
* @since 2023/12/21 0:07
*/
@SuppressWarnings("unchecked")
public interface GenericsDataDefinition {
public interface GenericsStrategyDefinition {
/**
* 获取数据处理策略
@@ -47,12 +54,32 @@ public interface GenericsDataDefinition {
return (S) SpringHolder.getBean(this.getStrategyClass());
}
/**
* 获取默认值
*
* @param <M> model
* @return model
*/
default <M extends GenericsDataModel> M getDefault() {
return (M) this.getStrategy().getDefault();
}
/**
* 执行完整验证链
*
* @param beforeModel beforeModel
* @param afterModel afterModel
*/
default void doValid(GenericsDataModel beforeModel, GenericsDataModel afterModel) {
this.getStrategy().doValid(beforeModel, afterModel);
}
/**
* 反序列化对象
*
* @param serialModel serialModel
* @param <M> Model
* @return object
* @param <M> model
* @return model
*/
default <M extends GenericsDataModel> M parse(String serialModel) {
return (M) this.getStrategy().parse(serialModel);
@@ -62,14 +89,11 @@ public interface GenericsDataDefinition {
* 转为视图对象
*
* @param serialModel serialModel
* @param <M> Model
* @param <M> model
* @return viewModel
*/
default <M extends GenericsDataModel> M toView(String serialModel) {
GenericsDataStrategy<GenericsDataModel> strategy = this.getStrategy();
GenericsDataModel model = strategy.parse(serialModel);
strategy.toView(model);
return (M) model;
return (M) this.getStrategy().toView(serialModel);
}
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.handler.data.model;
package org.dromara.visor.common.handler.data.model;
import com.alibaba.fastjson.JSON;
@@ -37,7 +44,6 @@ public interface GenericsDataModel {
return JSON.toJSONString(this);
}
/**
* 转为 map
*

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,10 +20,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.handler.data.strategy;
package org.dromara.visor.common.handler.data.strategy;
import com.alibaba.fastjson.JSON;
import org.dromara.visor.framework.common.handler.data.model.GenericsDataModel;
import org.dromara.visor.common.handler.data.model.GenericsDataModel;
/**
* 标准数据处理策略 基类
@@ -77,4 +84,13 @@ public abstract class AbstractGenericsDataStrategy<M extends GenericsDataModel>
public void toView(M model) {
}
@Override
public M toView(String serialModel) {
// 解析
M parse = this.parse(serialModel);
// 转为视图对象
this.toView(parse);
return parse;
}
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,9 +20,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.handler.data.strategy;
package org.dromara.visor.common.handler.data.strategy;
import org.dromara.visor.framework.common.handler.data.model.GenericsDataModel;
import org.dromara.visor.common.handler.data.model.GenericsDataModel;
/**
* 标准数据处理策略
@@ -58,4 +65,12 @@ public interface GenericsDataStrategy<M extends GenericsDataModel> {
*/
void toView(M model);
/**
* 转为视图配置
*
* @param serialModel serialModel
* @return model
*/
M toView(String serialModel);
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,24 +20,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.crypto;
package org.dromara.visor.common.interfaces;
import cn.orionsec.kit.lang.utils.codec.Base62s;
import cn.orionsec.kit.lang.utils.crypto.symmetric.SymmetricCrypto;
/**
* 数据加密器
* aes 加密器
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/7/8 0:20
*/
public interface ValueCrypto extends SymmetricCrypto {
/**
* 初始化
*/
void init();
public interface AesEncryptor extends SymmetricCrypto {
/**
* 加密后 base62 编码

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.file;
package org.dromara.visor.common.interfaces;
import java.io.InputStream;
import java.io.OutputStream;
@@ -107,6 +114,25 @@ public interface FileClient {
*/
byte[] getContent(String path) throws Exception;
/**
* 获取文件内容
*
* @param path path
* @return content
* @throws Exception Exception
*/
String getContentAsString(String path) throws Exception;
/**
* 获取文件内容
*
* @param path path
* @param charset charset
* @return content
* @throws Exception Exception
*/
String getContentAsString(String path, String charset) throws Exception;
/**
* 获取文件输入流
*

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.lock;
package org.dromara.visor.common.interfaces;
import java.util.function.Supplier;

View File

@@ -0,0 +1,42 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.interfaces;
/**
* rsa 解密器
*
* @author Jiahang Li
* @version 1.0.0
* @since 2025/1/5 20:58
*/
public interface RsaDecryptor {
/**
* 解密
*
* @param value value
* @return value
*/
String decrypt(String value);
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.json.filter;
package org.dromara.visor.common.json;
import cn.orionsec.kit.lang.utils.Desensitizes;
import cn.orionsec.kit.lang.utils.Objects1;

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.json.filter;
package org.dromara.visor.common.json;
import cn.orionsec.kit.lang.utils.collect.Lists;
import com.alibaba.fastjson.serializer.PropertyFilter;

View File

@@ -0,0 +1,81 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.mapstruct;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
/**
* json 转换器
*
* @author Jiahang Li
* @version 1.0.0
* @since 2025/3/7 17:43
*/
public class JsonConversion {
private JsonConversion() {
}
/**
* JSONString > JSONObject
*
* @param json json
* @return JSONObject
*/
public static JSONObject stringToJsonObject(String json) {
return json != null ? JSON.parseObject(json) : null;
}
/**
* JSONString > JSONArray.
*
* @param json json
* @return JSONArray
*/
public static JSONArray stringToJsonArray(String json) {
return json != null ? JSON.parseArray(json) : null;
}
/**
* JSONObject > JSONString.
*
* @param jsonObject JSONObject
* @return JSONString
*/
public static String jsonObjectToString(JSONObject jsonObject) {
return jsonObject != null ? jsonObject.toJSONString() : null;
}
/**
* JSONArray > JSONString.
*
* @param jsonArray JSONArray
* @return JSONString
*/
public static String jsonArrayToString(JSONArray jsonArray) {
return jsonArray != null ? jsonArray.toJSONString() : null;
}
}

View File

@@ -0,0 +1,128 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.mapstruct;
import cn.orionsec.kit.lang.utils.Strings;
import cn.orionsec.kit.lang.utils.collect.Lists;
import org.dromara.visor.common.constant.Const;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* string 转换器
*
* @author Jiahang Li
* @version 1.0.0
* @since 2025/3/7 17:35
*/
public class StringConversion {
private StringConversion() {
}
/**
* String > List<Integer>
*
* @param str str
* @return list
*/
public static List<Integer> stringToIntegerList(String str) {
if (Strings.isBlank(str)) {
return Lists.newList();
}
return Arrays.stream(str.split(Const.COMMA))
.map(Integer::valueOf)
.collect(Collectors.toList());
}
/**
* String > List<String>
*
* @param str str
* @return list
*/
public static List<Long> stringToLongList(String str) {
if (Strings.isBlank(str)) {
return Lists.newList();
}
return Arrays.stream(str.split(Const.COMMA))
.map(Long::valueOf)
.collect(Collectors.toList());
}
/**
* String > List<String>
*
* @param str str
* @return list
*/
public static List<String> stringToStringList(String str) {
if (Strings.isBlank(str)) {
return Lists.newList();
}
return Lists.of(str.split(Const.COMMA));
}
/**
* List<Integer> String
*
* @param list list
* @return str
*/
public static String integerListToString(List<Integer> list) {
if (list != null) {
return list.stream()
.map(String::valueOf)
.collect(Collectors.joining(Const.COMMA));
}
return null;
}
/**
* List<Long> String
*
* @param list list
* @return str
*/
public static String longListToString(List<Long> list) {
if (list != null) {
return list.stream()
.map(String::valueOf)
.collect(Collectors.joining(Const.COMMA));
}
return null;
}
/**
* List<String> String
*
* @param list list
* @return str
*/
public static String stringListToString(List<String> list) {
return list != null ? String.join(Const.COMMA, list) : null;
}
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.security;
package org.dromara.visor.common.security;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,12 +20,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.security;
package org.dromara.visor.common.security;
import cn.orionsec.kit.lang.utils.Booleans;
import cn.orionsec.kit.lang.utils.Strings;
import org.dromara.visor.framework.common.constant.Const;
import org.dromara.visor.framework.common.utils.CryptoUtils;
import org.dromara.visor.common.constant.Const;
import org.dromara.visor.common.utils.AesEncryptUtils;
/**
* 密码修改器
@@ -45,7 +52,7 @@ public class PasswordModifier {
if (Strings.isBlank(password)) {
return Const.EMPTY;
} else {
return CryptoUtils.encryptAsString(password);
return AesEncryptUtils.encryptAsString(password);
}
} else {
return null;

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.security;
package org.dromara.visor.common.security;
/**
* SecurityUtils bean 对象
@@ -38,4 +45,11 @@ public interface SecurityHolder {
*/
Long getLoginUserId();
/**
* 获取当前用户名
*
* @return username
*/
String getLoginUsername();
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.security;
package org.dromara.visor.common.security;
import java.io.Serializable;
@@ -40,4 +47,11 @@ public interface UpdatePasswordAction extends Serializable {
*/
String getPassword();
/**
* 设置密码
*
* @param password password
*/
void setPassword(String password);
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.security;
package org.dromara.visor.common.security;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

View File

@@ -0,0 +1,77 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.session;
import cn.orionsec.kit.lang.exception.AuthenticationException;
import cn.orionsec.kit.lang.exception.argument.InvalidArgumentException;
import cn.orionsec.kit.lang.utils.Exceptions;
import cn.orionsec.kit.lang.utils.Strings;
import org.dromara.visor.common.constant.Const;
/**
* 连接消息
*
* @author Jiahang Li
* @version 1.0.0
* @since 2024/7/11 16:30
*/
public interface SessionMessage {
String AUTHENTICATION_FAILURE = "身份认证失败. {}";
String SERVER_UNREACHABLE = "无法连接至服务器. {}";
String CONNECTION_TIMEOUT = "连接服务器超时. {}";
/**
* 获取错误信息
*
* @param address address
* @param e e
* @return errorMessage
*/
static String getErrorMessage(String address, Exception e) {
if (e == null) {
return null;
}
String message = e.getMessage();
if (Strings.contains(message, Const.TIMEOUT)) {
// 连接超时
return Strings.format(SessionMessage.CONNECTION_TIMEOUT, address);
} else if (Exceptions.isCausedBy(e, AuthenticationException.class)) {
// 认证失败
return Strings.format(SessionMessage.AUTHENTICATION_FAILURE, address);
} else if (Exceptions.isCausedBy(e, InvalidArgumentException.class)) {
// 参数错误
if (Strings.isBlank(message)) {
return Strings.format(SessionMessage.SERVER_UNREACHABLE, address);
} else {
return message;
}
} else {
// 其他错误
return Strings.format(SessionMessage.SERVER_UNREACHABLE, address);
}
}
}

View File

@@ -0,0 +1,72 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.session.config;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* 基础连接配置实现
*
* @author Jiahang Li
* @version 1.0.0
* @since 2025/4/1 16:59
*/
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "BaseConnectConfig", description = "基础连接参数")
public class BaseConnectConfig implements IBaseConnectConfig {
@Schema(description = "系统类型")
private String osType;
@Schema(description = "系统架构")
private String archType;
@Schema(description = "hostId")
private Long hostId;
@Schema(description = "hostName")
private String hostName;
@Schema(description = "主机编码")
private String hostCode;
@Schema(description = "主机地址")
private String hostAddress;
@Schema(description = "主机端口")
private Integer hostPort;
@Schema(description = "用户名")
private String username;
@Schema(description = "密码")
private String password;
}

View File

@@ -0,0 +1,72 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.session.config;
/**
* 基础连接配置定义
*
* @author Jiahang Li
* @version 1.0.0
* @since 2025/6/24 17:11
*/
public interface IBaseConnectConfig {
// -------------------- getter/setter --------------------
String getOsType();
void setOsType(String osType);
String getArchType();
void setArchType(String archType);
Long getHostId();
void setHostId(Long hostId);
String getHostName();
void setHostName(String hostName);
String getHostCode();
void setHostCode(String hostCode);
String getHostAddress();
void setHostAddress(String hostAddress);
Integer getHostPort();
void setHostPort(Integer hostPort);
String getUsername();
void setUsername(String username);
String getPassword();
void setPassword(String password);
}

View File

@@ -0,0 +1,80 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.session.config;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* RDP 连接参数
*
* @author Jiahang Li
* @version 1.0.0
* @since 2025/4/1 16:57
*/
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Schema(name = "RdpConnectConfig", description = "RDP 连接参数")
public class RdpConnectConfig extends BaseConnectConfig {
@Schema(description = "低带宽模式")
private Boolean lowBandwidthMode;
@Schema(description = "RDP 版本是否大于8.1")
private Boolean versionGt81;
@Schema(description = "时区")
private String timezone;
@Schema(description = "键盘布局")
private String keyboardLayout;
@Schema(description = "剪切板规范")
private String clipboardNormalize;
@Schema(description = "")
private String domain;
@Schema(description = "预连接id")
private String preConnectionId;
@Schema(description = "预连接数据")
private String preConnectionBlob;
@Schema(description = "远程应用")
private String remoteApp;
@Schema(description = "远程应用路径")
private String remoteAppDir;
@Schema(description = "远程应用参数")
private String remoteAppArgs;
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,51 +20,29 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.module.asset.entity.dto;
package org.dromara.visor.common.session.config;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.dromara.visor.framework.desensitize.core.annotation.Desensitize;
import org.dromara.visor.framework.desensitize.core.annotation.DesensitizeObject;
import lombok.experimental.SuperBuilder;
/**
* 终端连接参数
* SSH 连接参数
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/12/26 15:47
*/
@Data
@Builder
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@DesensitizeObject
@Schema(name = "TerminalConnectDTO", description = "终端连接参数")
public class TerminalConnectDTO {
@Schema(description = "logId")
private Long logId;
@Schema(description = "连接类型")
private String connectType;
@Schema(description = "hostId")
private Long hostId;
@Schema(description = "hostName")
private String hostName;
@Schema(description = "主机地址")
private String hostAddress;
@Schema(description = "主机端口")
private Integer hostPort;
@Schema(description = "系统类型")
private String osType;
@EqualsAndHashCode(callSuper = true)
@Schema(name = "SshConnectConfig", description = "SSH 连接参数")
public class SshConnectConfig extends BaseConnectConfig {
@Schema(description = "超时时间")
private Integer timeout;
@@ -71,25 +56,15 @@ public class TerminalConnectDTO {
@Schema(description = "文件内容编码")
private String fileContentCharset;
@Schema(description = "用户名")
private String username;
@Desensitize(toEmpty = true)
@Schema(description = "密码")
private String password;
@Schema(description = "密钥id")
private Long keyId;
@Desensitize(toEmpty = true)
@Schema(description = "公钥文本")
private String publicKey;
@Desensitize(toEmpty = true)
@Schema(description = "私钥文本")
private String privateKey;
@Desensitize(toEmpty = true)
@Schema(description = "私钥密码")
private String privateKeyPassword;

View File

@@ -0,0 +1,117 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.session.ssh;
import cn.orionsec.kit.lang.utils.Exceptions;
import cn.orionsec.kit.lang.utils.Strings;
import cn.orionsec.kit.net.host.SessionHolder;
import cn.orionsec.kit.net.host.SessionLogger;
import cn.orionsec.kit.net.host.SessionStore;
import lombok.extern.slf4j.Slf4j;
import org.dromara.visor.common.constant.AppConst;
import org.dromara.visor.common.session.SessionMessage;
import org.dromara.visor.common.session.config.SshConnectConfig;
import org.dromara.visor.common.utils.AesEncryptUtils;
import java.util.Optional;
/**
* sessionStore 工具类
*
* @author Jiahang Li
* @version 1.0.0
* @since 2024/7/11 16:58
*/
@Slf4j
public class SessionStores {
/**
* 打开 sessionStore
*
* @param config config
* @return sessionStore
*/
public static SessionStore openSessionStore(SshConnectConfig config) {
Long hostId = config.getHostId();
String address = config.getHostAddress();
String username = config.getUsername();
log.info("SessionStores-open-start hostId: {}, address: {}, username: {}", hostId, address, username);
try {
// 创建会话
SessionHolder sessionHolder = SessionHolder.create();
sessionHolder.setLogger(SessionLogger.INFO);
SessionStore session = createSessionStore(config, sessionHolder);
// 设置版本
session.getSession().setClientVersion("SSH-2.0-ORION_VISOR_V" + AppConst.VERSION);
// 连接
session.connect();
log.info("SessionStores-open-success hostId: {}, address: {}, username: {}", hostId, address, username);
return session;
} catch (Exception e) {
String message = e.getMessage();
log.error("SessionStores-open-error hostId: {}, address: {}, username: {}, message: {}", hostId, address, username, message, e);
throw Exceptions.app(SessionMessage.getErrorMessage(address, e), e);
}
}
/**
* 创建 sessionStore
*
* @param config config
* @param sessionHolder sessionHolder
* @return sessionStore
*/
private static SessionStore createSessionStore(SshConnectConfig config, SessionHolder sessionHolder) {
final boolean useKey = config.getKeyId() != null;
// 使用密钥认证
if (useKey) {
// 加载密钥
String publicKey = Optional.ofNullable(config.getPublicKey())
.map(AesEncryptUtils::decryptAsString)
.orElse(null);
String privateKey = Optional.ofNullable(config.getPrivateKey())
.map(AesEncryptUtils::decryptAsString)
.orElse(null);
String password = Optional.ofNullable(config.getPrivateKeyPassword())
.map(AesEncryptUtils::decryptAsString)
.orElse(null);
sessionHolder.addIdentityValue(String.valueOf(config.getKeyId()),
privateKey,
publicKey,
password);
}
// 获取会话
SessionStore session = sessionHolder.getSession(config.getHostAddress(), config.getHostPort(), config.getUsername());
// 使用密码认证
if (!useKey) {
String password = config.getPassword();
if (!Strings.isEmpty(password)) {
session.password(AesEncryptUtils.decryptAsString(password));
}
}
// 超时时间
session.timeout(config.getTimeout());
return session;
}
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,9 +20,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.thread;
package org.dromara.visor.common.thread;
import org.dromara.visor.framework.common.utils.ThreadMdcUtils;
import org.dromara.visor.common.utils.ThreadMdcUtils;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.Callable;

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.meta;
package org.dromara.visor.common.trace;
import cn.orionsec.kit.lang.id.UUIds;
import com.alibaba.ttl.TransmittableThreadLocal;

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,25 +20,23 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.utils;
package org.dromara.visor.common.utils;
import cn.orionsec.kit.lang.utils.Exceptions;
import org.dromara.visor.framework.common.crypto.ValueCrypto;
import org.dromara.visor.common.interfaces.AesEncryptor;
/**
* 加密工具类
* <p>
* PrimaryValueCrypto 代理类工具
* aes 数据加密工具类
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/7/8 0:05
*/
public class CryptoUtils {
public class AesEncryptUtils {
private static ValueCrypto delegate;
private static AesEncryptor delegate;
private CryptoUtils() {
private AesEncryptUtils() {
}
/**
@@ -156,12 +161,12 @@ public class CryptoUtils {
return delegate.decryptBase62(text);
}
public static void setDelegate(ValueCrypto delegate) {
if (CryptoUtils.delegate != null) {
public static void setDelegate(AesEncryptor delegate) {
if (AesEncryptUtils.delegate != null) {
// unmodified
throw Exceptions.state();
}
CryptoUtils.delegate = delegate;
AesEncryptUtils.delegate = delegate;
}
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,9 +20,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.utils;
package org.dromara.visor.common.utils;
import cn.orionsec.kit.lang.constant.Const;
import org.dromara.visor.common.constant.Const;
import java.util.Arrays;
import java.util.List;

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,10 +20,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.utils;
package org.dromara.visor.common.utils;
import cn.orionsec.kit.lang.utils.time.Dates;
import org.dromara.visor.framework.common.constant.Const;
import org.dromara.visor.common.constant.Const;
/**
* 文件名称

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,12 +20,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.utils;
package org.dromara.visor.common.utils;
import cn.orionsec.kit.ext.location.Region;
import cn.orionsec.kit.ext.location.region.LocationRegions;
import cn.orionsec.kit.web.servlet.web.Servlets;
import org.dromara.visor.framework.common.constant.Const;
import org.dromara.visor.common.constant.Const;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,11 +20,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.utils;
package org.dromara.visor.common.utils;
import cn.orionsec.kit.lang.utils.Exceptions;
import lombok.extern.slf4j.Slf4j;
import org.dromara.visor.framework.common.lock.Locker;
import org.dromara.visor.common.interfaces.Locker;
import java.util.function.Supplier;

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,13 +20,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.utils;
package org.dromara.visor.common.utils;
import cn.orionsec.kit.lang.utils.Objects1;
import cn.orionsec.kit.lang.utils.Systems;
import cn.orionsec.kit.lang.utils.io.Files1;
import org.dromara.visor.framework.common.constant.AppConst;
import org.dromara.visor.framework.common.constant.Const;
import org.dromara.visor.common.constant.AppConst;
import org.dromara.visor.common.constant.Const;
/**
* 路径工具类

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,11 +20,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.utils;
package org.dromara.visor.common.utils;
import cn.orionsec.kit.web.servlet.web.Servlets;
import org.dromara.visor.framework.common.entity.RequestIdentity;
import org.dromara.visor.framework.common.entity.RequestIdentityModel;
import org.dromara.visor.common.entity.RequestIdentity;
import org.dromara.visor.common.entity.RequestIdentityModel;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

View File

@@ -0,0 +1,60 @@
/*
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.common.utils;
import cn.orionsec.kit.lang.utils.Exceptions;
import org.dromara.visor.common.interfaces.RsaDecryptor;
/**
* rsa 参数解密工具类
*
* @author Jiahang Li
* @version 1.0.0
* @since 2025/1/5 21:13
*/
public class RsaParamDecryptUtils {
private static RsaDecryptor delegate;
private RsaParamDecryptUtils() {
}
/**
* 解密
*
* @param value value
* @return value
*/
public static String decrypt(String value) {
return delegate.decrypt(value);
}
public static void setDelegate(RsaDecryptor delegate) {
if (RsaParamDecryptUtils.delegate != null) {
// unmodified
throw Exceptions.state();
}
RsaParamDecryptUtils.delegate = delegate;
}
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,9 +20,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.utils;
package org.dromara.visor.common.utils;
import org.dromara.visor.framework.common.constant.Const;
import org.dromara.visor.common.constant.Const;
/**
* sql 工具类
@@ -36,6 +43,9 @@ public class SqlUtils {
* @return limit
*/
public static String limit(Number limit) {
if (limit == null) {
return Const.EMPTY;
}
return Const.LIMIT + Const.SPACE + limit;
}
@@ -47,6 +57,9 @@ public class SqlUtils {
* @return limit
*/
public static String limit(Number offset, Number limit) {
if (offset == null) {
return limit(limit);
}
return Const.LIMIT + Const.SPACE + offset + Const.COMMA + limit;
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,12 +20,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.utils;
package org.dromara.visor.common.utils;
import cn.orionsec.kit.lang.utils.collect.Maps;
import cn.orionsec.kit.lang.utils.reflect.Annotations;
import io.swagger.v3.oas.annotations.Operation;
import org.dromara.visor.framework.common.constant.Const;
import org.dromara.visor.common.constant.Const;
import java.lang.reflect.Method;
import java.util.Map;

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,9 +20,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.utils;
package org.dromara.visor.common.utils;
import org.dromara.visor.framework.common.meta.TraceIdHolder;
import org.dromara.visor.common.trace.TraceIdHolder;
import org.slf4j.MDC;
import java.util.Map;

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,11 +20,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.utils;
package org.dromara.visor.common.utils;
import cn.orionsec.kit.lang.utils.collect.Lists;
import org.dromara.visor.framework.common.constant.Const;
import org.dromara.visor.framework.common.entity.TreeNode;
import org.dromara.visor.common.constant.Const;
import org.dromara.visor.common.entity.TreeNode;
import java.util.Comparator;
import java.util.List;

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,12 +20,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.utils;
package org.dromara.visor.common.utils;
import cn.orionsec.kit.lang.utils.Arrays1;
import cn.orionsec.kit.lang.utils.io.Files1;
import cn.orionsec.kit.spring.SpringHolder;
import org.dromara.visor.framework.common.constant.ErrorMessage;
import org.dromara.visor.common.constant.Const;
import org.dromara.visor.common.constant.ErrorMessage;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
@@ -37,7 +45,7 @@ import java.util.function.Function;
*/
public class Valid extends cn.orionsec.kit.lang.utils.Valid {
private static final Validator VALIDATOR = SpringHolder.getBean(Validator.class);
private static final Validator validator = SpringHolder.getBean(Validator.class);
public static <T> T notNull(T object) {
return notNull(object, ErrorMessage.PARAM_MISSING);
@@ -123,7 +131,7 @@ public class Valid extends cn.orionsec.kit.lang.utils.Valid {
public static <T> T valid(T obj, Class<?>... groups) {
notNull(obj, ErrorMessage.PARAM_MISSING);
// 验证对象
Set<ConstraintViolation<T>> set = VALIDATOR.validate(obj, groups);
Set<ConstraintViolation<T>> set = validator.validate(obj, groups);
if (!set.isEmpty()) {
throw new ConstraintViolationException(set);
}
@@ -152,4 +160,17 @@ public class Valid extends cn.orionsec.kit.lang.utils.Valid {
return Files1.getPath(path);
}
/**
* 检查后缀
*
* @param file file
* @param suffix suffix
* @return file
*/
public static String checkSuffix(String file, String suffix) {
Valid.notBlank(file);
Valid.isTrue(file.toLowerCase().endsWith(Const.DOT + suffix), ErrorMessage.PLEASE_SELECT_SUFFIX_FILE, suffix);
return file;
}
}

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.validator.group;
package org.dromara.visor.common.validator.group;
/**
* 批量验证分组

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.validator.group;
package org.dromara.visor.common.validator.group;
/**
* 清理验证分组

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.validator.group;
package org.dromara.visor.common.validator.group;
/**
* 分页验证分组

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.validator.group;
package org.dromara.visor.common.validator.group;
/**
* 分页验证分组

View File

@@ -1,5 +1,12 @@
/*
* Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).
* Copyright (c) 2023 - present Dromara, All rights reserved.
*
* https://visor.dromara.org
* https://visor.dromara.org.cn
* https://visor.orionsec.cn
*
* Members:
* Jiahang Li - ljh1553488six@139.com - author
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.web.filter;
package org.dromara.visor.common.web;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
@@ -26,9 +33,9 @@ import javax.servlet.Filter;
* @version 1.0.0
* @since 2023/6/25 15:05
*/
public class FilterCreator {
public class WebFilterCreator {
private FilterCreator() {
private WebFilterCreator() {
}
/**

View File

@@ -10,15 +10,15 @@
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<description>项目所有依赖</description>
<description>项目全部依赖</description>
<url>https://github.com/dromara/orion-visor</url>
<properties>
<revision>2.2.0</revision>
<revision>2.4.0</revision>
<spring.boot.version>2.7.17</spring.boot.version>
<spring.boot.admin.version>2.7.15</spring.boot.admin.version>
<flatten.maven.plugin.version>1.5.0</flatten.maven.plugin.version>
<orion.kit.version>2.0.0</orion.kit.version>
<orion.kit.version>2.0.1</orion.kit.version>
<aspectj.version>1.9.7</aspectj.version>
<lombok.version>1.18.26</lombok.version>
<springdoc.version>1.6.15</springdoc.version>
@@ -34,6 +34,7 @@
<mockito.inline.version>4.11.0</mockito.inline.version>
<jedis.mock.version>1.0.7</jedis.mock.version>
<podam.version>7.2.11.RELEASE</podam.version>
<guacd.version>1.5.5</guacd.version>
</properties>
<dependencyManagement>
@@ -62,7 +63,7 @@
<!-- orion-visor-starter -->
<dependency>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-framework-common</artifactId>
<artifactId>orion-visor-common</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
@@ -75,6 +76,11 @@
<artifactId>orion-visor-spring-boot-starter-web</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-config</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-swagger</artifactId>
@@ -110,6 +116,11 @@
<artifactId>orion-visor-spring-boot-starter-desensitize</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-encrypt</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.dromara.visor</groupId>
<artifactId>orion-visor-spring-boot-starter-log</artifactId>
@@ -302,6 +313,13 @@
<artifactId>podam</artifactId>
<version>${podam.version}</version>
</dependency>
<!-- guacd -->
<dependency>
<groupId>org.apache.guacamole</groupId>
<artifactId>guacamole-common</artifactId>
<version>${guacd.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

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