summaryrefslogtreecommitdiff
path: root/src/main/webapp/WEB-INF/jsp/show_suite_release.jsp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/webapp/WEB-INF/jsp/show_suite_release.jsp')
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_suite_release.jsp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/main/webapp/WEB-INF/jsp/show_suite_release.jsp b/src/main/webapp/WEB-INF/jsp/show_suite_release.jsp
index da9d8da..3efdc9f 100644
--- a/src/main/webapp/WEB-INF/jsp/show_suite_release.jsp
+++ b/src/main/webapp/WEB-INF/jsp/show_suite_release.jsp
@@ -137,12 +137,21 @@
">
<c:out value="${testSuiteResultEntity.passedTestCaseCount}"></c:out>/<c:out value="${testSuiteResultEntity.passedTestCaseCount + testSuiteResultEntity.failedTestCaseCount}"></c:out>
(
+ <c:set var="integerVal" value="${fn:substringBefore(testSuiteResultEntity.passedTestCaseRatio, '.')}" />
<c:choose>
- <c:when test="${testSuiteResultEntity.passedTestCaseCount eq 0 and testSuiteResultEntity.failedTestCaseCount eq 0}">
- <fmt:formatNumber type="percent" minFractionDigits="2" maxFractionDigits="2" value="0" />
+ <c:when test="${integerVal eq '100'}">
+ 100%
</c:when>
<c:otherwise>
- <fmt:formatNumber type="percent" minFractionDigits="2" maxFractionDigits="2" value="${testSuiteResultEntity.passedTestCaseCount / (testSuiteResultEntity.passedTestCaseCount + testSuiteResultEntity.failedTestCaseCount)}" />
+ <c:set var="decimalVal" value="${fn:substring(fn:substringAfter(testSuiteResultEntity.passedTestCaseRatio, '.'), 0, 2)}" />
+ <c:choose>
+ <c:when test="${decimalVal eq '00'}">
+ <c:out value="${integerVal}"></c:out>%
+ </c:when>
+ <c:otherwise>
+ <c:out value="${integerVal}"></c:out>.<c:out value="${decimalVal}"></c:out>%
+ </c:otherwise>
+ </c:choose>
</c:otherwise>
</c:choose>
)