diff --git a/backend/src/main/java/io/metersphere/config/KafkaConfig.java b/backend/src/main/java/io/metersphere/config/KafkaConfig.java index 61e8f7e699..c424fef520 100644 --- a/backend/src/main/java/io/metersphere/config/KafkaConfig.java +++ b/backend/src/main/java/io/metersphere/config/KafkaConfig.java @@ -7,9 +7,9 @@ import org.springframework.kafka.config.TopicBuilder; @Configuration public class KafkaConfig { // 执行内容监听 - public final static String EXEC_TOPIC = "ms-automation-exec-topic"; + public final static String EXEC_TOPIC = "ms-automation-exec-topic123"; //执行结果回传 - public static final String TOPICS = "ms-api-exec-topic"; + public static final String TOPICS = "ms-api-exec-topic123"; @Bean public NewTopic apiExecTopic() { diff --git a/frontend/src/business/components/api/automation/scenario/variable/CsvFileUpload.vue b/frontend/src/business/components/api/automation/scenario/variable/CsvFileUpload.vue index 69cb63c0b2..8c0c50e238 100644 --- a/frontend/src/business/components/api/automation/scenario/variable/CsvFileUpload.vue +++ b/frontend/src/business/components/api/automation/scenario/variable/CsvFileUpload.vue @@ -1,125 +1,152 @@ diff --git a/frontend/src/business/components/api/automation/scenario/variable/VariableList.vue b/frontend/src/business/components/api/automation/scenario/variable/VariableList.vue index d1ab9a5265..b762bded21 100644 --- a/frontend/src/business/components/api/automation/scenario/variable/VariableList.vue +++ b/frontend/src/business/components/api/automation/scenario/variable/VariableList.vue @@ -200,7 +200,7 @@ export default { if (data) { let keyValues = this._handleBatchVars(data); keyValues.forEach(item => { - this.format(this.headers,item); + this.format(this.headers, item); }); } }, @@ -229,7 +229,7 @@ export default { } }, handleClick(command) { - this.editData = {delimiter: ",",quotedData: 'false'}; + this.editData = {delimiter: ",", quotedData: 'false'}; this.editData.type = command; this.addParameters(this.editData); }, @@ -298,10 +298,32 @@ export default { this.$warning("请选择一条数据删除"); return; } + let message = ""; ids.forEach(row => { - const index = this.variables.findIndex(d => d.id === row); - this.variables.splice(index, 1); + const v = this.variables.find(d => d.id === row); + if (v && v.type === 'CSV' && v.name) { + message += v.name + ";"; + } }); + if (message !== "") { + message = message.substr(0, message.length - 1); + this.$alert('是否确认删除CSV:【 ' + message + " 】?", '', { + confirmButtonText: this.$t('commons.confirm'), + callback: (action) => { + if (action === 'confirm') { + ids.forEach(row => { + const index = this.variables.findIndex(d => d.id === row); + this.variables.splice(index, 1); + }); + } + } + }); + } else { + ids.forEach(row => { + const index = this.variables.findIndex(d => d.id === row); + this.variables.splice(index, 1); + }); + } this.selection = []; this.editData = {type: "CONSTANT"}; },