diff --git a/docs/deploy-manual/rpm.md b/docs/deploy-manual/rpm.md index 797776db..37c1d0df 100644 --- a/docs/deploy-manual/rpm.md +++ b/docs/deploy-manual/rpm.md @@ -35,7 +35,7 @@ cd /opt/sqle/etc vim config.yml ``` :::tip -确保 config.yml 的文件 owner 为 actiontech-universe:actiontech +确保 config.yaml 的文件 owner 为 actiontech-universe:actiontech ::: ## 启动 SQLE diff --git a/docs/dev-manual/auditplugins/eclipse.md b/docs/dev-manual/auditplugins/eclipse.md new file mode 100644 index 00000000..dff9cc12 --- /dev/null +++ b/docs/dev-manual/auditplugins/eclipse.md @@ -0,0 +1,59 @@ +--- +title: Eclipse审核插件 +--- + +Eclipse审核插件可以在开发阶段实时进行自助式的SQL审核,确保SQL开发符合规范并满足上线要求。 + +## 环境要求 + +* 推荐使用Java8版本 + +* Eclipse插件最低适配Eclipse 2015 mars版本 + +## 使用方式 + +### 获取安装包 +参考:https://github.com/actiontech/sqle/releases/tag/v3.2401.0 + +### 安装插件 +将下载的jar包,复制到Eclipse编辑器目录中的dropins文件夹中 +![eclipse-install](img/eclipse-install.png) + +### 配置插件 +1. 点击`Eclipse菜单栏`-`Window`-`Preferences`-`SQLE`。 +2. 在SQLE Addr栏中输入SQLE服务的地址、用户名和密码以连接到SQLE。 +3. 点击`Test Connection`按钮,确保能够成功连接到SQLE并获取项目和数据库类型列表。 +4. 依次选择Project、DB Type、Data Source和Schema下拉框,配置要进行审核的数据库信息。 +5. 点击`Apply and Close`按钮保存配置并退出配置界面,完成配置。 + +![eclipse-install-edit](img/eclipse-install-edit.png) + +#### 配置说明 + +| 配置项 | 配置项说明 | +|-----------------|--------------------------------------------------| +| SQLE Addr | SQLE 服务地址, 格式为 IP:Port | +| HTTP | 指定连接SQLE的方式是通过HTTP还是HTTPS | +| UserName | 登录SQLE使用的用户名 | +| Password | 登录SQLE使用的密码 | +| Test Connection | 测试连接是否成功, 将尝试登录SQLE | +| Project | 项目名称 | +| DB Type | 当其他配置正确时,该下拉菜单将自动获取支持审核的数据库实例类型,并使用该实例类型的审核规则进行审核 | +| Data Source | 数据源名称 | +| Schema | 数据库名称 | + + + +### 使用说明 +按照以下步骤使用插件: + +1. 选中需要审核的SQL语句,可以同时选中多条。 +2. 右键点击选中的SQL语句,选择[SQLE SQL Audit],插件将以视图的形式展示审核结果。 +![eclipseaudit1](img/eclipseaudit1.gif) +1. 若要审核MyBatis XML文件或SQL文件,选中对应的文件,右键点击,选择[SQLE MyBatis Audit]。 +![eclipseauditxml](img/eclipseauditxml.gif) + +:::tip +目前还支持对文件夹进行SQL审核,但仅支持审核文件夹中的XML文件。 +::: + diff --git a/docs/dev-manual/auditplugins/img/eclipse-install-edit.png b/docs/dev-manual/auditplugins/img/eclipse-install-edit.png new file mode 100644 index 00000000..875bd4bc Binary files /dev/null and b/docs/dev-manual/auditplugins/img/eclipse-install-edit.png differ diff --git a/docs/dev-manual/auditplugins/img/eclipse-install.png b/docs/dev-manual/auditplugins/img/eclipse-install.png new file mode 100644 index 00000000..7b12654b Binary files /dev/null and b/docs/dev-manual/auditplugins/img/eclipse-install.png differ diff --git a/docs/dev-manual/auditplugins/img/eclipseaudit1.gif b/docs/dev-manual/auditplugins/img/eclipseaudit1.gif new file mode 100644 index 00000000..39759bed Binary files /dev/null and b/docs/dev-manual/auditplugins/img/eclipseaudit1.gif differ diff --git a/docs/dev-manual/auditplugins/img/eclipseauditxml.gif b/docs/dev-manual/auditplugins/img/eclipseauditxml.gif new file mode 100644 index 00000000..210c00cd Binary files /dev/null and b/docs/dev-manual/auditplugins/img/eclipseauditxml.gif differ diff --git a/docs/user-manual/img/ide-install-edit.png b/docs/dev-manual/auditplugins/img/ide-install-edit.png similarity index 100% rename from docs/user-manual/img/ide-install-edit.png rename to docs/dev-manual/auditplugins/img/ide-install-edit.png diff --git a/docs/user-manual/img/ide-install-result.png b/docs/dev-manual/auditplugins/img/ide-install-result.png similarity index 100% rename from docs/user-manual/img/ide-install-result.png rename to docs/dev-manual/auditplugins/img/ide-install-result.png diff --git a/docs/user-manual/img/ide-install-setting3.png b/docs/dev-manual/auditplugins/img/ide-install-setting3.png similarity index 100% rename from docs/user-manual/img/ide-install-setting3.png rename to docs/dev-manual/auditplugins/img/ide-install-setting3.png diff --git a/docs/user-manual/img/ide-install-use.png b/docs/dev-manual/auditplugins/img/ide-install-use.png similarity index 100% rename from docs/user-manual/img/ide-install-use.png rename to docs/dev-manual/auditplugins/img/ide-install-use.png diff --git a/docs/user-manual/img/ide-install-use2.png b/docs/dev-manual/auditplugins/img/ide-install-use2.png similarity index 100% rename from docs/user-manual/img/ide-install-use2.png rename to docs/dev-manual/auditplugins/img/ide-install-use2.png diff --git a/docs/user-manual/img/ide-install.png b/docs/dev-manual/auditplugins/img/ide-install.png similarity index 100% rename from docs/user-manual/img/ide-install.png rename to docs/dev-manual/auditplugins/img/ide-install.png diff --git a/docs/user-manual/img/ide-source-change.png b/docs/dev-manual/auditplugins/img/ide-source-change.png similarity index 100% rename from docs/user-manual/img/ide-source-change.png rename to docs/dev-manual/auditplugins/img/ide-source-change.png diff --git a/docs/user-manual/jetbrains.md b/docs/dev-manual/auditplugins/jetbrains.md similarity index 98% rename from docs/user-manual/jetbrains.md rename to docs/dev-manual/auditplugins/jetbrains.md index 70800203..2b426bf5 100644 --- a/docs/user-manual/jetbrains.md +++ b/docs/dev-manual/auditplugins/jetbrains.md @@ -45,7 +45,7 @@ title: IDEA审核插件 ### 切换数据源 用户可以轻松查看和更改当前的数据源,省去了繁琐的全局配置步骤,以满足多项目或多环境的场景。 -![ide-install-use](img/ide-source-change.png) +![ide-install-use](img/ide-install-use.png) ### 快捷审核 diff --git a/docs/user-manual/img/ide-install-setting2.png b/docs/user-manual/img/ide-install-setting2.png deleted file mode 100644 index 039a4ca0..00000000 Binary files a/docs/user-manual/img/ide-install-setting2.png and /dev/null differ diff --git a/sidebars.js b/sidebars.js index 88a0f5b9..2579a6c9 100644 --- a/sidebars.js +++ b/sidebars.js @@ -117,7 +117,6 @@ const sidebars = { ], }, "user-manual/customrule", - "user-manual/jetbrains", "user-manual/knowledgebase", ], }, @@ -127,13 +126,21 @@ const sidebars = { items: [ { type: 'category', - label: '数据库审核插件', + label: '数据源审核插件', items: [ "dev-manual/plugins/intro", "dev-manual/plugins/howtouse", "dev-manual/plugins/howtodev", ], }, + { + type: 'category', + label: '开发工具审核插件', + items: [ + "dev-manual/auditplugins/jetbrains", + "dev-manual/auditplugins/eclipse", + ], + }, { type: 'category', label: 'OpenAPI',