summaryrefslogtreecommitdiff
path: root/src/main/webapp
diff options
context:
space:
mode:
authorYoung Gyu Park <younggyu@google.com>2018-05-23 19:50:18 +0900
committerYoung Gyu Park <younggyu@google.com>2018-05-24 10:15:20 +0900
commitcbc85bb9ca316948975bba087be530286dd6803e (patch)
treefb6115146a90d012065b326c99dd2d40b3c8b8b1 /src/main/webapp
parent3b8326d5bd720dc18a9ac3e50847f858df062b61 (diff)
downloaddashboard-cbc85bb9ca316948975bba087be530286dd6803e.tar.gz
% format cts-on-gsi
Test: go/vts-web/show_plan_release?plan=cts-on-gsi&type=suite&testCategoryType=4 Bug: 79972525 Change-Id: Ia284e34532787d250990ec4432407291e3f33f28
Diffstat (limited to 'src/main/webapp')
-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>
)