diff --git a/backend/framework/sdk/src/main/resources/i18n/dashboard.properties b/backend/framework/sdk/src/main/resources/i18n/dashboard.properties index f8e4579091..36cf609dd7 100644 --- a/backend/framework/sdk/src/main/resources/i18n/dashboard.properties +++ b/backend/framework/sdk/src/main/resources/i18n/dashboard.properties @@ -4,10 +4,10 @@ functional_case.hasReview=已评审 functional_case.unReview=未评审 functional_case.passRate=通过率 functional_case.hasPass=已通过 -functional_case.unPass=未通过 -functional_case.coverRate=覆盖率 -functional_case.hasCover=已覆盖 -functional_case.unCover=未覆盖 +functional_case.unPass=不通过 +functional_case.associateRate=关联率 +functional_case.hasAssociate=已关联 +functional_case.unAssociate=未关联 api_definition.completionRate=完成率 api_management.execTime=执行次数 api_management.execCount=已执行 diff --git a/backend/framework/sdk/src/main/resources/i18n/dashboard_en_US.properties b/backend/framework/sdk/src/main/resources/i18n/dashboard_en_US.properties index 04624e6cbe..ff3288849e 100644 --- a/backend/framework/sdk/src/main/resources/i18n/dashboard_en_US.properties +++ b/backend/framework/sdk/src/main/resources/i18n/dashboard_en_US.properties @@ -5,9 +5,9 @@ functional_case.unReview=Not reviewed functional_case.passRate=Pass rate functional_case.hasPass=Passed functional_case.unPass=Un pass -functional_case.coverRate=Coverage -functional_case.hasCover=Covered -functional_case.unCover=Not covered +functional_case.associateRate=Associate rate +functional_case.hasAssociate=Associated +functional_case.unAssociate=Un associate api_definition.completionRate=Completion rate api_management.execTime=Execution times api_management.execCount=Executed diff --git a/backend/framework/sdk/src/main/resources/i18n/dashboard_zh_CN.properties b/backend/framework/sdk/src/main/resources/i18n/dashboard_zh_CN.properties index 0ccde92878..17c1f553fd 100644 --- a/backend/framework/sdk/src/main/resources/i18n/dashboard_zh_CN.properties +++ b/backend/framework/sdk/src/main/resources/i18n/dashboard_zh_CN.properties @@ -4,10 +4,10 @@ functional_case.hasReview=已评审 functional_case.unReview=未评审 functional_case.passRate=通过率 functional_case.hasPass=已通过 -functional_case.unPass=未通过 -functional_case.coverRate=覆盖率 -functional_case.hasCover=已覆盖 -functional_case.unCover=未覆盖 +functional_case.unPass=不通过 +functional_case.associateRate=关联率 +functional_case.hasAssociate=已关联 +functional_case.unAssociate=未关联 api_definition.completionRate=完成率 api_management.execTime=执行次数 api_management.execCount=已执行 diff --git a/backend/services/dashboard/src/main/java/io/metersphere/dashboard/service/DashboardService.java b/backend/services/dashboard/src/main/java/io/metersphere/dashboard/service/DashboardService.java index d9a84a5d26..3eb878aed2 100644 --- a/backend/services/dashboard/src/main/java/io/metersphere/dashboard/service/DashboardService.java +++ b/backend/services/dashboard/src/main/java/io/metersphere/dashboard/service/DashboardService.java @@ -796,7 +796,7 @@ public class DashboardService { } long caseTestCount = extFunctionalCaseMapper.caseTestCount(projectId, null, null); long simpleCaseCount = extFunctionalCaseMapper.simpleCaseCount(projectId, null, null); - List coverList = getCoverList((int) simpleCaseCount, (int) caseTestCount, (int) (simpleCaseCount - caseTestCount)); + List coverList = getCoverList((int) simpleCaseCount,Translator.get("functional_case.associateRate"), (int) caseTestCount,Translator.get("functional_case.hasAssociate"), (int) (simpleCaseCount - caseTestCount), Translator.get("functional_case.unAssociate")); Map> statusStatisticsMap = new HashMap<>(); statusStatisticsMap.put("cover", coverList); statisticsDTO.setStatusStatisticsMap(statusStatisticsMap); @@ -977,7 +977,7 @@ public class DashboardService { List statisticListByProjectId = extFunctionalCaseMapper.getStatisticListByProjectId(projectId, null, null); List unReviewCaseList = statisticListByProjectId.stream().filter(t -> StringUtils.equalsIgnoreCase(t.getReviewStatus(), FunctionalCaseReviewStatus.UN_REVIEWED.toString())).toList(); int reviewCount = statisticListByProjectId.size() - unReviewCaseList.size(); - List coverList = getCoverList(statisticListByProjectId.size(), reviewCount, unReviewCaseList.size()); + List coverList = getCoverList(statisticListByProjectId.size(), Translator.get("functional_case.reviewRate"), reviewCount,Translator.get("functional_case.hasReview"), unReviewCaseList.size(), Translator.get("functional_case.unReview")); Map> statusStatisticsMap = new HashMap<>(); statusStatisticsMap.put("cover", coverList); statisticsDTO.setStatusStatisticsMap(statusStatisticsMap); @@ -1082,22 +1082,22 @@ public class DashboardService { } @NotNull - private static List getCoverList(int totalCount, int coverCount, int unCoverCount) { + private static List getCoverList(int totalCount, String rateName, int coverCount,String coverName, int unCoverCount, String unCoverName) { List coverList = new ArrayList<>(); NameCountDTO coverRate = new NameCountDTO(); if (totalCount > 0) { BigDecimal divide = BigDecimal.valueOf(coverCount).divide(BigDecimal.valueOf(totalCount), 2, RoundingMode.HALF_UP); coverRate.setCount(getTurnCount(divide)); } - coverRate.setName(Translator.get("functional_case.coverRate")); + coverRate.setName(rateName ); coverList.add(coverRate); NameCountDTO hasCover = new NameCountDTO(); hasCover.setCount(coverCount); - hasCover.setName(Translator.get("functional_case.hasCover")); + hasCover.setName(coverName); coverList.add(hasCover); NameCountDTO unCover = new NameCountDTO(); unCover.setCount(unCoverCount); - unCover.setName(Translator.get("functional_case.unCover")); + unCover.setName(unCoverName); coverList.add(unCover); return coverList; }