diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml
index d35d0b66a4..5cf9e0957d 100644
--- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml
+++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml
@@ -324,8 +324,7 @@
- and test_case.status is null or test_case.status != 'Trash'
-
+ and (test_case.status is null or test_case.status != 'Trash')
diff --git a/frontend/src/business/components/api/definition/components/complete/ApiOtherInfo.vue b/frontend/src/business/components/api/definition/components/complete/ApiOtherInfo.vue
index f01767e06d..731d9851ef 100644
--- a/frontend/src/business/components/api/definition/components/complete/ApiOtherInfo.vue
+++ b/frontend/src/business/components/api/definition/components/complete/ApiOtherInfo.vue
@@ -1,15 +1,15 @@
-
+
-
-
+
+
-
-
+
+
@@ -23,6 +23,7 @@ import MsFormDivider from "@/business/components/common/components/MsFormDivider
import ApiInfoContainer from "@/business/components/api/definition/components/complete/ApiInfoContainer";
import DependenciesList from "@/business/components/common/components/graph/DependenciesList";
import FormRichTextItem from "@/business/components/track/case/components/FormRichTextItem";
+import {hasPermissions} from "@/common/js/utils";
export default {
name: "ApiOtherInfo",
components: {FormRichTextItem, DependenciesList, ApiInfoContainer, MsFormDivider},
@@ -32,6 +33,11 @@ export default {
activeName: 'remark'
}
},
+ computed: {
+ hasPermissions() {
+ return hasPermissions('PROJECT_API_DEFINITION:READ+EDIT_API');
+ }
+ },
watch: {
activeName() {
if (this.activeName === 'dependencies') {
diff --git a/frontend/src/business/components/api/definition/components/complete/ApiRelationshipList.vue b/frontend/src/business/components/api/definition/components/complete/ApiRelationshipList.vue
index 5434325916..37658023ee 100644
--- a/frontend/src/business/components/api/definition/components/complete/ApiRelationshipList.vue
+++ b/frontend/src/business/components/api/definition/components/complete/ApiRelationshipList.vue
@@ -57,7 +57,7 @@ export default {
{
tip: this.$t('commons.delete'), icon: "el-icon-delete", type: "danger",
exec: this.handleDelete,
- // permissions: ['PROJECT_TRACK_CASE:READ+DELETE']
+ permissions: ['PROJECT_API_DEFINITION:READ+EDIT_API']
}
],
condition: {},
diff --git a/frontend/src/business/components/common/components/MsTableOperators.vue b/frontend/src/business/components/common/components/MsTableOperators.vue
index 676d7e058c..6150779680 100644
--- a/frontend/src/business/components/common/components/MsTableOperators.vue
+++ b/frontend/src/business/components/common/components/MsTableOperators.vue
@@ -33,7 +33,11 @@ export default {
},
isDisable(btn) {
if (btn.isDisable) {
- return btn.isDisable(this.row);
+ if (btn.isDisable instanceof Function) {
+ return btn.isDisable(this.row);
+ } else {
+ return btn.isDisable;
+ }
}
return false;
}
diff --git a/frontend/src/business/components/common/components/graph/DependenciesList.vue b/frontend/src/business/components/common/components/graph/DependenciesList.vue
index 9b40190c3c..d674bb32da 100644
--- a/frontend/src/business/components/common/components/graph/DependenciesList.vue
+++ b/frontend/src/business/components/common/components/graph/DependenciesList.vue
@@ -4,10 +4,10 @@
-
-
+
+
-
+
@@ -21,7 +21,8 @@ export default {
components: {RelationshipList, RelationshipGraphDrawer},
props: [
'resourceId',
- 'resourceType'
+ 'resourceType',
+ 'readOnly'
],
data() {
return {
diff --git a/frontend/src/business/components/common/components/graph/RelationshipList.vue b/frontend/src/business/components/common/components/graph/RelationshipList.vue
index dd11c4662c..23e7d9ab71 100644
--- a/frontend/src/business/components/common/components/graph/RelationshipList.vue
+++ b/frontend/src/business/components/common/components/graph/RelationshipList.vue
@@ -1,18 +1,20 @@
{{ title }}
- {{ $t('添加') }}
+ {{ $t($t('commons.add')) }}
-
-
+
+
diff --git a/frontend/src/business/components/track/case/components/TestCaseRelationshipList.vue b/frontend/src/business/components/track/case/components/TestCaseRelationshipList.vue
index 9cdc511f5f..9cf5ab5cbe 100644
--- a/frontend/src/business/components/track/case/components/TestCaseRelationshipList.vue
+++ b/frontend/src/business/components/track/case/components/TestCaseRelationshipList.vue
@@ -62,7 +62,8 @@ export default {
{
tip: this.$t('commons.delete'), icon: "el-icon-delete", type: "danger",
exec: this.handleDelete,
- // permissions: ['PROJECT_TRACK_CASE:READ+DELETE']
+ isDisable: this.readOnly,
+ permissions: ['PROJECT_TRACK_CASE:READ+DELETE']
}
],
condition: {},
diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js
index 53356ffd00..20cc1683a8 100644
--- a/frontend/src/i18n/en-US.js
+++ b/frontend/src/i18n/en-US.js
@@ -186,6 +186,16 @@ export default {
run_completed: "Run Completed",
run_fail: "Run Fail",
generate_test_data: "Generate test data",
+ relationship: {
+ name: 'Dependencies',
+ pre: 'Prepositional Object',
+ post: 'Postposition Object',
+ graph: 'Dependencies Graph',
+ selected: 'Selected Node',
+ direct: 'Direct Link',
+ indirect: 'Indirect Link',
+
+ },
table: {
select_tip: "Item {0} data is selected"
},
diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js
index 94679c173d..a9a0794014 100644
--- a/frontend/src/i18n/zh-CN.js
+++ b/frontend/src/i18n/zh-CN.js
@@ -186,6 +186,16 @@ export default {
run_success: "执行成功",
run_completed: "执行完成",
run_fail: "执行失败",
+ relationship: {
+ name: '依赖关系',
+ pre: '前置对象',
+ post: '后置置对象',
+ graph: '依赖图',
+ selected: '选中节点',
+ direct: '直接关联',
+ indirect: '间接关联',
+
+ },
generate_test_data: "生成测试数据",
table: {
select_tip: "已选中 {0} 条数据"
@@ -244,7 +254,7 @@ export default {
not_equals: "不等于",
between: "之间",
current_user: "是当前用户"
- }
+ },
},
monitor: "监控",
all_label: {
diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js
index f12447d808..ffec1781c8 100644
--- a/frontend/src/i18n/zh-TW.js
+++ b/frontend/src/i18n/zh-TW.js
@@ -1,6 +1,6 @@
export default {
commons: {
- project_permission: '請先添加該項目許可權',
+ project_permission: '請先添加該項目權限',
failure_continues: "失敗繼續",
full_screen_editing: "全屏編輯",
trash: "回收站",
@@ -47,7 +47,7 @@ export default {
update: '更新',
save_success: '保存成功',
delete_success: '刪除成功',
- copy_success: '復制成功',
+ copy_success: '復製成功',
modify_success: '修改成功',
delete_cancel: '已取消刪除',
option_cannot_spread_pages: '這個操作不支持跨頁,是否繼續?',
@@ -66,7 +66,7 @@ export default {
create_time: '創建時間',
update_time: '更新時間',
delete_time: '刪除時間',
- delete_user: '删除人',
+ delete_user: '刪除人',
add: '添加',
preview: '預覽',
member: '成員',
@@ -92,7 +92,7 @@ export default {
input_content: '請輸入內容',
create: '新建',
edit: '編輯',
- copy: '復制',
+ copy: '復製',
refresh: '刷新',
remark: '備註',
delete: '刪除',
@@ -169,14 +169,14 @@ export default {
mock: "Mock 設置",
api_case: "接口用例",
scenario_case: "場景用例",
- task_center: "任务中心",
+ task_center: "任務中心",
notice_center: "消息中心",
notice_count: '條消息',
notice_tips: '僅顯示最近3個月的站內消息',
system_notice: '系統通知',
mentioned_me_notice: '@提到我的',
all_module_title: "全部模塊",
- create_user: "創建人",
+ create_user: '創建人',
run_message: "任務執行中,請到任務中心查看詳情",
executor: "執行人",
execute_history: "執行歷史",
@@ -186,20 +186,30 @@ export default {
run_success: "執行成功",
run_completed: "執行完成",
run_fail: "執行失敗",
+ relationship: {
+ name: '依賴關系',
+ pre: '前置對象',
+ post: '後置置對象',
+ graph: '依賴圖',
+ selected: '選中節點',
+ direct: '直接關聯',
+ indirect: '間接關聯',
+
+ },
generate_test_data: "生成測試數據",
+ table: {
+ select_tip: "已選中 {0} 條數據"
+ },
selector: {
required: "必填",
not_required: "非必填",
},
- table: {
- select_tip: "已選中 {0} 條數據"
- },
ssl: {
config: "證書配置",
files: "證書文件",
entry: "證書條目",
original_as_name: "原有別名",
- new_as_name: "新别名",
+ new_as_name: "新別名",
source: "來源",
default: "是否默認"
},
@@ -244,7 +254,7 @@ export default {
not_equals: "不等於",
between: "之間",
current_user: "是當前用戶"
- }
+ },
},
monitor: "監控",
all_label: {
@@ -259,7 +269,7 @@ export default {
},
report_statistics: {
title: "報表統計",
- test_case_analysis: "測試用例分析",
+ test_case_analysis: "測試用例趨勢",
test_case_activity: "測試用例活動情況",
test_case_count: "測試用例統計",
test_case_count_activity: "測試用例統計情況",
@@ -359,7 +369,7 @@ export default {
scene: '使用場景',
attribute_type: '屬性類型',
field_name: '字段名',
- field: '字段名',
+ field: '字段',
field_remark: '字段備註',
field_type: '字段類型',
field_option: '選項值',
@@ -396,8 +406,8 @@ export default {
special_characters_are_not_supported: '格式錯誤(不支持特殊字符,且不能以\'-\'開頭結尾)',
delete_warning: '刪除該工作空間將同步刪除該工作空間下所有項目,以及項目中的所有用例、接口測試、性能測試等,確定要刪除嗎?',
template_manage: "模版管理",
- case_template_manage: "用例模板",
- issue_template_manage: "缺陷模板",
+ case_template_manage: "用例模版",
+ issue_template_manage: "缺陷模版",
},
organization: {
create: '創建組織',
@@ -425,16 +435,17 @@ export default {
defect_task_notification: '缺陷任務通知',
select_receiving_method: '選擇接收方式',
mail: '郵件',
+ in_site: '站內通知',
nail_robot: '釘釘機器人',
enterprise_wechat_robot: '企業微信機器人',
lark: '飛書機器人',
- notes: '1.釘釘和企業群裏新建一個自定義機器人,然後復制 webhook 地址在我們平臺上;
' +
- ' 2.機器人選擇為群機器人,安全驗證選擇“自定義關鍵詞” :"任務通知";
' +
+ notes: '1.釘釘和企業群裏新建一個自定義機器人,然後復製 webhook 地址在我們平臺上;
' +
+ ' 2.機器人選擇為群機器人,安全驗證選擇「自定義關鍵詞」 :"任務通知";
' +
' 3.選擇接收人時必須是你所建的群裏包含的人,接收人手機號為必填項且為釘釘企業所使用的手機號',
message: '事件,接收人,接收方式為必填項',
message_webhook: '接收方式為釘釘和企業機器人,飛書時,webhook為必填項',
template: "模版",
- track: '測試跟踪任務通知',
+ track: '測試跟蹤任務通知',
api: '接口測試任務通知',
performance: '性能測試任務通知',
notice_count: '通知數',
@@ -453,7 +464,6 @@ export default {
jira_storytype: '需求類型',
input_api_account: '請輸入賬號',
input_api_password: '請輸入密碼',
- input_api_pat: '請输入 Personal Access Token',
input_jira_url: '請輸入Jira地址,例:https://metersphere.atlassian.net/',
input_jira_issuetype: '請輸入問題類型',
input_jira_storytype: '請輸入需求類型',
@@ -485,7 +495,7 @@ export default {
azure_organization_id: 'Azure 組織ID',
input_azure_pat: '請輸入 Personal Access Token',
input_azure_url: '請輸入 Azure Devops 地址',
- input_azure_id: '請輸入 Azure 組織ID',
+ input_azure_organization_id: '請輸入 Azure 組織ID',
use_tip_azure: 'Azure Devops 地址+令牌(賬戶設置-個人訪問令牌-創建令牌)',
}
},
@@ -515,7 +525,7 @@ export default {
upload_file_again: '重新上傳',
code_segment: {
code_segment: "自定義代碼片段",
- search: "根據 名稱/標籤 搜索",
+ search: "根據 名稱/標簽 搜索",
create: "創建代碼片段",
update: "更新代碼片段",
delete: "刪除自定義代碼片段",
@@ -528,9 +538,9 @@ export default {
test: "測試",
no_result: "無執行結果",
api_test: "API測試",
- import_api_test: "从API定义导入",
+ import_api_test: "從API定義導入",
new_api_test: "新API測試[JSON]",
- custom_value: "新API測試",
+ custom_value: "自定義變量",
project_env: "項目環境",
insert_segment: "插入自定義代碼片段",
exception_handle: "異常處理",
@@ -663,9 +673,9 @@ export default {
run_status: '測試處於運行狀態,請稍後查看報告!',
user_name: '創建人',
project_name: '所屬項目',
- force_stop_tips: '強制停止測試會立刻結束當前測試並刪除報告數據',
+ force_stop_tips: '強製停止測試會立刻結束當前測試並刪除報告數據',
stop_tips: '停止測試會結束當前測試並保留報告數據',
- force_stop_btn: '強制停止',
+ force_stop_btn: '強製停止',
stop_btn: '停止',
stop_btn_all: '全部停止',
not_exist: "測試報告不存在",
@@ -707,7 +717,7 @@ export default {
upload_type: '只能上傳JMX/CSV/JAR文件',
related_file_not_found: "未找到關聯的測試文件!",
delete_file_confirm: '確認刪除文件: ',
- file_size_limit: "文件個數超出限制!",
+ file_size_limit: "文件個數超出限製!",
delete_file: "文件已存在,請先刪除同名文件!",
thread_num: '並發用戶數',
input_thread_num: '請輸入線程數',
@@ -715,7 +725,7 @@ export default {
granularity: '聚合時間(秒)',
input_duration: '請輸入時長',
rps_limit: 'RPS上限:',
- input_rps_limit: '請輸入限制',
+ input_rps_limit: '請輸入限製',
ramp_up_time_within: '在',
ramp_up_time_minutes: '秒內,分',
ramp_up_time_seconds: '秒內增加並發用戶',
@@ -767,7 +777,7 @@ export default {
threadgroup_at_least_one: '至少啟用一個線程組',
load_api_automation_jmx: '引用接口自動化場景',
project_file_exist: "項目中已存在該文件,請直接引用",
- csv_has_header: '包含表头',
+ csv_has_header: '包含表頭',
csv_split: 'CSV分割',
on_sample_error: '取樣器錯誤後',
continue: '繼續',
@@ -793,8 +803,8 @@ export default {
project_file_update_type_error: '更新的文件類型必須一致',
},
api_test: {
- creator: "創建人",
is_continue: "是否繼續",
+ creator: "創建人",
save_and_run: "保存並執行",
run: "執行",
running: "正在執行",
@@ -811,10 +821,10 @@ export default {
value: "值",
create_performance_test: "創建性能測試",
create_performance_test_batch: "批量創建性能測試",
- batch_copy: "批量複製",
+ batch_copy: "批量復製",
export_config: "導出",
enable_validate_tip: "沒有可用請求",
- copy: "復制測試",
+ copy: "復製測試",
batch_add_parameter: "格式:參數名:參數值
如:Accept-Encoding:utf-8",
jar_config: {
title: "jar包管理",
@@ -909,15 +919,15 @@ export default {
batch_delete: "批量刪除",
delete_confirm: "確認刪除接口",
batch_to_performance_confirm: "確認批量創建性能測試",
- batch_copy_confirm: "確認要進行批量複製嗎",
- batch_copy_end: "批量複製完成",
+ batch_copy_confirm: "確定要進行批量復製嗎",
+ batch_copy_end: "批量復製完成",
delete_case_confirm: "確認刪除用例",
delete_confirm_step: "確認刪除步驟",
assertions_rule: "斷言規則",
response_header: "響應頭",
response_body: "響應體",
response_template: "響應報文模版",
- console: "控制臺",
+ console: "控製臺",
status_code: "狀態碼",
query_info: "地址欄中跟在?後面的參數,如updateapi?id=112",
rest_info: "地址欄中被斜杠/分隔的參數,如updateapi/{id}",
@@ -938,7 +948,6 @@ export default {
batch_move: "批量移動",
path_valid_info: "請求路徑無效",
other_config: "其他設置",
- cert_alias: "證書別名",
message_template: "報文模版",
tcp_parameter_tip: "請求參數可以在請求模版通過${xxx}引用",
step_message: "步驟過多,是否展開前 30 個步驟?",
@@ -951,7 +960,7 @@ export default {
value: "數據",
not_required: "非必填",
},
- esb_copy_confirm: "確認復制當前節點的數據結構",
+ esb_copy_confirm: "確認復製當前節點的數據結構",
esb_title: "可以在報文模板中使用${參數名} 或 ${父節點參數名.子節點參數名}來生成xml數據結構",
},
document: {
@@ -1003,10 +1012,10 @@ export default {
scenario_total: "場景變量",
api_list_import: "接口列表導入",
external_import: "外部導入",
- wait_controller: "等待控制器",
- if_controller: "條件控制器",
- loop_controller: "循環控制器",
- transcation_controller: "事務控制器",
+ wait_controller: "等待控製器",
+ if_controller: "條件控製器",
+ loop_controller: "循環控製器",
+ transcation_controller: "事務控製器",
scenario_import: "場景導入",
customize_script: "自定義腳本",
customize_req: "自定義請求",
@@ -1028,7 +1037,7 @@ export default {
trash: "回收",
edit: "編輯",
execute: "執行",
- copy: "復制",
+ copy: "復製",
remove: "刪除",
view_ref: "查看引用",
case_ref: "用例引用",
@@ -1068,7 +1077,7 @@ export default {
environment_list: "環境列表",
environment_config: "環境配置",
config_environment: "配置環境",
- copy_environment: "復制環境",
+ copy_environment: "復製環境",
environment: "環境",
select_environment: "請選擇環境",
please_save_test: "請先保存測試",
@@ -1077,8 +1086,8 @@ export default {
database_config: "數據庫配置",
tcp_config: "TCP配置",
import: "導入環境",
- request_timeout: "連接超時",
- response_timeout: "響應超市",
+ request_timeout: "鏈接超時",
+ response_timeout: "響應超時",
},
scenario: {
scenario: "場景",
@@ -1091,7 +1100,7 @@ export default {
variables: "自定義變量",
headers: "請求頭",
kv_description: "所有請求可以使用自定義變量",
- copy: "復制場景",
+ copy: "復製場景",
delete: "刪除場景",
disable: "禁用",
enable: "啟用",
@@ -1101,12 +1110,12 @@ export default {
enable_disable: "啟用/禁用",
test_name: "測試名稱",
reference: "引用",
- clone: "復制",
+ clone: "復製",
cant_reference: '歷史測試文件,重新保存後才可被引用'
},
request: {
debug: "調試",
- copy: "復制請求",
+ copy: "復製請求",
delete: "刪除請求",
input_name: "請輸入請求名稱",
input_url: "請輸入請求URL",
@@ -1146,6 +1155,7 @@ export default {
connect_timeout: "連接超時",
response_timeout: "響應超時",
follow_redirects: "跟隨重定向",
+ cert_alias: "證書別名",
do_multipart_post: "對 POST 使用 multipart/form-data",
body_upload_limit_size: "上傳文件大小不能超過 500 MB!",
condition: "條件",
@@ -1232,6 +1242,7 @@ export default {
timeout: "超時時間(ms)",
database_driver: "數據庫驅動",
database_url: "數據庫連接URL",
+ tips: "Tips: 執行多條SQL語句需配置allowMultiQueries=true",
username: "用戶名",
password: "密碼",
pool_max: "最大連接數",
@@ -1283,12 +1294,11 @@ export default {
timing_synchronization: "定時同步",
next_synchronization_time: "下次同步時間",
ms_env_import_file_limit: "僅支持通過MeterSphere導出的json格式文件",
- file_exceed_limit: "文件數量超出限制",
- import_cover_tip: "导入模式: 覆盖模式说明",
+ file_exceed_limit: "文件數量超出限製",
+ import_cover_tip: "導入模式: 覆蓋模式說明",
cover_tip_1: "1. 接口路徑不存在則新增",
cover_tip_2: "2. 接口路徑與原接口一致,內容不一致則覆蓋原接口",
cover_tip_3: "3. 接口路徑、內容與原接口一致則不做變更",
-
},
home_page: {
unit_of_measurement: "個",
@@ -1583,7 +1593,7 @@ export default {
continue_upload: "繼續上傳",
import_create: "導入新建",
import_update: "導入更新",
- import_tip1: "項目設置中“測試用例自定義ID” 開關開啟時ID為必填項",
+ import_tip1: "項目設置中「測試用例自定義ID」 開關開啟時ID為必填項",
import_tip2: "導入更新時ID為必填項",
},
export: {
@@ -1712,7 +1722,7 @@ export default {
review_progress: "評審進度",
case_count: "用例數量統計",
relevance_case: "關聯用例數量統計",
- case_maintenance: "用例維護人分佈",
+ case_maintenance: "用例維護人分布",
bug_count: "遺留缺陷統計",
case_review: "用例評審",
review_rate: "評審率",
@@ -1724,7 +1734,7 @@ export default {
case_size: "用例數",
bug_size: "缺陷數",
passing_rate: "通過率",
- percentage: "佔比"
+ percentage: "占比"
},
plan_view: {
plan: "計劃",
@@ -1808,7 +1818,7 @@ export default {
tapd_current_owner: "Tapd 處理人",
zentao_bug_build: "禪道 影響版本",
zentao_bug_assigned: "禪道 處理人",
- update_third_party_bugs: "更新第三方平台的缺陷",
+ update_third_party_bugs: "更新第三方平臺的缺陷",
sync_bugs: "同步缺陷"
},
report: {
@@ -1977,7 +1987,7 @@ export default {
modify: "修改配額",
edit_quota_title: "{0}的配額",
workspace_quota_list: "{0}的工作空間配額列表",
- unlimited: "無限制",
+ unlimited: "無限製",
clean: "清空"
},
schema: {
@@ -1998,9 +2008,9 @@ export default {
cancel: "取消",
minLength: "最小長度",
maxLength: "最大長度",
- pattern: "用正則表達式約束字符串",
- exclusiveMinimum: "開啟後,數據必須大於最小值",
- exclusiveMaximum: "開啟後,數據必須小於最大值",
+ pattern: "正則表達式",
+ exclusiveMinimum: "數據必須大於最小值",
+ exclusiveMaximum: "數據必須小於最大值",
minimum: "最小值",
maximum: "最大值",
uniqueItems: "開啟後,每個元素都不相同",
@@ -2041,7 +2051,7 @@ export default {
add_file: "添加文件",
delimiter: "分隔符",
format: "輸出格式",
- quoted_data: "是否允许带引号",
+ quoted_data: "是否允許帶引號",
},
auth_source: {
delete_prompt: '此操作會刪除認證源,是否繼續?',
@@ -2079,11 +2089,11 @@ export default {
after_change: "變更後",
share: "分享",
change_history: "變更歷史",
- change_content: "變更内容"
+ change_content: "變更內容"
},
plugin: {
title: "插件管理",
- script_entry: "脚本执行入口",
+ script_entry: "腳本執行入口",
plugin_id: "插件ID",
script_view: "查看腳本",
}