refactor: i18n
This commit is contained in:
parent
3a6620d9bf
commit
bf5971a334
|
@ -2,20 +2,17 @@ package io.metersphere.track.controller;
|
|||
|
||||
|
||||
import io.metersphere.base.domain.TestCase;
|
||||
import io.metersphere.commons.constants.RoleConstants;
|
||||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.performance.base.ChartsData;
|
||||
import io.metersphere.track.response.BugStatustics;
|
||||
import io.metersphere.track.response.TrackCountResult;
|
||||
import io.metersphere.track.response.TrackStatisticsDTO;
|
||||
import io.metersphere.track.service.TestCaseService;
|
||||
import io.metersphere.track.service.TrackService;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.List;
|
||||
|
@ -78,9 +75,9 @@ public class TrackController {
|
|||
statistics.setCoverageRage(df.format(coverageRageNumber) + "%");
|
||||
}
|
||||
|
||||
statistics.setApiCaseCountStr("接口用例 <br/><br/>" + statistics.getApiCaseCount());
|
||||
statistics.setPerformanceCaseCountStr("性能用例 <br/><br/>" + statistics.getPerformanceCaseCount());
|
||||
statistics.setScenarioCaseStr("场景用例 <br/><br/>" + statistics.getScenarioCaseCount());
|
||||
statistics.setApiCaseCountStr(Translator.get("api_case") + " <br/><br/>" + statistics.getApiCaseCount());
|
||||
statistics.setPerformanceCaseCountStr(Translator.get("performance_case") + " <br/><br/>" + statistics.getPerformanceCaseCount());
|
||||
statistics.setScenarioCaseStr(Translator.get("scenario_case") + " <br/><br/>" + statistics.getScenarioCaseCount());
|
||||
|
||||
return statistics;
|
||||
}
|
||||
|
|
|
@ -257,4 +257,9 @@ project_environment_setting=Project environment setting
|
|||
project_file_management=Project file management
|
||||
personal_information_personal_settings=Personal information personal settings
|
||||
personal_information_apikeys=Personal information API Keys
|
||||
auth_title=Auth
|
||||
auth_title=Auth
|
||||
|
||||
# track home
|
||||
api_case=API
|
||||
performance_case=PERFORMANCE
|
||||
scenario_case=SCENARIO
|
|
@ -256,4 +256,9 @@ project_environment_setting=项目-环境设置
|
|||
project_file_management=项目-文件管理
|
||||
personal_information_personal_settings=个人信息-个人设置
|
||||
personal_information_apikeys=个人信息-API Keys
|
||||
auth_title=系统认证
|
||||
auth_title=系统认证
|
||||
|
||||
# track home
|
||||
api_case=接口用例
|
||||
performance_case=性能用例
|
||||
scenario_case=场景用例
|
|
@ -257,4 +257,8 @@ project_environment_setting=項目-環境設置
|
|||
project_file_management=項目-文件管理
|
||||
personal_information_personal_settings=個人信息-個人設置
|
||||
personal_information_apikeys=個人信息-API Keys
|
||||
auth_title=系统认证
|
||||
auth_title=系统认证
|
||||
# track home
|
||||
api_case=接口用例
|
||||
performance_case=性能用例
|
||||
scenario_case=場景用例
|
|
@ -176,12 +176,12 @@ export default {
|
|||
}
|
||||
},
|
||||
legend: {
|
||||
data: ["功能用例数", "关联用例数"],
|
||||
data: [this.$t('test_track.home.function_case_count'), this.$t('test_track.home.relevance_case_count')],
|
||||
orient: 'vertical',
|
||||
right: '80',
|
||||
},
|
||||
series: [{
|
||||
name: "功能用例数",
|
||||
name: this.$t('test_track.home.function_case_count'),
|
||||
data: yAxis1,
|
||||
type: 'bar',
|
||||
itemStyle: {
|
||||
|
@ -191,7 +191,7 @@ export default {
|
|||
}
|
||||
},
|
||||
{
|
||||
name: "关联用例数",
|
||||
name: this.$t('test_track.home.relevance_case_count'),
|
||||
data: yAxis2,
|
||||
type: 'bar',
|
||||
itemStyle: {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<el-card class="table-card" v-loading="result.loading" body-style="padding:10px;">
|
||||
<div slot="header">
|
||||
<span class="title">
|
||||
遗留缺陷统计
|
||||
{{ $t('test_track.home.bug_count') }}
|
||||
</span>
|
||||
</div>
|
||||
<el-container>
|
||||
|
@ -15,17 +15,17 @@
|
|||
{{ $t('api_test.home_page.unit_of_measurement') }}
|
||||
</span>
|
||||
<div>
|
||||
占比
|
||||
{{ $t('test_track.home.percentage') }}
|
||||
<span class="rage">
|
||||
{{rage}}
|
||||
{{rage}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-aside>
|
||||
<el-table border :data="tableData" class="adjust-table table-content" height="300">
|
||||
<el-table-column prop="index" label="序号"
|
||||
<el-table-column prop="index" :label="$t('test_track.home.serial_number')"
|
||||
width="60" show-overflow-tooltip/>
|
||||
<el-table-column prop="planName" label="测试计划名称"
|
||||
<el-table-column prop="planName" :label="$t('test_track.home.test_plan_name')"
|
||||
width="130" show-overflow-tooltip/>
|
||||
<el-table-column prop="createTime" :label="$t('commons.create_time')" width="180" show-overflow-tooltip>
|
||||
<template v-slot:default="scope">
|
||||
|
@ -44,11 +44,11 @@
|
|||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="caseSize" label="用例数"
|
||||
<el-table-column prop="caseSize" :label="$t('test_track.home.case_size')"
|
||||
width="80" show-overflow-tooltip/>
|
||||
<el-table-column prop="bugSize" label="缺陷数"
|
||||
<el-table-column prop="bugSize" :label="$t('test_track.home.bug_size')"
|
||||
width="80" show-overflow-tooltip/>
|
||||
<el-table-column prop="passRage" label="通过率"
|
||||
<el-table-column prop="passRage" :label="$t('test_track.home.passing_rate')"
|
||||
width="80" show-overflow-tooltip/>
|
||||
</el-table>
|
||||
</el-container>
|
||||
|
@ -100,6 +100,7 @@ export default {
|
|||
.el-aside {
|
||||
line-height: 100px;
|
||||
text-align: center;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.count-number {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<el-card class="table-card" v-loading="result.loading" body-style="padding:10px;">
|
||||
<div slot="header" >
|
||||
<span class="title">
|
||||
用例数量统计
|
||||
{{ $t('test_track.home.case_count') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -68,7 +68,7 @@
|
|||
<el-aside width="60%" class="count-number-show" style="margin-bottom: 0px;margin-top: 0px">
|
||||
<el-container>
|
||||
<el-aside width="30%">
|
||||
评审率:
|
||||
{{ $t('test_track.home.review_rate') }}:
|
||||
</el-aside>
|
||||
<el-main style="padding: 0px 0px 0px 0px; line-height: 100px; text-align: center;">
|
||||
<span class="count-number">
|
||||
|
@ -87,7 +87,7 @@
|
|||
<el-row>
|
||||
<el-col>
|
||||
<span class="default-property">
|
||||
未评审
|
||||
{{ $t('test_track.review.prepare') }}
|
||||
{{"\xa0\xa0"}}
|
||||
<el-link type="info" @click="redirectPage('Prepare')" target="_blank" style="color: #000000">
|
||||
{{trackCountData.prepareCount}}
|
||||
|
@ -96,7 +96,7 @@
|
|||
</el-col>
|
||||
<el-col style="margin-top: 5px;">
|
||||
<span class="default-property">
|
||||
未通过
|
||||
{{ $t('test_track.review.un_pass') }}
|
||||
{{"\xa0\xa0"}}
|
||||
<el-link type="info" @click="redirectPage('UnPass')" target="_blank" style="color: #000000">
|
||||
{{trackCountData.unPassCount}}
|
||||
|
@ -105,7 +105,7 @@
|
|||
</el-col>
|
||||
<el-col style="margin-top: 5px;">
|
||||
<span class="main-property">
|
||||
已通过
|
||||
{{ $t('test_track.review.pass') }}
|
||||
{{"\xa0\xa0"}}
|
||||
<el-link type="info" @click="redirectPage('Pass')" target="_blank" style="color: #000000">
|
||||
{{trackCountData.passCount}}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<el-card class="table-card" v-loading="result.loading" body-style="padding:10px;">
|
||||
<div slot="header">
|
||||
<span class="title">
|
||||
用例维护人分布
|
||||
{{ $t('test_track.home.case_maintenance') }}
|
||||
</span>
|
||||
</div>
|
||||
<el-container>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<el-card class="table-card" v-loading="result.loading" body-style="padding:10px;">
|
||||
<div slot="header" >
|
||||
<span class="title">
|
||||
关联用例数量统计
|
||||
{{ $t('test_track.home.relevance_case') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
|||
<el-aside width="60%" class="count-number-show" style="margin-bottom: 0px;margin-top: 0px">
|
||||
<el-container>
|
||||
<el-aside width="30%">
|
||||
覆盖率:
|
||||
{{ $t('test_track.home.coverage') }}:
|
||||
</el-aside>
|
||||
<el-main style="padding: 0px 0px 0px 0px; line-height: 100px; text-align: center;">
|
||||
<span class="count-number">
|
||||
|
@ -70,7 +70,7 @@
|
|||
<el-row>
|
||||
<el-col>
|
||||
<span class="default-property">
|
||||
未覆盖
|
||||
{{ $t('api_test.home_page.detail_card.uncoverage') }}
|
||||
{{"\xa0\xa0"}}
|
||||
<el-link type="info" @click="redirectPage('uncoverage')" target="_blank" style="color: #000000">
|
||||
{{relevanceCountData.uncoverageCount}}
|
||||
|
@ -79,7 +79,7 @@
|
|||
</el-col>
|
||||
<el-col style="margin-top: 5px;">
|
||||
<span class="main-property">
|
||||
已覆盖
|
||||
{{ $t('api_test.home_page.detail_card.coverage') }}
|
||||
{{"\xa0\xa0"}}
|
||||
<el-link type="info" @click="redirectPage('coverage')" target="_blank" style="color: #000000">
|
||||
{{relevanceCountData.coverageCount}}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<el-card class="table-card" v-loading="result.loading" body-style="padding:10px;">
|
||||
<div slot="header">
|
||||
<span class="title">
|
||||
用例评审
|
||||
{{ $t('test_track.home.case_review') }}
|
||||
</span>
|
||||
<ms-table-button v-if="!showMyCreator" icon="el-icon-view"
|
||||
:content="$t('test_track.review.my_create')" @click="searchMyCreator" style="float: right"/>
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
<template v-slot:menu>
|
||||
<el-menu v-if="isMenuShow" :active-text-color="color" :default-active="activeIndex"
|
||||
class="el-menu-demo header-menu" mode="horizontal" @select="handleSelect">
|
||||
<el-menu-item index="functional">功能测试用例</el-menu-item>
|
||||
<el-menu-item index="api" v-modules="['api']">接口测试用例</el-menu-item>
|
||||
<el-menu-item index="load" v-modules="['performance']">性能测试用例</el-menu-item>
|
||||
<el-menu-item index="report">报告统计</el-menu-item>
|
||||
<el-menu-item index="functional">{{ $t('test_track.functional_test_case') }}</el-menu-item>
|
||||
<el-menu-item index="api" v-modules="['api']">{{ $t('test_track.api_test_case') }}</el-menu-item>
|
||||
<el-menu-item index="load" v-modules="['performance']">{{ $t('test_track.performance_test_case') }}</el-menu-item>
|
||||
<el-menu-item index="report">{{ $t('test_track.report_statistics') }}</el-menu-item>
|
||||
</el-menu>
|
||||
</template>
|
||||
</ms-test-plan-header-bar>
|
||||
|
|
|
@ -45,7 +45,7 @@ export default {
|
|||
}
|
||||
|
||||
.menu-ul {
|
||||
width: 500px;
|
||||
width: 600px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,22 +4,22 @@
|
|||
|
||||
<div class="char-component">
|
||||
<div class="char-item" v-if="showFunctional">
|
||||
<ms-pie-chart v-if="isShow" :text="'功能测试用例'" @onClick="onFuncCharClick"
|
||||
<ms-pie-chart v-if="isShow" :text="$t('test_track.functional_test_case')" @onClick="onFuncCharClick"
|
||||
:name="$t('test_track.plan_view.test_result')" :data="functionalCharData"/>
|
||||
</div>
|
||||
|
||||
<div class="char-item" v-if="showApi">
|
||||
<ms-pie-chart v-if="isShow" :text="'接口测试用例'" @onClick="onApiCharClick"
|
||||
<ms-pie-chart v-if="isShow" :text="$t('test_track.api_test_case')" @onClick="onApiCharClick"
|
||||
:name="$t('test_track.plan_view.test_result')" :data="apiCharData"/>
|
||||
</div>
|
||||
|
||||
<div class="char-item" v-if="showScenario">
|
||||
<ms-pie-chart v-if="isShow" :text="'场景测试用例'" @onClick="onScenarioCharClick"
|
||||
<ms-pie-chart v-if="isShow" :text="$t('test_track.scenario_test_case')" @onClick="onScenarioCharClick"
|
||||
:name="$t('test_track.plan_view.test_result')" :data="scenarioCharData"/>
|
||||
</div>
|
||||
|
||||
<div class="char-item" v-if="showLoad">
|
||||
<ms-pie-chart v-if="isShow" :text="'性能测试用例'" @onClick="onLoadCharClick"
|
||||
<ms-pie-chart v-if="isShow" :text="$t('test_track.performance_test_case')" @onClick="onLoadCharClick"
|
||||
:name="$t('test_track.plan_view.test_result')" :data="loadCharData"/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="failure-cases-list">
|
||||
<div class="failure-cases-list-header">
|
||||
功能测试用例
|
||||
{{ $t('test_track.functional_test_case') }}
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="failure-cases-list">
|
||||
<div class="failure-cases-list-header">
|
||||
性能测试用例
|
||||
{{ $t('test_track.performance_test_case') }}
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<el-menu v-if="isMenuShow" :active-text-color="color"
|
||||
class="el-menu-demo header-menu" mode="horizontal" @select="handleSelect"
|
||||
:default-active="activeIndex">
|
||||
<el-menu-item index="functional">功能测试用例</el-menu-item>
|
||||
<el-menu-item index="functional">{{ $t('test_track.functional_test_case') }}</el-menu-item>
|
||||
<!-- <el-menu-item index="api">接口测试用例</el-menu-item>
|
||||
<el-menu-item index="load">性能测试用例</el-menu-item>-->
|
||||
<!-- <el-menu-item index="report">报告统计</el-menu-item>-->
|
||||
|
|
|
@ -1316,6 +1316,11 @@ export default {
|
|||
actual_result: ": The actual result is empty",
|
||||
cancel_relevance_success: "Unlinked successfully",
|
||||
switch_project: "Switch project",
|
||||
functional_test_case: "Functional Case",
|
||||
api_test_case: "Api Case",
|
||||
performance_test_case: "Performance Case",
|
||||
scenario_test_case: "Scenario Case",
|
||||
report_statistics: "Report Statistics",
|
||||
case: {
|
||||
list: "List",
|
||||
minder: "Minder",
|
||||
|
@ -1487,7 +1492,8 @@ export default {
|
|||
input_review_project: "Please select the project",
|
||||
input_reviewer: "Please select reviewer",
|
||||
no_link_case: "No associated use cases!",
|
||||
pass: "pass",
|
||||
prepare: "Prepare",
|
||||
pass: "Pass",
|
||||
un_pass: "UnPass",
|
||||
comment: "Comment",
|
||||
my_review: "My Review",
|
||||
|
@ -1531,11 +1537,26 @@ export default {
|
|||
project_name: "Project"
|
||||
},
|
||||
home: {
|
||||
recent_test: "Recent test",
|
||||
my_plan: "My plan",
|
||||
test_rate: "Test rate",
|
||||
tested_case: "Tested case",
|
||||
review_progress: "Review progress"
|
||||
recent_test: "Recent Test",
|
||||
my_plan: "My Plan",
|
||||
test_rate: "Test Rate",
|
||||
tested_case: "Tested Case",
|
||||
review_progress: "Review Progress",
|
||||
case_count: "Statistics of the number of use cases",
|
||||
relevance_case: "Relevance Case",
|
||||
case_maintenance: "Use case maintainer distribution",
|
||||
bug_count: "Statistics of remaining defects",
|
||||
case_review: "Use case review",
|
||||
review_rate: "Rate",
|
||||
coverage: "Coverage",
|
||||
function_case_count: "Function Case Count",
|
||||
relevance_case_count: "Relevance Case Count",
|
||||
serial_number: "Index",
|
||||
test_plan_name: "Plan Name",
|
||||
case_size: "Case count",
|
||||
bug_size: "Bug count",
|
||||
passing_rate: "Pass Rate",
|
||||
percentage: "Percentage"
|
||||
},
|
||||
plan_view: {
|
||||
plan: "Plan",
|
||||
|
|
|
@ -1320,6 +1320,11 @@ export default {
|
|||
actual_result: ": 实际结果为空",
|
||||
cancel_relevance_success: "取消关联成功",
|
||||
switch_project: "切换项目",
|
||||
functional_test_case: "功能测试用例",
|
||||
api_test_case: "接口测试用例",
|
||||
performance_test_case: "性能测试用例",
|
||||
scenario_test_case: "场景测试用例",
|
||||
report_statistics: "报告统计",
|
||||
case: {
|
||||
list: "列表",
|
||||
minder: "脑图",
|
||||
|
@ -1540,7 +1545,22 @@ export default {
|
|||
my_plan: "我的计划",
|
||||
test_rate: "测试进度",
|
||||
tested_case: "已测用例",
|
||||
review_progress: "评审进度"
|
||||
review_progress: "评审进度",
|
||||
case_count: "用例数量统计",
|
||||
relevance_case: "关联用例数量统计",
|
||||
case_maintenance: "用例维护人分布",
|
||||
bug_count: "遗留缺陷统计",
|
||||
case_review: "用例评审",
|
||||
review_rate: "评审率",
|
||||
coverage: "覆盖率",
|
||||
function_case_count: "功能用例数",
|
||||
relevance_case_count: "关联用例数",
|
||||
serial_number: "序号",
|
||||
test_plan_name: "测试计划名称",
|
||||
case_size: "用例数",
|
||||
bug_size: "缺陷数",
|
||||
passing_rate: "通过率",
|
||||
percentage: "占比"
|
||||
},
|
||||
plan_view: {
|
||||
plan: "计划",
|
||||
|
|
|
@ -1320,6 +1320,11 @@ export default {
|
|||
actual_result: ": 實際結果為空",
|
||||
cancel_relevance_success: "取消關聯成功",
|
||||
switch_project: "切換項目",
|
||||
functional_test_case: "功能測試用例",
|
||||
api_test_case: "接口測試用例",
|
||||
performance_test_case: "性能測試用例",
|
||||
scenario_test_case: "場景測試用例",
|
||||
report_statistics: "報告統計",
|
||||
case: {
|
||||
list: "列表",
|
||||
minder: "腦圖",
|
||||
|
@ -1540,7 +1545,22 @@ export default {
|
|||
my_plan: "我的計劃",
|
||||
test_rate: "測試進度",
|
||||
tested_case: "已測用例",
|
||||
review_progress: "評審進度"
|
||||
review_progress: "評審進度",
|
||||
case_count: "用例數量統計",
|
||||
relevance_case: "關聯用例數量統計",
|
||||
case_maintenance: "用例維護人分佈",
|
||||
bug_count: "遺留缺陷統計",
|
||||
case_review: "用例評審",
|
||||
review_rate: "評審率",
|
||||
coverage: "覆蓋率",
|
||||
function_case_count: "功能用例數",
|
||||
relevance_case_count: "關聯用例數",
|
||||
serial_number: "序號",
|
||||
test_plan_name: "測試計劃名稱",
|
||||
case_size: "用例數",
|
||||
bug_size: "缺陷數",
|
||||
passing_rate: "通過率",
|
||||
percentage: "佔比"
|
||||
},
|
||||
plan_view: {
|
||||
plan: "計劃",
|
||||
|
|
Loading…
Reference in New Issue