diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index 7e32340f93..61397c1672 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit 7e32340f93c59e1b26332632ebae2eb83fbb6059 +Subproject commit 61397c16728a63493507679f7e0940d9099f337f diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index d9cda8fca5..e001682af9 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -197,37 +197,37 @@ {{$t('commons.show_all')}}
-
+
+{{$t('api_test.automation.api_list_import')}}
-
+
+{{$t('api_test.automation.external_import')}}
-
+
+{{$t('api_test.automation.wait_controller')}}
-
+
+{{$t('api_test.automation.if_controller')}}
+{{$t('api_test.automation.scenario_import')}}
-
+
+{{$t('api_test.automation.customize_script')}}
-
+
+{{$t('api_test.automation.customize_req')}}
-
+
+{{$t('api_test.definition.request.pre_script')}}
-
+
+{{$t('api_test.definition.request.post_script')}}
-
+
+{{$t('api_test.definition.request.assertions_rule')}}
-
+
+{{$t('api_test.definition.request.extract_param')}}
@@ -245,7 +245,6 @@ - {{$t('commons.save')}} @@ -373,7 +372,13 @@ this.getApiScenario(); this.getEnvironments(); }, - watch: {}, + mounted() { + document.addEventListener('click', e => { + if (!this.$el.contains(e.target)) { + } + }) + }, + watch: {}, methods: { addComponent(type) { switch (type) { @@ -609,16 +614,16 @@ environmentConfigClose() { this.getEnvironments(); }, - allowDrop(draggingNode, dropNode, type) { - // if (draggingNode.level == dropNode.level) { - // return true; - // } - // else if (ELEMENTS.get(dropNode.data.type).indexOf(draggingNode.data.type) != -1) { - // return true; - // } - return true; + allowDrop(draggingNode, dropNode, dropType) { + if (dropType != "inner") { + return true; + } + else if (dropType === "inner" && ELEMENTS.get(dropNode.data.type).indexOf(draggingNode.data.type) != -1) { + return true; + } + return false; }, - allowDrag() { + allowDrag(draggingNode, dropNode, dropType) { this.sort(); this.reload(); }, diff --git a/frontend/src/business/components/api/automation/scenario/Setting.js b/frontend/src/business/components/api/automation/scenario/Setting.js index 3a58ce6c95..46fbef2fb8 100644 --- a/frontend/src/business/components/api/automation/scenario/Setting.js +++ b/frontend/src/business/components/api/automation/scenario/Setting.js @@ -1,19 +1,19 @@ export const ELEMENTS = new Map([ - ['ALL', ["scenario", "HTTPSamplerProxy", "DubboSampler", "JDBCSampler", "TCPSampler", "OT_IMPORT", "IfController", "ConstantTimer", "JSR223Processor", "JSR223PreProcessor", "JSR223PostProcessor", "Assertions", "Extract", "CustomizeReq"]], - ['scenario', ["API", "CASE", "OT_IMPORT", "IfController", "ConstantTimer", "JSR223Processor", "JSR223PreProcessor", "JSR223PostProcessor", "Assertions", "Extract", "CustomizeReq"]], - ['HTTPSamplerProxy', ["IfController", "ConstantTimer", "JSR223Processor", "JSR223PreProcessor", "JSR223PostProcessor", "Assertions", "Extract"]], - ['DubboSampler', ["IfController", "ConstantTimer", "JSR223Processor", "JSR223PreProcessor", "JSR223PostProcessor", "Assertions", "Extract"]], - ['JDBCSampler', ["IfController", "ConstantTimer", "JSR223Processor", "JSR223PreProcessor", "JSR223PostProcessor", "Assertions", "Extract"]], - ['TCPSampler', ["IfController", "ConstantTimer", "JSR223Processor", "JSR223PreProcessor", "JSR223PostProcessor", "Assertions", "Extract"]], - ['OT_IMPORT', []], - ['IfController', ["HTTPSamplerProxy", "DubboSampler", "JDBCSampler", "TCPSampler", "OT_IMPORT", "ConstantTimer", "JSR223Processor", "JSR223PreProcessor", "JSR223PostProcessor", "Assertions", "Extract", "CustomizeReq"]], - ['ConstantTimer', ["HTTPSamplerProxy", "DubboSampler", "JDBCSampler", "TCPSampler", "OT_IMPORT", "IfController", "JSR223Processor", "JSR223PreProcessor", "JSR223PostProcessor", "Assertions", "Extract", "CustomizeReq"]], - ['JSR223Processor', []], + ['ALL', ["scenario", "HTTPSamplerProxy", "DubboSampler", "JDBCSampler", "TCPSampler", "OT_IMPORT", "IfController", "ConstantTimer", "JSR223Processor", "CustomizeReq"]], + ['scenario', ["HTTPSamplerProxy", "DubboSampler", "JDBCSampler", "TCPSampler", "CASE", "OT_IMPORT", "IfController", "ConstantTimer", "JSR223Processor", "CustomizeReq"]], + ['HTTPSamplerProxy', ["ConstantTimer", "JSR223PreProcessor", "JSR223PostProcessor", "Assertions", "Extract"]], + ['DubboSampler', ["ConstantTimer", "JSR223PreProcessor", "JSR223PostProcessor", "Assertions", "Extract"]], + ['JDBCSampler', ["ConstantTimer", "JSR223PreProcessor", "JSR223PostProcessor", "Assertions", "Extract"]], + ['TCPSampler', ["ConstantTimer", "JSR223PreProcessor", "JSR223PostProcessor", "Assertions", "Extract"]], + ['OT_IMPORT', ["ConstantTimer", "JSR223PreProcessor", "JSR223PostProcessor", "Assertions", "Extract"]], + ['IfController', ["IfController", "HTTPSamplerProxy", "DubboSampler", "JDBCSampler", "TCPSampler", "OT_IMPORT", "ConstantTimer", "JSR223Processor", "JSR223PreProcessor", "JSR223PostProcessor", "Assertions", "Extract", "CustomizeReq"]], + ['ConstantTimer', []], + ['JSR223Processor', ["ConstantTimer", "JSR223PreProcessor", "JSR223PostProcessor", "Assertions", "Extract"]], ['JSR223PreProcessor', []], ['JSR223PostProcessor', []], ['Assertions', []], ['Extract', []], - ['CustomizeReq', ["HTTPSamplerProxy", "DubboSampler", "JDBCSampler", "TCPSampler", "OT_IMPORT", "IfController", "ConstantTimer", "JSR223Processor", "JSR223PreProcessor", "JSR223PostProcessor", "Assertions", "Extract"]], + ['CustomizeReq', ["ConstantTimer", "JSR223PreProcessor", "JSR223PostProcessor", "Assertions", "Extract"]], ]) export const ELEMENT_TYPE = { diff --git a/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue b/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue index a5a4fb7b07..043e7788eb 100644 --- a/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue +++ b/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue @@ -173,7 +173,7 @@ created() { this.getMaintainerOptions(); - this.httpForm = this.basisData; + this.httpForm = JSON.parse(JSON.stringify(this.basisData)); } } diff --git a/frontend/src/business/components/api/definition/components/debug/DebugHttpPage.vue b/frontend/src/business/components/api/definition/components/debug/DebugHttpPage.vue index e1692d8b37..5bb7137a67 100644 --- a/frontend/src/business/components/api/definition/components/debug/DebugHttpPage.vue +++ b/frontend/src/business/components/api/definition/components/debug/DebugHttpPage.vue @@ -66,6 +66,7 @@ let validateURL = (rule, value, callback) => { try { new URL(this.debugForm.url); + callback(); } catch (e) { callback(this.$t('api_test.request.url_invalid')); } diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index 010ad7a5f0..d39dafaf84 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit 010ad7a5f072a5e9d368c756a2473bbd20781433 +Subproject commit d39dafaf84b9c7a56cb51f2caf67dd7dfde5938c