From fccababb39adb67c85be57391ebeb62697c10a79 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Wed, 16 Sep 2020 20:45:09 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=BF=9E=E6=8E=A5Mysql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/ApiTestEnvironmentWithBLOBs.java | 6 +- .../base/mapper/ApiTestEnvironmentMapper.xml | 39 ++- .../V22__modify_api_test_environment.sql | 4 + .../test/components/ApiEnvironmentConfig.vue | 31 +-- .../api/test/components/ApiHostTable.vue | 71 +++-- .../api/test/components/ApiScenarioConfig.vue | 2 + .../api/test/components/ApiScenarioForm.vue | 6 +- .../environment/EnvironmentCommonConfig.vue | 63 +++++ .../environment/EnvironmentEdit.vue | 118 +++----- .../environment/EnvironmentHttpConfig.vue | 85 ++++++ .../components/request/ApiSqlRequestForm.vue | 47 +++- .../request/database/DatabaseConfig.vue | 12 +- .../request/database/DatabaseConfigDialog.vue | 58 ---- .../request/database/DatabaseConfigList.vue | 78 +++--- .../request/database/DatabaseFrom.vue | 57 ++-- .../api/test/model/EnvironmentModel.js | 121 +++++++++ .../api/test/model/ScenarioModel.js | 77 ++++-- frontend/src/common/css/main.css | 7 + frontend/src/i18n/en-US.js | 15 + frontend/src/i18n/zh-CN.js | 18 ++ frontend/src/i18n/zh-TW.js | 256 ++++++++++-------- 21 files changed, 726 insertions(+), 445 deletions(-) create mode 100644 backend/src/main/resources/db/migration/V22__modify_api_test_environment.sql create mode 100644 frontend/src/business/components/api/test/components/environment/EnvironmentCommonConfig.vue create mode 100644 frontend/src/business/components/api/test/components/environment/EnvironmentHttpConfig.vue delete mode 100644 frontend/src/business/components/api/test/components/request/database/DatabaseConfigDialog.vue create mode 100644 frontend/src/business/components/api/test/model/EnvironmentModel.js diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiTestEnvironmentWithBLOBs.java b/backend/src/main/java/io/metersphere/base/domain/ApiTestEnvironmentWithBLOBs.java index 363762f824..d64fe59265 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiTestEnvironmentWithBLOBs.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiTestEnvironmentWithBLOBs.java @@ -1,11 +1,10 @@ package io.metersphere.base.domain; +import java.io.Serializable; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -import java.io.Serializable; - @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @@ -14,8 +13,9 @@ public class ApiTestEnvironmentWithBLOBs extends ApiTestEnvironment implements S private String headers; - private String customData; + private String config; private String hosts; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiTestEnvironmentMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ApiTestEnvironmentMapper.xml index 8e2e5ebe45..de93fbca18 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ApiTestEnvironmentMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ApiTestEnvironmentMapper.xml @@ -13,7 +13,7 @@ - + @@ -78,7 +78,7 @@ id, `name`, project_id, protocol, socket, `domain`, port - `variables`, headers, custom_data,hosts + `variables`, headers, config, `hosts`