summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoung Gyu Park <younggyu@google.com>2018-04-26 15:53:41 +0900
committerYoung Gyu Park <younggyu@google.com>2018-04-26 16:48:53 +0900
commit70a3289d7406eb3fc7ae8a7abc6121bfe7dca1b1 (patch)
treecb8b75003dc59f6542fa1ed7bdfdc26fd844490d
parent7fd2dc253e185933d762b1b5f437023c4149d768 (diff)
downloaddashboard-70a3289d7406eb3fc7ae8a7abc6121bfe7dca1b1.tar.gz
UI change for test suite page
Test: go/vts-web-staging/show_plan_release?plan=vts&type=suite&page=1 Bug: 78576139 Change-Id: I0f0c2d1acd4d20e7f1551706bd3d06aa8fa5cb13
-rw-r--r--src/main/java/com/android/vts/entity/TestSuiteResultEntity.java16
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_suite_release.jsp12
2 files changed, 21 insertions, 7 deletions
diff --git a/src/main/java/com/android/vts/entity/TestSuiteResultEntity.java b/src/main/java/com/android/vts/entity/TestSuiteResultEntity.java
index 7355f7c..1948b57 100644
--- a/src/main/java/com/android/vts/entity/TestSuiteResultEntity.java
+++ b/src/main/java/com/android/vts/entity/TestSuiteResultEntity.java
@@ -28,12 +28,14 @@ import lombok.NoArgsConstructor;
import lombok.Setter;
import java.time.Instant;
+import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import java.util.stream.Stream;
import static com.googlecode.objectify.ObjectifyService.ofy;
@@ -70,8 +72,11 @@ public class TestSuiteResultEntity {
/** Test Suite infra log path field */
@Getter @Setter String infraLogPath;
+ /** Test Suite device name field */
+ @Index @Getter @Setter String deviceName;
+
/** Test Suite host name field */
- @Getter @Setter String hostName;
+ @Index @Getter @Setter String hostName;
/** Test Suite plan field */
@Index @Getter @Setter String suitePlan;
@@ -168,6 +173,9 @@ public class TestSuiteResultEntity {
this.passedTestCaseRatio = passedTestCaseCount / totalTestCaseCount * 100;
}
+ if (!this.buildVendorFingerprint.isEmpty()) {
+ this.deviceName = this.getDeviceNameFromVendorFpt();
+ }
this.groupType = this.getGroupType();
}
@@ -181,6 +189,12 @@ public class TestSuiteResultEntity {
return ofy().load().type(this.getClass()).project("suitePlan").distinct(true).list();
}
+ public String getDeviceNameFromVendorFpt() {
+ String deviceName =
+ Stream.of(this.buildVendorFingerprint.split("/")).skip(1).findFirst().orElse("");
+ return deviceName;
+ }
+
private String getNormalizedVersion(String fingerprint) {
Map<String, Pattern> partternMap =
new HashMap<String, Pattern>() {
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 8cf9500..5c7f041 100644
--- a/src/main/webapp/WEB-INF/jsp/show_suite_release.jsp
+++ b/src/main/webapp/WEB-INF/jsp/show_suite_release.jsp
@@ -138,15 +138,15 @@
<c:out value="${testSuiteResultEntity.passedTestCaseCount}"></c:out>/<c:out value="${testSuiteResultEntity.passedTestCaseCount + testSuiteResultEntity.failedTestCaseCount}"></c:out>
</span>
<c:if test="${!testSuiteResultEntity.bootSuccess}">
- <span class="indicator right center red">
- Infra Error
- </span>
+ <span class="indicator right center" style="min-width: 0px; padding: 0 2px;"></span>
+ <span class="indicator right center red">Boot Error</span>
</c:if>
</div>
<div class="col s5">
<span class="suite-test-run-metadata">
<b>Suite Build Number: </b><c:out value="${testSuiteResultEntity.suiteBuildNumber}"></c:out><br>
<b>VTS Build: </b><c:out value="${testSuiteResultEntity.buildId}"></c:out><br>
+ <b>Device Name: </b><c:out value="${testSuiteResultEntity.deviceName}"></c:out><br>
</span>
</div>
<div class="col s7">
@@ -158,9 +158,9 @@
<div class="col s12">
<span class="suite-test-run-metadata">
<b>Result Log Path: </b>
- <c:set var="logPath" value="${fn:replace(testSuiteResultEntity.resultPath, 'gs://vts-report/', '')}"/>
- <a href="show_gcs_log?path=${logPath}">
- <c:out value="${logPath}"></c:out>
+ <c:set var="resultLogPath" value="${fn:replace(testSuiteResultEntity.resultPath, 'gs://vts-report/', '')}"/>
+ <a href="show_gcs_log?path=${resultLogPath}">
+ <c:out value="${resultLogPath}"></c:out>
</a>
<br>
<b>Infra Log Path: </b>