From 3927da1d02892e6292060a97603bd898eab021a0 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 29 Oct 2020 20:52:16 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E6=B5=8B=E8=AF=95=E6=8A=A5=E5=91=8A=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/config/ShiroConfig.java | 2 +- frontend/package.json | 6 +- .../common/components/MsCodeEdit.vue | 24 ++-- frontend/src/common/js/format-utils.js | 130 ++++++++++++++++++ 4 files changed, 149 insertions(+), 13 deletions(-) create mode 100644 frontend/src/common/js/format-utils.js diff --git a/backend/src/main/java/io/metersphere/config/ShiroConfig.java b/backend/src/main/java/io/metersphere/config/ShiroConfig.java index b64a53dc34..88abf6d940 100644 --- a/backend/src/main/java/io/metersphere/config/ShiroConfig.java +++ b/backend/src/main/java/io/metersphere/config/ShiroConfig.java @@ -43,7 +43,7 @@ public class ShiroConfig implements EnvironmentAware { shiroFilterFactoryBean.getFilters().put("apikey", new ApiKeyFilter()); Map filterChainDefinitionMap = shiroFilterFactoryBean.getFilterChainDefinitionMap(); ShiroUtils.loadBaseFilterChain(filterChainDefinitionMap); - filterChainDefinitionMap.put("/**", "apikey"); + filterChainDefinitionMap.put("/**", "apikey, authc"); return shiroFilterFactoryBean; } diff --git a/frontend/package.json b/frontend/package.json index 1b15b96a2d..6a709fd88a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -36,7 +36,8 @@ "yan-progress": "^1.0.3", "nprogress": "^0.2.0", "el-table-infinite-scroll": "^1.0.10", - "vue-pdf": "^4.2.0" + "vue-pdf": "^4.2.0", + "diffable-html": "^4.0.0" }, "devDependencies": { "@vue/cli-plugin-babel": "^4.1.0", @@ -63,7 +64,8 @@ "no-console": "off", "no-unused-vars": "off", "no-unused-expressions": "off", - "no-unused-labels": "off" + "no-unused-labels": "off", + "no-useless-escape": "off" }, "parserOptions": { "parser": "babel-eslint" diff --git a/frontend/src/business/components/common/components/MsCodeEdit.vue b/frontend/src/business/components/common/components/MsCodeEdit.vue index 02d6c870fe..afbe57255c 100644 --- a/frontend/src/business/components/common/components/MsCodeEdit.vue +++ b/frontend/src/business/components/common/components/MsCodeEdit.vue @@ -3,6 +3,9 @@