summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Campbell <ryanjcampbell@google.com>2017-07-21 14:18:31 -0700
committerRyan Campbell <ryanjcampbell@google.com>2017-07-24 21:47:35 +0000
commitb91183d612cd5c54ad8c8d1bdcca91a05362c956 (patch)
tree7b0847fa12d3ea06fac5ae7694e5d5fff29da6ff
parent22d4362e734ae5737b7384d6ba68f0ba8dd01405 (diff)
downloaddashboard-b91183d612cd5c54ad8c8d1bdcca91a05362c956.tar.gz
Add more searching functionality in release page.
Add additional filtering options so that the user can find test plan runs more effectively. The user can also search by pass/fail count (e.g. to find the last green build), host name, and VTS build. Bug: 34691716 Test: staging Change-Id: I3d666b1469e6462239f2cabd45467e1f6dc4a3a2
-rw-r--r--src/main/java/com/android/vts/servlet/ShowPlanReleaseServlet.java7
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_plan_release.jsp10
2 files changed, 16 insertions, 1 deletions
diff --git a/src/main/java/com/android/vts/servlet/ShowPlanReleaseServlet.java b/src/main/java/com/android/vts/servlet/ShowPlanReleaseServlet.java
index 109d881..9a7d59d 100644
--- a/src/main/java/com/android/vts/servlet/ShowPlanReleaseServlet.java
+++ b/src/main/java/com/android/vts/servlet/ShowPlanReleaseServlet.java
@@ -144,13 +144,14 @@ public class ShowPlanReleaseServlet extends BaseServlet {
FilterUtil.getTimeFilter(
testPlanKey, TestPlanRunEntity.KIND, startTime, endTime, typeFilter);
Map<String, Object> parameterMap = request.getParameterMap();
+ Filter userTestFilter = FilterUtil.getUserTestFilter(parameterMap);
Filter userDeviceFilter = FilterUtil.getUserDeviceFilter(parameterMap);
List<TestPlanRunMetadata> testPlanRuns = new ArrayList<>();
Map<Key, TestPlanRunMetadata> testPlanMap = new HashMap<>();
Key minKey = null;
Key maxKey = null;
- if (userDeviceFilter == null) {
+ if (userTestFilter == null && userDeviceFilter == null) {
Query testPlanRunQuery =
new Query(TestPlanRunEntity.KIND)
.setAncestor(testPlanKey)
@@ -180,6 +181,10 @@ public class ShowPlanReleaseServlet extends BaseServlet {
}
}
} else {
+ if (userTestFilter != null) {
+ testPlanRunFilter =
+ Query.CompositeFilterOperator.and(userTestFilter, testPlanRunFilter);
+ }
List<Key> gets =
FilterUtil.getMatchingKeys(
testPlanKey,
diff --git a/src/main/webapp/WEB-INF/jsp/show_plan_release.jsp b/src/main/webapp/WEB-INF/jsp/show_plan_release.jsp
index b202d04..b259c8a 100644
--- a/src/main/webapp/WEB-INF/jsp/show_plan_release.jsp
+++ b/src/main/webapp/WEB-INF/jsp/show_plan_release.jsp
@@ -47,6 +47,16 @@
corpus: ${devices}
}, ${device});
search.addFilter('Device Build ID', 'deviceBuildId', {}, ${deviceBuildId});
+ search.addFilter('Test Build ID', 'testBuildId', {}, ${testBuildId});
+ search.addFilter('Host', 'hostname', {}, ${hostname});
+ search.addFilter('Passing Count', 'passing', {
+ type: 'number',
+ width: 's2'
+ }, ${passing});
+ search.addFilter('Non-Passing Count', 'nonpassing', {
+ type: 'number',
+ width: 's2'
+ }, ${nonpassing});
search.addRunTypeCheckboxes(${showPresubmit}, ${showPostsubmit});
search.display();
$('#release-container').showPlanRuns(${planRuns});