1<%-- 2 ~ Copyright (c) 2017 Google Inc. All Rights Reserved. 3 ~ 4 ~ Licensed under the Apache License, Version 2.0 (the "License"); you 5 ~ may not use this file except in compliance with the License. You may 6 ~ obtain a copy of the License at 7 ~ 8 ~ http://www.apache.org/licenses/LICENSE-2.0 9 ~ 10 ~ Unless required by applicable law or agreed to in writing, software 11 ~ distributed under the License is distributed on an "AS IS" BASIS, 12 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 ~ implied. See the License for the specific language governing 14 ~ permissions and limitations under the License. 15 --%> 16<%@ page contentType='text/html;charset=UTF-8' language='java' %> 17<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %> 18<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%> 19 20<html> 21 <%@ include file="header.jsp" %> 22 <link rel='stylesheet' href='/css/show_plan_release.css'> 23 <link rel='stylesheet' href='/css/plan_runs.css'> 24 <link rel='stylesheet' href='/css/search_header.css'> 25 <script src='https://www.gstatic.com/external_hosted/moment/min/moment-with-locales.min.js'></script> 26 <script src='js/time.js'></script> 27 <script src='js/plan_runs.js'></script> 28 <script src='js/search_header.js'></script> 29 <script type='text/javascript'> 30 var search; 31 $(document).ready(function() { 32 // disable buttons on load 33 if (!${hasNewer}) { 34 $('#newer-button').toggleClass('disabled'); 35 } 36 if (!${hasOlder}) { 37 $('#older-button').toggleClass('disabled'); 38 } 39 40 $('#newer-button').click(prev); 41 $('#older-button').click(next); 42 search = $('#filter-bar').createSearchHeader('Plan: ', '${plan}', refresh); 43 search.addFilter('Branch', 'branch', { 44 corpus: ${branches} 45 }, ${branch}); 46 search.addFilter('Device', 'device', { 47 corpus: ${devices} 48 }, ${device}); 49 search.addFilter('Device Build ID', 'deviceBuildId', {}, ${deviceBuildId}); 50 search.addFilter('Test Build ID', 'testBuildId', {}, ${testBuildId}); 51 search.addFilter('Host', 'hostname', {}, ${hostname}); 52 search.addFilter('Passing Count', 'passing', { 53 validate: 'inequality', 54 width: 's2' 55 }, ${passing}); 56 search.addFilter('Non-Passing Count', 'nonpassing', { 57 validate: 'inequality', 58 width: 's2' 59 }, ${nonpassing}); 60 search.addRunTypeCheckboxes(${showPresubmit}, ${showPostsubmit}); 61 search.display(); 62 $('#release-container').showPlanRuns(${planRuns}); 63 }); 64 65 // view older data 66 function next() { 67 if($(this).hasClass('disabled')) return; 68 var endTime = ${startTime}; 69 var link = '${pageContext.request.contextPath}' + 70 '/show_plan_release?plan=${plan}&endTime=' + endTime + 71 search.args(); 72 if (${unfiltered}) { 73 link += '&unfiltered='; 74 } 75 window.open(link,'_self'); 76 } 77 78 // view newer data 79 function prev() { 80 if($(this).hasClass('disabled')) return; 81 var startTime = ${endTime}; 82 var link = '${pageContext.request.contextPath}' + 83 '/show_plan_release?plan=${plan}&startTime=' + startTime + 84 search.args(); 85 if (${unfiltered}) { 86 link += '&unfiltered='; 87 } 88 window.open(link,'_self'); 89 } 90 91 // refresh the page to see the runs matching the specified filter 92 function refresh() { 93 var link = '${pageContext.request.contextPath}' + 94 '/show_plan_release?plan=${plan}' + search.args(); 95 if (${unfiltered}) { 96 link += '&unfiltered='; 97 } 98 window.open(link,'_self'); 99 } 100 </script> 101 102 <body> 103 <div class='wide container'> 104 <div id='filter-bar'></div> 105 <div class='row' id='release-container'></div> 106 <div id='newer-wrapper' class='page-button-wrapper fixed-action-btn'> 107 <a id='newer-button' class='btn-floating btn red waves-effect'> 108 <i class='large material-icons'>keyboard_arrow_left</i> 109 </a> 110 </div> 111 <div id='older-wrapper' class='page-button-wrapper fixed-action-btn'> 112 <a id='older-button' class='btn-floating btn red waves-effect'> 113 <i class='large material-icons'>keyboard_arrow_right</i> 114 </a> 115 </div> 116 </div> 117 <%@ include file="footer.jsp" %> 118 </body> 119</html> 120