diff --git a/backend/src/main/resources/db/migration/V69__swagger_url_project.sql b/backend/src/main/resources/db/migration/V69__swagger_url_project.sql index db6cb0d5c4..1967c41cbb 100644 --- a/backend/src/main/resources/db/migration/V69__swagger_url_project.sql +++ b/backend/src/main/resources/db/migration/V69__swagger_url_project.sql @@ -1,11 +1,11 @@ create table swagger_url_project ( - id varchar(255) not null, - project_id varchar(255) null, + id varchar(30) not null, + project_id varchar(30) null, swagger_url varchar(255) null, - module_id varchar(255) null, + module_id varchar(30) null, module_path varchar(255) null, - mode_id varchar(255) null, + mode_id varchar(30) null, primary key (id) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; diff --git a/frontend/src/business/components/api/automation/schedule/ScheduleMaintain.vue b/frontend/src/business/components/api/automation/schedule/ScheduleMaintain.vue index b0ff4810af..9e151962c5 100644 --- a/frontend/src/business/components/api/automation/schedule/ScheduleMaintain.vue +++ b/frontend/src/business/components/api/automation/schedule/ScheduleMaintain.vue @@ -8,12 +8,22 @@ - - {{ - $t('commons.save') - }} - + + + + {{ + $t('commons.save') + }} + + + + + + + + + @@ -44,6 +54,7 @@ import Crontab from "@/business/components/common/cron/Crontab"; import CrontabResult from "@/business/components/common/cron/CrontabResult"; import {cronValidate} from "@/common/js/cron"; import MsScheduleNotification from "./ScheduleNotification"; +import ScheduleSwitch from "@/business/components/api/automation/schedule/ScheduleSwitch"; function defaultCustomValidate() { return {pass: true}; @@ -55,7 +66,7 @@ const noticeTemplate = requireComponent.keys().length > 0 ? requireComponent("./ export default { name: "MsScheduleMaintain", - components: {CrontabResult, Crontab, MsScheduleNotification, "NoticeTemplate": noticeTemplate.default}, + components: {CrontabResult, ScheduleSwitch,Crontab, MsScheduleNotification, "NoticeTemplate": noticeTemplate.default}, props: { customValidate: { @@ -100,6 +111,7 @@ export default { form: { cronValue: "" }, + paramRow:{}, activeName: 'first', rules: { cronValue: [{required: true, validator: validateCron, trigger: 'blur'}], @@ -110,6 +122,35 @@ export default { currentUser: () => { return getCurrentUser(); }, + scheduleChange(){ + let flag = this.schedule.enable; + this.$confirm(this.$t('api_test.home_page.running_task_list.confirm.close_title'), this.$t('commons.prompt'), { + confirmButtonText: this.$t('commons.confirm'), + cancelButtonText: this.$t('commons.cancel'), + type: 'warning' + }).then(() => { + let param = {}; + param.taskID = this.schedule.id; + param.enable = flag; + this.updateTask(param); + }).catch(() => { + }); + + }, + updateTask(param){ + this.result = this.$post('/api/schedule/updateEnableByPrimyKey', param, response => { + let paramTestId = ""; + if (this.paramRow.redirectFrom == 'testPlan') { + paramTestId = this.paramRow.id; + this.scheduleTaskType = "TEST_PLAN_TEST"; + } else { + paramTestId = this.paramRow.id; + this.scheduleTaskType = "API_SCENARIO_TEST"; + } + this.taskID = paramTestId; + this.findSchedule(paramTestId); + }); + }, initUserList() { let param = { name: '', @@ -132,6 +173,7 @@ export default { open(row) { //测试计划页面跳转来的 let paramTestId = ""; + this.paramRow = row; if (row.redirectFrom == 'testPlan') { paramTestId = row.id; this.scheduleTaskType = "TEST_PLAN_TEST"; diff --git a/frontend/src/business/components/api/automation/schedule/ScheduleSwitch.vue b/frontend/src/business/components/api/automation/schedule/ScheduleSwitch.vue new file mode 100644 index 0000000000..9f2f140d5b --- /dev/null +++ b/frontend/src/business/components/api/automation/schedule/ScheduleSwitch.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/frontend/src/business/components/api/definition/components/basis/SetEnvironment.vue b/frontend/src/business/components/api/definition/components/basis/SetEnvironment.vue index 7d178b58f7..2abc7a3191 100644 --- a/frontend/src/business/components/api/definition/components/basis/SetEnvironment.vue +++ b/frontend/src/business/components/api/definition/components/basis/SetEnvironment.vue @@ -3,7 +3,7 @@ diff --git a/frontend/src/business/components/api/definition/components/list/ApiList.vue b/frontend/src/business/components/api/definition/components/list/ApiList.vue index 837f51cffd..e7abd10448 100644 --- a/frontend/src/business/components/api/definition/components/list/ApiList.vue +++ b/frontend/src/business/components/api/definition/components/list/ApiList.vue @@ -274,7 +274,12 @@ }, }, created: function () { - this.condition.filters = {status: ["Prepare", "Underway", "Completed"]}; + if (this.trashEnable) { + this.condition.filters = {status: ["Trash"]}; + } + else { + this.condition.filters = {status: ["Prepare", "Underway", "Completed"]}; + } this.initTable(); this.getMaintainerOptions(); }, diff --git a/frontend/src/business/components/settings/system/SystemParameterSetting.vue b/frontend/src/business/components/settings/system/SystemParameterSetting.vue index 904593e411..40decd2c3a 100644 --- a/frontend/src/business/components/settings/system/SystemParameterSetting.vue +++ b/frontend/src/business/components/settings/system/SystemParameterSetting.vue @@ -14,7 +14,7 @@ - + diff --git a/frontend/src/business/components/track/plan/view/comonents/api/RelevanceScenarioList.vue b/frontend/src/business/components/track/plan/view/comonents/api/RelevanceScenarioList.vue index b50dbfa2b3..d142385aaf 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/RelevanceScenarioList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/RelevanceScenarioList.vue @@ -19,8 +19,8 @@ @@ -101,6 +101,15 @@ }, }, methods: { + getTagString(tagsString) { + // if(tagsString.length == 2) { + if(tagsString.length >= 2 && tagsString[0] == '[' && tagsString[1] == ']') { + return null; + } + tagsString = tagsString.substring(1, tagsString.length - 1); + let tagList = tagsString.split(','); + return tagList; + }, search() { this.selectRows = new Set(); this.loading = true; diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 69fd212621..f748dc4f1e 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -1501,6 +1501,7 @@ export default { format: "Output format", }, auth_source: { - delete_prompt: 'This operation will delete the authentication source, do you want to continue? ' + delete_prompt: 'This operation will delete the authentication source, do you want to continue? ', + title: 'Auth Source' } }; diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 1b3830c336..5d2cb4c6fa 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -1504,6 +1504,7 @@ export default { format: "输出格式", }, auth_source: { - delete_prompt: '此操作会删除认证源,是否继续?' + delete_prompt: '此操作会删除认证源,是否继续?', + title: '认证设置' } }; diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index fd694cfe3a..a9db8d01a5 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -1502,6 +1502,7 @@ export default { format: "輸出格式", }, auth_source: { - delete_prompt: '此操作會刪除認證源,是否繼續? ' + delete_prompt: '此操作會刪除認證源,是否繼續? ', + title: '認證設置' } };