From 1632b3fe13cbe242e114ba0b291e7a8dcdabb7a3 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 20 Oct 2020 18:44:05 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/report/components/ResponseText.vue | 8 ++-- .../api/test/components/jar/JarConfigList.vue | 40 +++++++------------ .../request/database/DatabaseFrom.vue | 2 +- frontend/src/business/components/xpack | 2 +- frontend/src/i18n/en-US.js | 2 + frontend/src/i18n/zh-CN.js | 2 + frontend/src/i18n/zh-TW.js | 2 + 7 files changed, 26 insertions(+), 32 deletions(-) diff --git a/frontend/src/business/components/api/report/components/ResponseText.vue b/frontend/src/business/components/api/report/components/ResponseText.vue index 94bd529215..8831dae6c9 100644 --- a/frontend/src/business/components/api/report/components/ResponseText.vue +++ b/frontend/src/business/components/api/report/components/ResponseText.vue @@ -16,16 +16,16 @@ + +
{{response.vars}}
+
+ - -
{{response.vars}}
-
- diff --git a/frontend/src/business/components/api/test/components/jar/JarConfigList.vue b/frontend/src/business/components/api/test/components/jar/JarConfigList.vue index 2632b7b29a..3f80527746 100644 --- a/frontend/src/business/components/api/test/components/jar/JarConfigList.vue +++ b/frontend/src/business/components/api/test/components/jar/JarConfigList.vue @@ -45,41 +45,29 @@ data() { return { result: {}, - // relevanceConfigSet: new Set() } }, - // created() { - // this.listRelevance(); - // }, methods: { handleView(row) { this.$emit('rowSelect', row); }, handleDelete(id) { - this.result = this.$get("/jar/delete/" + id, () => { - this.$success(this.$t('commons.delete_success')); - this.$emit('refresh'); + this.$confirm(this.$t('api_test.jar_config.delete_tip'), '', { + confirmButtonText: this.$t('commons.confirm'), + cancelButtonText: this.$t('commons.cancel'), + type: 'warning' + }).then(() => { + this.result = this.$get("/jar/delete/" + id, () => { + this.$success(this.$t('commons.delete_success')); + this.$emit('refresh'); + }); + }).catch(() => { + this.$message({ + type: 'info', + message: this.$t('commons.delete_cancelled') + }); }); }, - // handleRelevance(id, type) { - // let url = type === 'relevance' ? '/jar/relevance' : '/jar/unrelevance'; - // let param = { - // jarConfigId: id - // }; - // this.result = this.$post(url, param, () => { - // this.$success(this.$t('commons.save_success')); - // this.$emit('refresh'); - // this.listRelevance(); - // }); - // }, - // listRelevance() { - // if (this.testId) { - // this.result = this.$get("/jar/relevance/list/" + this.testId, (response) => { - // this.relevanceConfigSet = new Set(response.data); - // this.$emit('refresh'); - // }); - // } - // } } } diff --git a/frontend/src/business/components/api/test/components/request/database/DatabaseFrom.vue b/frontend/src/business/components/api/test/components/request/database/DatabaseFrom.vue index 93c14e1258..a6a179f034 100644 --- a/frontend/src/business/components/api/test/components/request/database/DatabaseFrom.vue +++ b/frontend/src/business/components/api/test/components/request/database/DatabaseFrom.vue @@ -39,7 +39,7 @@
- {{$t('校验')}} + {{$t('commons.validate')}} {{$t('commons.update')}} {{$t('commons.add')}}
diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index cc38137a69..06d935cd1d 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit cc38137a69a0f20fadece9c0f9f50a9468c4ace9 +Subproject commit 06d935cd1d22ab36f09763745c2aff8ad3fb08c1 diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index bd5080f504..5c09f28332 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -119,6 +119,7 @@ export default { reference_documentation: "Reference documentation", already_exists: 'The name already exists', modifier: 'Modifier', + validate: "Validate", date: { select_date: 'Select date', start_date: 'Start date', @@ -441,6 +442,7 @@ export default { jar_config: { title: "The Jar Package Management", jar_file: "Jar package", + delete_tip: "The deletion takes effect after the service is restarted", file_exist: "The name already exists in the project", upload_limit_size: "Upload file size cannot exceed 30MB!", }, diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index ecf0997d9d..46b1fa1029 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -119,6 +119,7 @@ export default { required: "{0}是必填的", already_exists: '名称不能重复', modifier: '修改人', + validate: "校验", date: { select_date: '选择日期', start_date: '开始日期', @@ -444,6 +445,7 @@ export default { jar_config: { title: "jar包管理", jar_file: "jar包", + delete_tip: "删除需重启服务后生效", file_exist: "该项目下已存在改jar包", upload_limit_size: "上传文件大小不能超过 30MB!", }, diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index 3a25b475ec..2d14abd279 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -119,6 +119,7 @@ export default { required: "{0}是必填的", already_exists: '名稱不能重復', modifier: '修改人', + validate: "校驗", date: { select_date: '選擇日期', start_date: '開始日期', @@ -444,6 +445,7 @@ export default { jar_config: { title: "jar包管理", jar_file: "jar包", + delete_tip: "刪除需重啟服務後生效", file_exist: "該項目下已存在改jar包", upload_limit_size: "上傳文件大小不能超過 30MB!", },