summaryrefslogtreecommitdiff
path: root/src/main/webapp
diff options
context:
space:
mode:
authorRyan Campbell <ryanjcampbell@google.com>2017-07-17 11:07:20 -0700
committerRyan Campbell <ryanjcampbell@google.com>2017-07-21 10:51:13 -0700
commitce3ed4a042bcd9d4919480283717fb8a6b109704 (patch)
tree7057e43765c7a3ebc7c28ebffc20112bc137101b /src/main/webapp
parent1b06ae8e8fa9ac62c8751d141aa5fe5e7945205d (diff)
downloaddashboard-ce3ed4a042bcd9d4919480283717fb8a6b109704.tar.gz
Implement profiling filtering on overview UI.
Add support for the universal search box on the profiling overview page and hook into the new back-end for storing profiling summaries instead of querying the database live. Test: live on staging Bug: 63760542 Change-Id: I871a4d248418d4f915a0de46125c20f7b3f69c59
Diffstat (limited to 'src/main/webapp')
-rw-r--r--src/main/webapp/WEB-INF/datastore-indexes.xml7
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_profiling_overview.jsp26
2 files changed, 30 insertions, 3 deletions
diff --git a/src/main/webapp/WEB-INF/datastore-indexes.xml b/src/main/webapp/WEB-INF/datastore-indexes.xml
index cef9c54..f8d66c7 100644
--- a/src/main/webapp/WEB-INF/datastore-indexes.xml
+++ b/src/main/webapp/WEB-INF/datastore-indexes.xml
@@ -74,4 +74,9 @@
<property name="startTimestamp" direction="desc"/>
</datastore-index>
-</datastore-indexes> \ No newline at end of file
+ <datastore-index kind="ProfilingPointSummary" ancestor="true" source="manual">
+ <property name="branch" direction="asc"/>
+ <property name="buildFlavor" direction="asc"/>
+ <property name="startTime" direction="asc"/>
+ </datastore-index>
+</datastore-indexes>
diff --git a/src/main/webapp/WEB-INF/jsp/show_profiling_overview.jsp b/src/main/webapp/WEB-INF/jsp/show_profiling_overview.jsp
index 28f8b48..21e251e 100644
--- a/src/main/webapp/WEB-INF/jsp/show_profiling_overview.jsp
+++ b/src/main/webapp/WEB-INF/jsp/show_profiling_overview.jsp
@@ -21,17 +21,30 @@
<%@ include file="header.jsp" %>
<link type='text/css' href='/css/datepicker.css' rel='stylesheet'>
<link type='text/css' href='/css/show_profiling_overview.css' rel='stylesheet'>
- <link rel='stylesheet' href='https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.0/jquery-ui.css'>
+ <link rel='stylesheet' href='/css/search_header.css'>
<script src='https://www.gstatic.com/external_hosted/moment/min/moment-with-locales.min.js'></script>
+ <script src='js/search_header.js'></script>
<script src='js/time.js'></script>
<script type='text/javascript' src='https://www.gstatic.com/charts/loader.js'></script>
- <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js'></script>
<body>
<script type='text/javascript'>
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawAllPlots);
var plots = ${plots};
+ var search;
+
+ $(document).ready(function() {
+ search = $('#filter-bar').createSearchHeader(
+ 'Profiling Analysis', '', refresh);
+ search.addFilter('Branch', 'branch', {
+ corpus: ${branches}
+ }, ${branch});
+ search.addFilter('Device', 'device', {
+ corpus: ${devices}
+ }, ${device});
+ search.display();
+ });
/**
* Draw a box plot.
@@ -138,8 +151,17 @@
drawBoxPlot(plot.append('<div></div>'), g);
});
}
+
+ // refresh the page to see the runs matching the specified filter
+ function refresh() {
+ if($(this).hasClass('disabled')) return;
+ var link = '${pageContext.request.contextPath}' +
+ '/show_profiling_overview?testName=${testName}' + search.args();
+ window.open(link,'_self');
+ }
</script>
<div class='container wide'>
+ <div id='filter-bar' class='row'></div>
<div id='profiling-container'>
</div>
</div>