From 37da6206ea06f3cf894039033a073a7cda3b8968 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 7 Jan 2021 19:34:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20jsonpaht=E6=96=AD=E8=A8=80=E6=8E=A8?= =?UTF-8?q?=E8=8D=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package.json | 3 +- .../components/assertion/ApiAssertions.vue | 36 +++- .../assertion/ApiJsonPathSuggestButton.vue | 24 +++ .../assertion/ApiJsonpathSuggest.vue | 93 +++++++++ .../components/debug/DebugHttpPage.vue | 2 +- .../request/http/ApiHttpRequestForm.vue | 5 +- .../request/http/ApiRequestForm.vue | 3 +- .../api/test/components/ApiScenarioConfig.vue | 2 +- .../common/components/MsAsideContainer.vue | 2 +- .../common/components/MsDragMoveBar.vue | 90 --------- .../components/common/components/MsDrawer.vue | 92 ++++----- .../dragbar/MsBottom2TopDragBar.vue | 27 +++ .../MsLeft2RightDragBar.vue} | 4 +- .../dragbar/MsRight2LeftDragBar.vue | 28 +++ frontend/src/business/main.js | 10 +- frontend/src/common/js/directive.js | 46 ++++- frontend/src/i18n/en-US.js | 2 + frontend/src/i18n/zh-CN.js | 2 + frontend/src/i18n/zh-TW.js | 180 +++++++++--------- 19 files changed, 392 insertions(+), 259 deletions(-) create mode 100644 frontend/src/business/components/api/definition/components/assertion/ApiJsonPathSuggestButton.vue create mode 100644 frontend/src/business/components/api/definition/components/assertion/ApiJsonpathSuggest.vue delete mode 100644 frontend/src/business/components/common/components/MsDragMoveBar.vue create mode 100644 frontend/src/business/components/common/components/dragbar/MsBottom2TopDragBar.vue rename frontend/src/business/components/common/components/{MsHorizontalDragBar.vue => dragbar/MsLeft2RightDragBar.vue} (79%) create mode 100644 frontend/src/business/components/common/components/dragbar/MsRight2LeftDragBar.vue diff --git a/frontend/package.json b/frontend/package.json index 181b934e95..fc9ac7b6bd 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -44,7 +44,8 @@ "vuedraggable": "^2.23.2", "vuex": "^3.1.2", "xml-js": "^1.6.11", - "yan-progress": "^1.0.3" + "yan-progress": "^1.0.3", + "vue-jsonpath-picker": "^1.1.5" }, "devDependencies": { "@vue/cli-plugin-babel": "^4.1.0", diff --git a/frontend/src/business/components/api/definition/components/assertion/ApiAssertions.vue b/frontend/src/business/components/api/definition/components/assertion/ApiAssertions.vue index 322b2d647e..71d25e50d6 100644 --- a/frontend/src/business/components/api/definition/components/assertion/ApiAssertions.vue +++ b/frontend/src/business/components/api/definition/components/assertion/ApiAssertions.vue @@ -48,11 +48,15 @@ + + + + @@ -67,11 +71,15 @@ import MsApiJsonpathSuggestList from "./ApiJsonpathSuggestList"; import MsApiAssertionXPath2 from "./ApiAssertionXPath2"; import {getUUID} from "@/common/js/utils"; + import ApiJsonPathSuggestButton from "./ApiJsonPathSuggestButton"; + import MsApiJsonpathSuggest from "./ApiJsonpathSuggest"; export default { name: "MsApiAssertions", components: { + MsApiJsonpathSuggest, + ApiJsonPathSuggestButton, MsApiAssertionXPath2, MsApiAssertionJsr223, MsApiJsonpathSuggestList, @@ -83,6 +91,7 @@ assertions: {}, node: {}, request: {}, + response: {}, customizeStyle: { type: String, default: "margin-top: 10px" @@ -101,6 +110,7 @@ type: "", loading: false, reloadData: "", + suggestData: {} } }, @@ -114,11 +124,17 @@ this.$emit('copyRow', this.assertions, this.node); }, suggestJsonOpen() { - if (!this.request.debugRequestResult) { + if (!this.response || !this.response.responseResult || !this.response.responseResult.body) { this.$message(this.$t('api_test.request.assertions.debug_first')); return; } - this.$refs.jsonpathSuggestList.open(); + try { + this.suggestData = JSON.parse(this.response.responseResult.body); + } catch (e) { + this.$error(this.$t('api_test.request.assertions.json_path_err')); + return; + } + this.$refs.jsonpathSuggest.open(); }, reload() { this.loading = true @@ -133,14 +149,12 @@ remove() { this.$emit('remove', this.assertions, this.node); }, - addJsonpathSuggest(jsonPathList) { - jsonPathList.forEach(jsonPath => { - let jsonItem = new JSONPath(); - jsonItem.expression = jsonPath.json_path; - jsonItem.expect = jsonPath.json_value; - jsonItem.setJSONPathDescription(); - this.assertions.jsonPath.push(jsonItem); - }); + addJsonPathSuggest(data) { + let jsonItem = new JSONPath(); + jsonItem.expression = data.path; + jsonItem.expect = data.value; + jsonItem.setJSONPathDescription(); + this.assertions.jsonPath.push(jsonItem); }, clearJson() { this.assertions.jsonPath = []; @@ -159,6 +173,7 @@ padding: 10px; margin: 5px 0; border-radius: 5px; + border: #DCDFE6 solid 1px; } .icon.is-active { @@ -168,4 +183,5 @@ /deep/ .el-card__body { padding: 15px; } + diff --git a/frontend/src/business/components/api/definition/components/assertion/ApiJsonPathSuggestButton.vue b/frontend/src/business/components/api/definition/components/assertion/ApiJsonPathSuggestButton.vue new file mode 100644 index 0000000000..0936b3017c --- /dev/null +++ b/frontend/src/business/components/api/definition/components/assertion/ApiJsonPathSuggestButton.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/frontend/src/business/components/api/definition/components/assertion/ApiJsonpathSuggest.vue b/frontend/src/business/components/api/definition/components/assertion/ApiJsonpathSuggest.vue new file mode 100644 index 0000000000..1ca9c8f22a --- /dev/null +++ b/frontend/src/business/components/api/definition/components/assertion/ApiJsonpathSuggest.vue @@ -0,0 +1,93 @@ + + + + + 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 bcb2bbb98b..280bfe04cb 100644 --- a/frontend/src/business/components/api/definition/components/debug/DebugHttpPage.vue +++ b/frontend/src/business/components/api/definition/components/debug/DebugHttpPage.vue @@ -26,7 +26,7 @@

{{$t('api_test.definition.request.req_param')}}

- + diff --git a/frontend/src/business/components/api/definition/components/request/http/ApiHttpRequestForm.vue b/frontend/src/business/components/api/definition/components/request/http/ApiHttpRequestForm.vue index ef886a900d..cb8fac30b8 100644 --- a/frontend/src/business/components/api/definition/components/request/http/ApiHttpRequestForm.vue +++ b/frontend/src/business/components/api/definition/components/request/http/ApiHttpRequestForm.vue @@ -76,12 +76,10 @@ - + - - @@ -131,6 +129,7 @@ }, props: { request: {}, + response: {}, showScript: Boolean, headers: { type: Array, diff --git a/frontend/src/business/components/api/definition/components/request/http/ApiRequestForm.vue b/frontend/src/business/components/api/definition/components/request/http/ApiRequestForm.vue index 0f2274df8a..53613fb7b5 100644 --- a/frontend/src/business/components/api/definition/components/request/http/ApiRequestForm.vue +++ b/frontend/src/business/components/api/definition/components/request/http/ApiRequestForm.vue @@ -1,6 +1,6 @@ @@ -12,6 +12,7 @@ components: {MsApiHttpRequestForm}, props: { request: {}, + response: {}, headers: Array, isShowEnable: { type: Boolean, diff --git a/frontend/src/business/components/api/test/components/ApiScenarioConfig.vue b/frontend/src/business/components/api/test/components/ApiScenarioConfig.vue index f0f68b5f9b..bb98da5dd1 100644 --- a/frontend/src/business/components/api/test/components/ApiScenarioConfig.vue +++ b/frontend/src/business/components/api/test/components/ApiScenarioConfig.vue @@ -77,7 +77,7 @@ import {Request, Scenario} from "../model/ScenarioModel"; import draggable from 'vuedraggable'; import MsApiScenarioSelect from "@/business/components/api/test/components/ApiScenarioSelect"; import {parseEnvironment} from "../model/EnvironmentModel"; -import MsHorizontalDragBar from "../../../common/components/MsHorizontalDragBar"; +import MsHorizontalDragBar from "../../../common/components/dragbar/MsLeft2RightDragBar"; export default { name: "MsApiScenarioConfig", diff --git a/frontend/src/business/components/common/components/MsAsideContainer.vue b/frontend/src/business/components/common/components/MsAsideContainer.vue index 29b0b83f07..1a3a365511 100644 --- a/frontend/src/business/components/common/components/MsAsideContainer.vue +++ b/frontend/src/business/components/common/components/MsAsideContainer.vue @@ -11,7 +11,7 @@ - - diff --git a/frontend/src/business/components/common/components/MsDrawer.vue b/frontend/src/business/components/common/components/MsDrawer.vue index dd1ae608e3..1fc8251ce0 100644 --- a/frontend/src/business/components/common/components/MsDrawer.vue +++ b/frontend/src/business/components/common/components/MsDrawer.vue @@ -1,21 +1,29 @@ + + diff --git a/frontend/src/business/components/common/components/MsHorizontalDragBar.vue b/frontend/src/business/components/common/components/dragbar/MsLeft2RightDragBar.vue similarity index 79% rename from frontend/src/business/components/common/components/MsHorizontalDragBar.vue rename to frontend/src/business/components/common/components/dragbar/MsLeft2RightDragBar.vue index 9abe466d3a..63dd57a64f 100644 --- a/frontend/src/business/components/common/components/MsHorizontalDragBar.vue +++ b/frontend/src/business/components/common/components/dragbar/MsLeft2RightDragBar.vue @@ -1,10 +1,10 @@ diff --git a/frontend/src/business/components/common/components/dragbar/MsRight2LeftDragBar.vue b/frontend/src/business/components/common/components/dragbar/MsRight2LeftDragBar.vue new file mode 100644 index 0000000000..1fad325007 --- /dev/null +++ b/frontend/src/business/components/common/components/dragbar/MsRight2LeftDragBar.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/frontend/src/business/main.js b/frontend/src/business/main.js index e83037bab7..18a00ce479 100644 --- a/frontend/src/business/main.js +++ b/frontend/src/business/main.js @@ -18,10 +18,11 @@ import '../common/css/menu-header.css'; import '../common/css/main.css'; import CKEditor from '@ckeditor/ckeditor5-vue'; import VueFab from 'vue-float-action-button' -import {horizontalDrag} from "../common/js/directive"; +import {left2RightDrag, bottom2TopDrag, right2LeftDrag} from "../common/js/directive"; import JsonSchemaEditor from './components/common/json-schema/schema/index'; -Vue.use(JsonSchemaEditor); +import JSONPathPicker from 'vue-jsonpath-picker'; +Vue.use(JsonSchemaEditor); Vue.config.productionTip = false; Vue.use(icon); Vue.use(ElementUI, { @@ -35,6 +36,7 @@ Vue.use(message); Vue.use(CKEditor); Vue.use(YanProgress); Vue.use(VueFab); +Vue.use(JSONPathPicker); // v-permission Vue.directive('permission', permission); @@ -47,7 +49,9 @@ Vue.directive('xpack', xpack); Vue.directive('tester', tester); //支持左右拖拽 -Vue.directive('horizontal-drag', horizontalDrag); +Vue.directive('left-to-right-drag', left2RightDrag); +Vue.directive('right-to-left-drag', right2LeftDrag); +Vue.directive('bottom-to-top-drag', bottom2TopDrag); new Vue({ el: '#app', diff --git a/frontend/src/common/js/directive.js b/frontend/src/common/js/directive.js index b7d78b4d0a..60854f51d4 100644 --- a/frontend/src/common/js/directive.js +++ b/frontend/src/common/js/directive.js @@ -1,4 +1,4 @@ -export const horizontalDrag = { +export const left2RightDrag = { inserted(el, binding) { el.onmousedown = function (e) { const init = e.clientX; @@ -7,7 +7,49 @@ export const horizontalDrag = { document.onmousemove = function (e) { const end = e.clientX; const newWidth = end - init + initWidth; - parent.style.width = newWidth + "px"; + if (newWidth < document.body.clientWidth - 10 && newWidth > 10) { + parent.style.width = newWidth + "px"; + } + }; + document.onmouseup = function () { + document.onmousemove = document.onmouseup = null; + }; + }; + } +}; + +export const right2LeftDrag = { + inserted(el, binding) { + el.onmousedown = function (e) { + const init = e.clientX; + const parent = el.parentNode; + const initWidth = parent.offsetWidth; + document.onmousemove = function (e) { + const end = e.clientX; + const newWidth = initWidth - (end - init); + if (newWidth < document.body.clientWidth - 10 && newWidth > 10) { + parent.style.width = newWidth + "px"; + } + }; + document.onmouseup = function () { + document.onmousemove = document.onmouseup = null; + }; + }; + } +}; + +export const bottom2TopDrag = { + inserted(el, binding) { + el.onmousedown = function (e) { + const init = e.clientY; + const parent = el.parentNode; + const initHeight = parent.offsetHeight; + document.onmousemove = function (e) { + const end = e.clientY; + const newHeight = initHeight - (end - init); + if (newHeight < document.body.clientHeight - 10 && newHeight > 10) { + parent.style.height = newHeight + "px"; + } }; document.onmouseup = function () { document.onmousemove = document.onmouseup = null; diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 4629e2c072..c6024d269c 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -731,6 +731,7 @@ export default { json_path_suggest: "JSONPath Assertion Suggest", json_path_clear: "Clear JSONPath Assertion", debug_first: "First, debug to get the response", + suggest_tip: "Click the note to add the JSONPath assertion", }, extract: { label: "Extract from response", @@ -741,6 +742,7 @@ export default { regex_expression: "Regular expression", json_path_expression: "JSONPath expression", xpath_expression: "XPath expression", + suggest_tip: "Click the note to add the JSONPath extraction", }, processor: { pre_exec_script: "PreProcessor", diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index b91cd2e0c4..715ac84efc 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -731,6 +731,7 @@ export default { variable_name: "变量名称", set_failure_status: "设置失败状态", set_failure_msg: "设置失败消息", + suggest_tip: "点击便签添加JSONPath断言", }, extract: { label: "提取", @@ -741,6 +742,7 @@ export default { regex_expression: "Perl型正则表达式", json_path_expression: "JSONPath表达式", xpath_expression: "XPath表达式", + suggest_tip: "点击便签添加JSONPath提取", }, processor: { pre_exec_script: "预执行脚本", diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index 3007e1de51..9a313d2866 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -65,7 +65,7 @@ export default { refresh: '刷新', remark: '備註', delete: '刪除', - reduction: '恢复', + reduction: '恢復', not_filled: '未填寫', please_select: '請選擇', search_by_name: '根據名稱搜索', @@ -249,9 +249,9 @@ export default { mail: '郵件', nail_robot: '釘釘機器人', enterprise_wechat_robot: '企業微信機器人', - notes: '1.事件,接收方式,接收人為必填項;\n' + - ' 2.接收方式除郵件外webhook為必填;\n' + - ' 3.機器人選擇為群機器人,安全驗證選擇“自定義關鍵詞” :"任務通知"', + notes: '1.釘釘和企業群裏新建壹個自定義機器人,然後復制 webhook 地址在我們平臺上;\n' + + ' 2.機器人選擇為群機器人,安全驗證選擇“自定義關鍵詞” :"任務通知";\n' + + ' 3.選擇接收人時必須是妳所建的群裏包含的人,接收人手機號為必填項且為釘釘企業所使用的手機號,', message: '事件,接收人,接收方式為必填項', message_webhook: '接收方式為釘釘和企業機器人時,webhook為必填項', template: "模版" @@ -306,7 +306,7 @@ export default { manager: '項目管理', no_data: '無數據', select: '選擇項目', - repeatable: '接口定义URL可重复' + repeatable: '接口定義URL可重復' }, member: { create: '添加成員', @@ -376,9 +376,9 @@ export default { test_stop_now: '立即停止', test_stop_now_confirm: '確定要立即停止當前測試嗎?', test_rerun_confirm: '確定要再次執行當前測試嗎?', - downloadJtl: '下載JTL', test_stop_success: '停止成功', test_execute_again: '再次執行', + downloadJtl: '下載JTL', export: '導出', compare: '比較', generation_error: '報告生成錯誤, 無法查看, 請檢查日誌詳情!', @@ -435,9 +435,9 @@ export default { ramp_up_time_within: '在', ramp_up_time_minutes: '秒內,分', ramp_up_time_seconds: '秒內增加並發用戶', - iterate_num: '迭代次數 (次): ', - by_iteration: '按迭代次數', - by_duration: '按壓測時長', + iterate_num: '叠代次數 (次): ', + by_iteration: '按叠代次數', + by_duration: '按持續時間', ramp_up_time_times: '次增加並發用戶', advanced_config_error: '高級配置校驗失敗', domain_bind: '域名綁定', @@ -513,18 +513,18 @@ export default { add_data: "去添加" }, request: { - grade_info: "按等級筛选", + grade_info: "按等級篩選", run_env: "運行環境", select_case: "搜索用例", case: "用例", - responsible: "责任人", - title: "创建接口", + responsible: "責任人", + title: "創建接口", path_info: "請輸入接口的URL,如/api/demo/#{id},其中id為路徑參數", path_all_info: "請輸入完整測試地址", fast_debug: "快捷調試", close_all_label: "關閉所有標簽", save_as: "另存為新接口", - load_case: "加载用例", + load_case: "加載用例", save_as_case: "另存為新用例", update_api: "更新接口", body_form_data: "form-data", @@ -540,10 +540,10 @@ export default { verified: "認證", encryption: "加密", req_param: "請求參數", - res_param: "響應内容", - batch_delete: "批量删除", + res_param: "響應內容", + batch_delete: "批量刪除", delete_confirm: "確認刪除接口", - delete_confirm_step: "確認刪除步骤", + delete_confirm_step: "確認刪除步驟", assertions_rule: "斷言規則", response_header: "響應頭", response_body: "響應體", @@ -556,12 +556,12 @@ export default { post_script: "後置腳本", extract_param: "提取參數", add_module: "創建模塊", - edit_api: "编辑接口", + edit_api: "編輯接口", test_plan_select: "請選擇測試計劃", create_info: '創建', update_info: '更新', batch_edit: "批量編輯", - path_valid_info: "請求路径无效", + path_valid_info: "請求路徑無效", } }, automation: { @@ -574,15 +574,15 @@ export default { external_import: "外部導入", wait_controller: "等待控制器", if_controller: "條件控制器", - loop_controller: "循环控制器", + loop_controller: "循環控制器", scenario_import: "場景導入", - customize_script: "自定義脚本", + customize_script: "自定義腳本", customize_req: "自定義請求", reference_info: "請選擇接口或用例", scenario_test: "場景", - add_scenario: "创建場景", - scenario_name: "場景名称", - case_level: "用例等级", + add_scenario: "創建場景", + scenario_name: "場景名稱", + case_level: "用例等級", tag: "標簽", creator: "創建人", update_time: "最後更新時間", @@ -596,14 +596,14 @@ export default { edit: "編輯", execute: "執行", copy: "復制", - remove: "删除", + remove: "刪除", view_ref: "查看引用", case_ref: "用例引用", schedule: "定時任務", - scenario_ref: "场景引用", - plan_ref: "测试计划引用", - batch_add_plan: "添加到测试计划", - batch_execute: "批量执行", + scenario_ref: "場景引用", + plan_ref: "測試計劃引用", + batch_add_plan: "添加到測試計劃", + batch_execute: "批量執行", scenario: { principal: "責任人", select_principal: "請選擇責任人", @@ -613,7 +613,7 @@ export default { }, report_name_info: '請輸入報告名稱', save_case_info: '請先保存用例', - reference_deleted: '引用已删除', + reference_deleted: '引用已刪除', }, environment: { name: "環境名稱", @@ -706,6 +706,7 @@ export default { text: "文本", regex: "正則", response_time: "響應時間", + jsr223: "腳本", select_type: "請選擇類型", select_subject: "請選擇對象", select_condition: "請選擇條件", @@ -730,6 +731,7 @@ export default { variable_name: "變量名稱", set_failure_status: "設置失敗狀態", set_failure_msg: "設置失敗消息", + suggest_tip: "點擊便簽添加JSONPath斷言", }, extract: { label: "提取", @@ -740,6 +742,7 @@ export default { regex_expression: "Perl型正則表達式", json_path_expression: "JSONPath表達式", xpath_expression: "XPath表達式", + suggest_tip: "點擊便簽添加JSONPath提取", }, processor: { pre_exec_script: "預執行腳本", @@ -790,7 +793,7 @@ export default { close_connection: "關閉連接", so_linger: "SO LINGER", eol_byte: "行尾(EOL)字節值", - request: "要發送的文本", + request: "發送文本", username: "用戶名", password: "密碼", login: "登錄設置", @@ -807,7 +810,7 @@ export default { ms_tip: "支持 Metersphere json 格式", ms_export_tip: "通過 Metersphere 接口測試頁面或者瀏覽器插件導出 json 格式文件", postman_tip: "只支持 Postman Collection v2.1 格式的 json 文件", - swagger_tip: "支持 Swagger 2.0 與 3.0版本的 json 文件", + swagger_tip: "支持 Swagger 2.0 與 3.0 版本的 json 文件", post_export_tip: "通過 Postman 導出測試集合", swagger_export_tip: "通過 Swagger 頁面導出", suffixFormatErr: "文件格式不符合要求", @@ -849,42 +852,42 @@ export default { }, api_details_card: { title: "接口", - this_week_add: "本週新增:", + this_week_add: "本周新增:", }, test_case_details_card: { title: "用例", - this_week_add: "本週新增:", - this_week_execute: "本週執行: {0}次", + this_week_add: "本周新增:", + this_week_execute: "本周執行: {0}次", executed: "歷史總執行: {0}次", - this_week_add_sm: "本週新增:", - this_week_execute_sm: "本週執行:
{0}次", + this_week_add_sm: "本周新增:", + this_week_execute_sm: "本周執行:
{0}次", executed_sm: "歷史總執行:
{0}次", }, test_scene_details_card: { title: "場景", - this_week_add: "本週新增:", - this_week_execute: "本週執行: {0}次", + this_week_add: "本周新增:", + this_week_execute: "本周執行: {0}次", executed: "歷史總執行: {0}次", - this_week_add_sm: "本週新增:", - this_week_execute_sm: "本週執行:
{0}次", + this_week_add_sm: "本周新增:", + this_week_execute_sm: "本周執行:
{0}次", executed_sm: "歷史總執行:
{0}次", }, schedule_task_details_card: { title: "定時任務", - this_week_add: "本週新增: {0}个", - this_week_execute: "本週執行: {0}次", + this_week_add: "本周新增: {0}個", + this_week_execute: "本周執行: {0}次", executed: "歷史總執行: {0}次", - this_week_add_sm: "本週新增:
{0}个", - this_week_execute_sm: "本週執行:
{0}次", + this_week_add_sm: "本周新增:
{0}個", + this_week_execute_sm: "本周執行:
{0}次", executed_sm: "歷史總執行:
{0}次", }, failed_case_list: { - title: "過去7天測試計畫失敗用例TOP 10", + title: "過去7天測試計劃失敗用例TOP 10", table_coloum: { index: "排名", case_name: "用例名稱", case_type: "用例類型", - test_plan: "所屬測試計畫", + test_plan: "所屬測試計劃", failure_times: "失敗次數", }, table_value: { @@ -948,11 +951,11 @@ export default { not_exist: "測試報告不存在", }, api_monitor: { - to: "到", - start_time: "開始時間", - end_time: "結束時間", - today: "今天", - this_week: "本週", + to: "至", + start_time: "開始日期", + end_time: "結束日期", + today: "今日", + this_week: "本周", this_mouth: "本月", please_search: "請搜索", date: "日期" @@ -1123,8 +1126,8 @@ export default { send: "發送", description_is_null: "評論內容不能為空!", send_success: "評論成功!", - cannot_edit: "無法編輯此評論!", - cannot_delete: "無法刪除此評論!", + cannot_edit: "無法編輯此評論!", + cannot_delete: "無法刪除此評論!", }, review_view: { review: "評審", @@ -1362,7 +1365,7 @@ export default { performance: "性能測試數量", resource_pool: "可用測試資源池", max_threads: "最大並發數", - duration: "壓測時長(分鐘)", + duration: "壓測時長(秒)", use_default: "使用默認配額", yes: "是", no: "否", @@ -1375,55 +1378,54 @@ export default { clean: "清空" }, schema: { - title: "标题", - import_json: "导入 json", - base_setting: "基础设置", - all_setting: "编辑源码", - default: "默认值", + title: "標題", + import_json: "導入 json", + base_setting: "基礎設置", + all_setting: "編輯源碼", + default: "默認值", description: "描述", - adv_setting: "高级设置", - add_child_node: "添加子节点", - add_sibling_node: "添加兄弟节点", - add_node: "添加兄弟/子节点", - remove_node: "删除节点", - child_node: "子节点", - sibling_node: "兄弟节点", - ok: "确定", + adv_setting: "高級設置", + add_child_node: "添加子節點", + add_sibling_node: "添加兄弟節點", + add_node: "添加兄弟/子節點", + remove_node: "刪除節點", + child_node: "子節點", + sibling_node: "兄弟節點", + ok: "確定", cancel: "取消", - minLength: "最小长度", - maxLength: "最大长度", - pattern: "用正则表达式约束字符串", - exclusiveMinimum: "开启后,数据必须大于最小值", - exclusiveMaximum: "开启后,数据必须小于最大值", + minLength: "最小長度", + maxLength: "最大長度", + pattern: "用正則表達式約束字符串", + exclusiveMinimum: "開啟後,數據必須大於最小值", + exclusiveMaximum: "開啟後,數據必須小於最大值", minimum: "最小值", maximum: "最大值", - uniqueItems: "开启后,每个元素都不相同", - minItems: "最小元素个数", - maxItems: "最大元素个数", - minProperties: "最小元素个数", - maxProperties: "最大元素个数", - checked_all: "全选", + uniqueItems: "開啟後,每個元素都不相同", + minItems: "最小元素個數", + maxItems: "最大元素個數", + minProperties: "最小元素個數", + maxProperties: "最大元素個數", + checked_all: "全選", valid_json: "不是合法的json字符串", - enum: "枚举", - enum_msg: "每行只能写一个值", - enum_desc: "备注", - enum_desc_msg: "备注描述信息", - required: "是否必须", + enum: "枚舉", + enum_msg: "每行只能寫壹個值", + enum_desc: "備註", + enum_desc_msg: "備註描述信息", + required: "是否必須", mock: "mock", - mockLink: "查看文档", + mockLink: "查看文檔", format: "格式化", - nothing: "无", - preview: "预览", - add_custom: "添加自定义属性" + nothing: "無", + preview: "預覽", + add_custom: "添加自定義屬性" }, loop: { loops_title: "次數循環", foreach: "ForEach 循環", while: "While 循環", - loops: "循環次数", + loops: "循環次數", interval: "循環間隔", proceed: "成功後繼續循環", timeout: "循環超時時間", } - };