diff --git a/README.md b/README.md index 2482e5f5..4af61332 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@
-当前版本: **1.0.0** +当前版本: **1.0.1** github: https://github.com/lijiahangmax/orion-ops-pro gitee: https://gitee.com/lijiahangmax/orion-ops-pro 文档: https://lijiahangmax.gitee.io/orion-ops-pro/#/ diff --git a/docker-compose.yml b/docker-compose.yml index a4c63c7b..691aeb80 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.3' services: orion-ops-pro: - image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-pro:1.0.0 + image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-pro:1.0.1 ports: - 1081:80 environment: diff --git a/docker/orion-ops-pro/build.sh b/docker/orion-ops-pro/build.sh index 6da983e9..27408cd7 100644 --- a/docker/orion-ops-pro/build.sh +++ b/docker/orion-ops-pro/build.sh @@ -1,3 +1,3 @@ mv ../../orion-ops-launch/target/orion-ops-launch.jar ./ mv ../../orion-ops-ui/dist ./dist -docker build -t orion-ops-pro:1.0.0 . +docker build -t orion-ops-pro:1.0.1 . diff --git a/docs/README.md b/docs/README.md index a679af31..f1cfb920 100644 --- a/docs/README.md +++ b/docs/README.md @@ -28,7 +28,7 @@
-当前版本: **1.0.0** +当前版本: **1.0.1** github: https://github.com/lijiahangmax/orion-ops-pro gitee: https://gitee.com/lijiahangmax/orion-ops-pro 文档: https://lijiahangmax.gitee.io/orion-ops-pro/#/ diff --git a/docs/_coverpage.md b/docs/_coverpage.md index d6f5103f..44f94d9c 100644 --- a/docs/_coverpage.md +++ b/docs/_coverpage.md @@ -1,4 +1,4 @@ -# orion-ops-pro 1.0.0 +# orion-ops-pro 1.0.1 > 一款开箱即用的运维平台。 diff --git a/docs/about/change-log.md b/docs/about/change-log.md index 1338e89e..7e5fd687 100644 --- a/docs/about/change-log.md +++ b/docs/about/change-log.md @@ -1,17 +1,30 @@ > 版本号严格遵循 Semver 规范。 -[//]: # (🐞修复) +## v1.0.1 -## 1.0.0 +`2024-03-06` `release` + +🐞 修复 用户操作日志条件重置后类型框数据不正常的问题 +🩰 修改 主机连接日志 UI +🌈 新增 SFTP 使用日志列表 +🌈 新增 主机连接日志强制下线会话 +🌈 新增 主机连接日志删除/清理 +🌈 新增 用户操作日志日志删除/清理 +🌈 新增 用户操作日志日志删除/清理 +🔨 优化 用户锁定次数/时间可配置 + +[如何升级](/about/update.md?id=_v101) + +## v1.0.0 `2024-03-01` `release` -🌈 用户自定义终端标签颜色 +🌈 新增 用户自定义终端标签颜色 🔨 拓展数据模块添加缓存 -[如何升级](/about/update.md?id=_100) +[如何升级](/about/update.md?id=_v100) -## 1.0.0-beta.1 +## v1.0.0-beta.1 `2024-02-28` `preview` diff --git a/docs/about/roadmap.md b/docs/about/roadmap.md index 1c668dfb..588f70fd 100644 --- a/docs/about/roadmap.md +++ b/docs/about/roadmap.md @@ -4,9 +4,11 @@ ## 未开始 ⏳ +* 资产管理表结构优化 * 批量执行 * 定时执行 * 站内消息 -* 后端配置动态配置 * 终端背景图片 * 资产授权 UI 改版 +* RDP 远程桌面 +* 接入 config 后端动态配置 diff --git a/docs/about/update.md b/docs/about/update.md index 5cbde5b4..89ab7d14 100644 --- a/docs/about/update.md +++ b/docs/about/update.md @@ -1,6 +1,49 @@ ⚡ 注意: 应用不支持跨版本升级, 可以进行多次升级 -## 1.0.0 +## v1.0.1 + +> sql 脚本 + +```sql +DROP TABLE IF EXISTS `command_template`; +ALTER TABLE `operator_log` ADD INDEX `idx_type`(`type`); +-- 菜单配置 +DELETE FROM `system_menu` WHERE id IN (148, 149); +INSERT INTO `system_menu` VALUES (148, 152, '连接日志', NULL, 2, 10, 1, 1, 1, 0, 'IconLink', NULL, 'assetAuditConnectLog', '2023-12-26 22:53:07', '2024-03-05 23:31:23', NULL, '1', 0); +INSERT INTO `system_menu` VALUES (149, 148, '查询连接日志', 'asset:host-connect-log:management:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-12-26 22:53:08', '2024-03-04 13:40:42', NULL, '1', 0); +INSERT INTO `system_menu` VALUES (152, 0, '运维审计', NULL, 1, 410, 1, 1, 1, 0, 'IconSafe', NULL, 'assetAudit', '2024-01-04 17:54:56', '2024-03-05 23:31:10', '1', '1', 0); +INSERT INTO `system_menu` VALUES (153, 148, '删除连接日志', 'asset:host-connect-log:management:delete', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 13:39:46', '2024-03-04 13:40:29', '1', '1', 0); +INSERT INTO `system_menu` VALUES (154, 148, '清空连接日志', 'asset:host-connect-log:management:clear', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 13:40:05', '2024-03-04 13:40:34', '1', '1', 0); +INSERT INTO `system_menu` VALUES (155, 148, '强制断开连接', 'asset:host-connect-log:management:force-offline', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 13:41:02', '2024-03-05 23:32:01', '1', '1', 0); +INSERT INTO `system_menu` VALUES (156, 122, '删除操作日志', 'infra:operator-log:delete', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 17:06:55', '2024-03-04 17:08:22', '1', '1', 0); +INSERT INTO `system_menu` VALUES (157, 122, '清空操作日志', 'infra:operator-log:clear', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-04 17:07:25', '2024-03-04 17:08:27', '1', '1', 0); +INSERT INTO `system_menu` VALUES (158, 152, 'SFTP 操作日志', NULL, 2, 20, 1, 1, 1, 0, 'IconFile', NULL, 'assetAuditSftpLog', '2024-03-05 15:30:13', '2024-03-05 23:31:32', '1', '1', 0); +INSERT INTO `system_menu` VALUES (159, 158, '查询 SFTP 操作日志', 'asset:host-sftp-log:management:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-05 15:31:02', '2024-03-05 15:57:20', '1', '1', 0); +INSERT INTO `system_menu` VALUES (160, 158, '删除 SFTP 操作日志', 'asset:host-sftp-log:management:delete', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-05 15:31:17', '2024-03-05 15:57:30', '1', '1', 0); +-- 字典配置项 +INSERT INTO `dict_key` VALUES (33, 'sftpOperatorType', 'STRING', '[]', 'SFTP 操作类型', '2024-03-05 16:49:54', '2024-03-05 16:49:54', '1', '1', 0); +-- 字典配置值 +INSERT INTO `dict_value` VALUES (214, 28, 'hostConnectStatus', 'FORCE_OFFLINE', '强制下线', '{\"color\": \"rgb(var(--red-6))\"}', 40, '2024-03-04 12:51:13', '2024-03-04 12:51:13', '1', '1', 0); +INSERT INTO `dict_value` VALUES (215, 1, 'operatorLogModule', 'asset:host-connect-log', '主机连接日志', '{}', 2060, '2024-03-04 13:43:33', '2024-03-04 13:43:33', '1', '1', 0); +INSERT INTO `dict_value` VALUES (216, 2, 'operatorLogType', 'host-connect-log:delete', '删除记录', '{}', 10, '2024-03-04 13:44:34', '2024-03-04 13:44:34', '1', '1', 0); +INSERT INTO `dict_value` VALUES (217, 2, 'operatorLogType', 'host-connect-log:clear', '清空记录', '{}', 20, '2024-03-04 13:45:07', '2024-03-04 14:22:08', '1', '1', 0); +INSERT INTO `dict_value` VALUES (218, 2, 'operatorLogType', 'host-connect-log:force-offline', '强制下线', '{}', 30, '2024-03-04 13:45:36', '2024-03-04 13:45:36', '1', '1', 0); +INSERT INTO `dict_value` VALUES (219, 1, 'operatorLogModule', 'infra:operator-log', '操作日志', '{}', 1060, '2024-03-04 16:32:11', '2024-03-04 16:32:11', '1', '1', 0); +INSERT INTO `dict_value` VALUES (220, 2, 'operatorLogType', 'operator-log:delete', '删除操作日志', '{}', 10, '2024-03-04 16:33:11', '2024-03-04 16:33:44', '1', '1', 0); +INSERT INTO `dict_value` VALUES (221, 2, 'operatorLogType', 'operator-log:clear', '清空操作日志', '{}', 20, '2024-03-04 16:33:31', '2024-03-04 16:33:31', '1', '1', 0); +INSERT INTO `dict_value` VALUES (222, 2, 'operatorLogType', 'host-terminal:delete-sftp-log', '删除SFTP操作日志', '{}', 15, '2024-03-05 15:28:00', '2024-03-05 17:40:47', '1', '1', 0); +INSERT INTO `dict_value` VALUES (223, 33, 'sftpOperatorType', 'host-terminal:sftp-mkdir', '创建文件夹', '{}', 10, '2024-03-05 16:50:17', '2024-03-05 16:50:17', '1', '1', 0); +INSERT INTO `dict_value` VALUES (224, 33, 'sftpOperatorType', 'host-terminal:sftp-touch', '创建文件', '{}', 20, '2024-03-05 16:50:27', '2024-03-05 16:50:27', '1', '1', 0); +INSERT INTO `dict_value` VALUES (225, 33, 'sftpOperatorType', 'host-terminal:sftp-move', '移动文件', '{}', 30, '2024-03-05 16:50:41', '2024-03-05 16:50:41', '1', '1', 0); +INSERT INTO `dict_value` VALUES (226, 33, 'sftpOperatorType', 'host-terminal:sftp-remove', '删除文件', '{}', 40, '2024-03-05 16:50:53', '2024-03-05 16:50:53', '1', '1', 0); +INSERT INTO `dict_value` VALUES (227, 33, 'sftpOperatorType', 'host-terminal:sftp-truncate', '截断文件', '{}', 50, '2024-03-05 16:51:04', '2024-03-05 16:51:04', '1', '1', 0); +INSERT INTO `dict_value` VALUES (228, 33, 'sftpOperatorType', 'host-terminal:sftp-chmod', '文件提权', '{}', 60, '2024-03-05 16:51:15', '2024-03-05 16:51:15', '1', '1', 0); +INSERT INTO `dict_value` VALUES (229, 33, 'sftpOperatorType', 'host-terminal:sftp-set-content', '修改文件内容', '{}', 70, '2024-03-05 16:51:30', '2024-03-05 16:51:48', '1', '1', 0); +INSERT INTO `dict_value` VALUES (230, 33, 'sftpOperatorType', 'host-terminal:sftp-upload', '上传文件', '{}', 80, '2024-03-05 16:52:06', '2024-03-05 16:52:06', '1', '1', 0); +INSERT INTO `dict_value` VALUES (231, 33, 'sftpOperatorType', 'host-terminal:sftp-download', '下载文件', '{}', 90, '2024-03-05 16:52:18', '2024-03-05 16:52:18', '1', '1', 0); +``` + +## v1.0.0 > sql 脚本 diff --git a/docs/docs-serve.cmd b/docs/docs-server.cmd similarity index 100% rename from docs/docs-serve.cmd rename to docs/docs-server.cmd diff --git a/docs/operator/host_audit.md b/docs/operator/host_audit.md index 5360cccd..329f194c 100644 --- a/docs/operator/host_audit.md +++ b/docs/operator/host_audit.md @@ -1,3 +1,14 @@ ### 连接日志 -在主机终端页面打开的 `SSH` `SFTP` 连接都会记录下来, 这里默认只展示 `SSH` 连接记录, 可以展开条件进行修改。 +在主机终端页面打开的 `SSH` `SFTP` 连接都会记录下来。 + +* 详情: 查看连接详情 +* 断开: 断开连接 +* 删除: 删除连接记录 +* 清理: 根据条件清理数据 + +### SFTP 操作日志 + +查看用户 SFTP 操作日志, 是从用户操作日志中过滤查询。 + +* 删除: 删除操作日志 diff --git a/docs/operator/user.md b/docs/operator/user.md index 5ea97732..d0297acf 100644 --- a/docs/operator/user.md +++ b/docs/operator/user.md @@ -25,3 +25,4 @@ 记录用户在系统内的操作日志。 * 详情: 查看操作的参数以及留痕信息 +* 清理: 根据条件清理数据 diff --git a/docs/quickstart/dev.md b/docs/quickstart/dev.md index 1768184d..e59daa15 100644 --- a/docs/quickstart/dev.md +++ b/docs/quickstart/dev.md @@ -39,6 +39,8 @@ orion-ops-pro/orion-ops-launch/src/main/resources/application-prod.yaml cd orion-ops-pro # 编译 mvn -U clean install -DskipTests +# 启动 +com.orion.ops.launch.LaunchApplication ``` 4. 修改前端配置 diff --git a/docs/quickstart/faq.md b/docs/quickstart/faq.md index ce08dd80..62675c14 100644 --- a/docs/quickstart/faq.md +++ b/docs/quickstart/faq.md @@ -17,7 +17,7 @@ 可以在执行命令的第一行设置 `set -e` 作用是: 当执行出现意料之外的情况时, 立即退出 -> ##### 5. 在调度任务、应用构建、应用发布 命令执行成功的依据是什么? +> ##### 5. 在调度任务、批量执行 命令执行成功的依据是什么? 是获取命令的 `exitcode` 判断是否为 `0` 如果非0则代表命令执行失败 同理, 在命令的最后一行设置 `exit 1` 结果将会是失败, 可以用此来中断后续流程 diff --git a/orion-ops-dependencies/pom.xml b/orion-ops-dependencies/pom.xml index 38473e11..a9fa3653 100644 --- a/orion-ops-dependencies/pom.xml +++ b/orion-ops-dependencies/pom.xml @@ -14,7 +14,7 @@ https://github.com/lijiahangmax/orion-ops-pro - 1.0.0 + 1.0.1 2.7.17 2.7.15 1.5.0 diff --git a/orion-ops-framework/orion-ops-framework-common/src/main/java/com/orion/ops/framework/common/constant/ErrorMessage.java b/orion-ops-framework/orion-ops-framework-common/src/main/java/com/orion/ops/framework/common/constant/ErrorMessage.java index 3ccfc298..163be171 100644 --- a/orion-ops-framework/orion-ops-framework-common/src/main/java/com/orion/ops/framework/common/constant/ErrorMessage.java +++ b/orion-ops-framework/orion-ops-framework-common/src/main/java/com/orion/ops/framework/common/constant/ErrorMessage.java @@ -85,4 +85,8 @@ public interface ErrorMessage { String FILE_ABSENT = "文件不存在"; + String LOG_ABSENT = "日志不存在"; + + String ILLEGAL_STATUS = "当前状态不支持此操作"; + } diff --git a/orion-ops-framework/orion-ops-framework-common/src/main/java/com/orion/ops/framework/common/constant/FieldConst.java b/orion-ops-framework/orion-ops-framework-common/src/main/java/com/orion/ops/framework/common/constant/FieldConst.java index 36e22a92..85f0cfa6 100644 --- a/orion-ops-framework/orion-ops-framework-common/src/main/java/com/orion/ops/framework/common/constant/FieldConst.java +++ b/orion-ops-framework/orion-ops-framework-common/src/main/java/com/orion/ops/framework/common/constant/FieldConst.java @@ -47,4 +47,12 @@ public interface FieldConst { String MOD = "mod"; + String COUNT = "count"; + + String LOCATION = "location"; + + String USER_AGENT = "userAgent"; + + String ERROR_MESSAGE = "errorMessage"; + } diff --git a/orion-ops-framework/orion-ops-framework-common/src/main/java/com/orion/ops/framework/common/constant/OrionOpsProConst.java b/orion-ops-framework/orion-ops-framework-common/src/main/java/com/orion/ops/framework/common/constant/OrionOpsProConst.java index fe7e37e6..521b02fd 100644 --- a/orion-ops-framework/orion-ops-framework-common/src/main/java/com/orion/ops/framework/common/constant/OrionOpsProConst.java +++ b/orion-ops-framework/orion-ops-framework-common/src/main/java/com/orion/ops/framework/common/constant/OrionOpsProConst.java @@ -12,7 +12,7 @@ public interface OrionOpsProConst { /** * 同 ${orion.version} 迭代时候需要手动更改 */ - String VERSION = "1.0.0"; + String VERSION = "1.0.1"; String GITHUB = "https://github.com/lijiahangmax/orion-ops-pro"; diff --git a/orion-ops-framework/orion-ops-framework-common/src/main/java/com/orion/ops/framework/common/entity/PageRequest.java b/orion-ops-framework/orion-ops-framework-common/src/main/java/com/orion/ops/framework/common/entity/PageRequest.java index 46db7b2d..00f0963e 100644 --- a/orion-ops-framework/orion-ops-framework-common/src/main/java/com/orion/ops/framework/common/entity/PageRequest.java +++ b/orion-ops-framework/orion-ops-framework-common/src/main/java/com/orion/ops/framework/common/entity/PageRequest.java @@ -14,6 +14,7 @@ import org.hibernate.validator.constraints.Range; * @since 2023/7/12 23:14 */ @Data +@Schema(description = "公共页码请求") public class PageRequest implements IPageRequest { @Range(min = 1, max = 10000, groups = Page.class) diff --git a/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-card-list.vue.vm b/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-card-list.vue.vm index 8c9ed80c..e4bd436e 100644 --- a/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-card-list.vue.vm +++ b/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-card-list.vue.vm @@ -45,7 +45,9 @@ show-time allow-clear /> #else - + #end #end diff --git a/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-form-drawer.vue.vm b/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-form-drawer.vue.vm index a24f2f46..437a9410 100644 --- a/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-form-drawer.vue.vm +++ b/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-form-drawer.vue.vm @@ -35,7 +35,9 @@ placeholder="请选择${field.comment}" show-time /> #else - + #end #end diff --git a/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-form-modal.vue.vm b/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-form-modal.vue.vm index 19b28bde..336cd890 100644 --- a/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-form-modal.vue.vm +++ b/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-form-modal.vue.vm @@ -39,7 +39,9 @@ placeholder="请选择${field.comment}" show-time /> #else - + #end #end diff --git a/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-table.vue.vm b/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-table.vue.vm index bf21b10a..24d32c87 100644 --- a/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-table.vue.vm +++ b/orion-ops-framework/orion-ops-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-components-table.vue.vm @@ -2,10 +2,10 @@ + label-align="left" + @submit="fetchTableData" + @reset="fetchTableData" + @keyup.enter="() => fetchTableData()"> #foreach($field in ${table.fields}) @@ -27,7 +27,9 @@ show-time allow-clear /> #else - + #end #end @@ -48,8 +50,8 @@
- 新增