summaryrefslogtreecommitdiff
path: root/src/main/webapp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/webapp')
-rw-r--r--src/main/webapp/WEB-INF/appengine-web.xml24
-rw-r--r--src/main/webapp/WEB-INF/cron.xml42
-rw-r--r--src/main/webapp/WEB-INF/datastore-indexes.xml176
-rw-r--r--src/main/webapp/WEB-INF/jsp/auth_error.jsp38
-rw-r--r--src/main/webapp/WEB-INF/jsp/dashboard_main.jsp351
-rw-r--r--src/main/webapp/WEB-INF/jsp/error_msg.jsp38
-rw-r--r--src/main/webapp/WEB-INF/jsp/footer.jsp25
-rw-r--r--src/main/webapp/WEB-INF/jsp/header.jsp70
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_coverage.jsp210
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_coverage_overview.jsp505
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_gcs_log.jsp188
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_graph.jsp292
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_green_plan_release.jsp104
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_green_suite_release.jsp101
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_performance_digest.jsp100
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_plan_release.jsp119
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_plan_run.jsp236
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_profiling_list.jsp44
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_profiling_overview.jsp172
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_release.jsp80
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_suite_release.jsp362
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_table.jsp338
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_test_acknowledgments.jsp52
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_tree.jsp323
-rw-r--r--src/main/webapp/WEB-INF/queue.xml35
-rw-r--r--src/main/webapp/WEB-INF/web.xml363
-rw-r--r--src/main/webapp/css/common.css41
-rw-r--r--src/main/webapp/css/dashboard_main.css111
-rw-r--r--src/main/webapp/css/datepicker.css70
-rw-r--r--src/main/webapp/css/navbar.css68
-rw-r--r--src/main/webapp/css/plan_runs.css36
-rw-r--r--src/main/webapp/css/search_header.css83
-rw-r--r--src/main/webapp/css/show_coverage.css117
-rw-r--r--src/main/webapp/css/show_gcs_log.css25
-rw-r--r--src/main/webapp/css/show_graph.css70
-rw-r--r--src/main/webapp/css/show_performance_digest.css82
-rw-r--r--src/main/webapp/css/show_plan_release.css23
-rw-r--r--src/main/webapp/css/show_profiling_overview.css23
-rw-r--r--src/main/webapp/css/show_release.css40
-rw-r--r--src/main/webapp/css/show_table.css137
-rw-r--r--src/main/webapp/css/show_test_acknowledgments.css21
-rw-r--r--src/main/webapp/css/show_test_runs_common.css156
-rw-r--r--src/main/webapp/css/test_acknowledgments.css145
-rw-r--r--src/main/webapp/css/test_results.css117
-rw-r--r--src/main/webapp/js/common.js120
-rw-r--r--src/main/webapp/js/plan_runs.js63
-rw-r--r--src/main/webapp/js/search_header.js251
-rw-r--r--src/main/webapp/js/test_acknowledgments.js439
-rw-r--r--src/main/webapp/js/test_results.js349
-rw-r--r--src/main/webapp/js/time.js65
50 files changed, 0 insertions, 7040 deletions
diff --git a/src/main/webapp/WEB-INF/appengine-web.xml b/src/main/webapp/WEB-INF/appengine-web.xml
deleted file mode 100644
index 714aa54..0000000
--- a/src/main/webapp/WEB-INF/appengine-web.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright 2016 Google Inc.
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
- <threadsafe>true</threadsafe>
- <sessions-enabled>true</sessions-enabled>
- <runtime>java8</runtime>
- <instance-class>F4_1G</instance-class>
-
- <system-properties>
- </system-properties>
-
-</appengine-web-app> \ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/cron.xml b/src/main/webapp/WEB-INF/cron.xml
deleted file mode 100644
index 78beefb..0000000
--- a/src/main/webapp/WEB-INF/cron.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright 2016 Google Inc. All Rights Reserved.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<cronentries>
- <cron>
- <url>/cron/vts_performance_job</url>
- <description>Send daily performance digests.</description>
- <schedule>every day 07:30</schedule>
- <timezone>America/Los_Angeles</timezone>
- </cron>
- <cron>
- <url>/cron/vts_inactivity_job</url>
- <description>Send daily inactivity warnings.</description>
- <schedule>every day 07:30</schedule>
- <timezone>America/Los_Angeles</timezone>
- </cron>
- <cron>
- <url>/cron/test_suite_report_gcs_monitor</url>
- <description>Process suite test report from gcs.</description>
- <schedule>every 5 mins</schedule>
- <timezone>America/Los_Angeles</timezone>
- </cron>
- <cron>
- <url>/cron/vts_spreadsheet_sync_job</url>
- <description>Sync google spreadsheet data with datastore entity.</description>
- <schedule>every day 00:30</schedule>
- <timezone>America/Los_Angeles</timezone>
- </cron>
-</cronentries> \ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/datastore-indexes.xml b/src/main/webapp/WEB-INF/datastore-indexes.xml
deleted file mode 100644
index e4f4a10..0000000
--- a/src/main/webapp/WEB-INF/datastore-indexes.xml
+++ /dev/null
@@ -1,176 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright 2017 Google Inc.
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<datastore-indexes autoGenerate="true">
-
- <datastore-index kind="TestPlanRun" ancestor="true" source="manual">
- <property name="type" direction="asc"/>
- <property name="__key__" direction="desc"/>
- </datastore-index>
-
- <datastore-index kind="TestPlanRun" ancestor="true" source="manual">
- <property name="type" direction="asc"/>
- <property name="__key__" direction="asc"/>
- </datastore-index>
-
- <datastore-index kind="TestPlanRun" ancestor="true" source="manual">
- <property name="__key__" direction="desc"/>
- </datastore-index>
-
- <datastore-index kind="TestPlanRun" ancestor="true" source="manual">
- <property name="passCount" direction="asc"/>
- </datastore-index>
-
- <datastore-index kind="TestPlanRun" ancestor="true" source="manual">
- <property name="failCount" direction="asc"/>
- </datastore-index>
-
- <datastore-index kind="TestStatus" ancestor="false" source="manual">
- <property name="failCount" direction="asc"/>
- <property name="passCount" direction="asc"/>
- </datastore-index>
-
- <datastore-index kind="TestRun" ancestor="true" source="manual">
- <property name="type" direction="asc"/>
- <property name="__key__" direction="desc"/>
- </datastore-index>
-
- <datastore-index kind="TestRun" ancestor="true" source="manual">
- <property name="type" direction="asc"/>
- <property name="__key__" direction="asc"/>
- </datastore-index>
-
- <datastore-index kind="TestRun" ancestor="true" source="manual">
- <property name="__key__" direction="desc"/>
- </datastore-index>
-
- <datastore-index kind="TestRun" ancestor="true" source="manual">
- <property name="hasCoverage" direction="asc"/>
- <property name="__key__" direction="desc"/>
- </datastore-index>
-
- <datastore-index kind="TestRun" ancestor="true" source="manual">
- <property name="passCount" direction="asc"/>
- </datastore-index>
-
- <datastore-index kind="TestRun" ancestor="true" source="manual">
- <property name="failCount" direction="asc"/>
- </datastore-index>
-
- <datastore-index kind="TestRun" ancestor="false" source="manual">
- <property name="testName" direction="asc"/>
- <property name="startTimestamp" direction="asc"/>
- </datastore-index>
-
- <datastore-index kind="TestRun" ancestor="false" source="manual">
- <property name="testName" direction="asc"/>
- <property name="startTimestamp" direction="desc"/>
- </datastore-index>
-
- <datastore-index kind="TestRun" ancestor="false" source="manual">
- <property name="testName" direction="asc"/>
- <property name="type" direction="asc"/>
- <property name="startTimestamp" direction="asc"/>
- </datastore-index>
-
- <datastore-index kind="TestRun" ancestor="false" source="manual">
- <property name="testName" direction="asc"/>
- <property name="type" direction="asc"/>
- <property name="startTimestamp" direction="desc"/>
- </datastore-index>
-
- <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-index kind="DeviceInfo" ancestor="true" source="manual">
- <property name="branch" direction="asc"/>
- <property name="buildFlavor" direction="asc"/>
- </datastore-index>
-
- <datastore-index kind="TestSuiteFileEntity" ancestor="false" source="manual">
- <property name="day" direction="asc"/>
- <property name="month" direction="asc"/>
- <property name="year" direction="asc"/>
- </datastore-index>
-
- <datastore-index kind="TestSuiteResultEntity" ancestor="false" source="manual">
- <property name="branch" direction="asc"/>
- <property name="__key__" direction="desc"/>
- </datastore-index>
-
- <datastore-index kind="TestSuiteResultEntity" ancestor="false" source="manual">
- <property name="hostName" direction="asc"/>
- <property name="__key__" direction="desc"/>
- </datastore-index>
-
- <datastore-index kind="TestSuiteResultEntity" ancestor="false" source="manual">
- <property name="buildId" direction="asc"/>
- <property name="__key__" direction="desc"/>
- </datastore-index>
-
- <datastore-index kind="TestSuiteResultEntity" ancestor="false" source="manual">
- <property name="deviceName" direction="asc"/>
- <property name="__key__" direction="desc"/>
- </datastore-index>
-
- <datastore-index kind="TestSuiteResultEntity" ancestor="false" source="manual">
- <property name="testType" direction="asc"/>
- <property name="suitePlan" direction="asc"/>
- <property name="__key__" direction="desc"/>
- </datastore-index>
-
- <datastore-index kind="TestSuiteResultEntity" ancestor="false" source="manual">
- <property name="suitePlan" direction="asc"/>
- <property name="testTypeIndex.TOT" direction="asc"/>
- <property name="__key__" direction="desc"/>
- </datastore-index>
-
- <datastore-index kind="TestSuiteResultEntity" ancestor="false" source="manual">
- <property name="suitePlan" direction="asc"/>
- <property name="testTypeIndex.OTA" direction="asc"/>
- <property name="__key__" direction="desc"/>
- </datastore-index>
-
- <datastore-index kind="TestSuiteResultEntity" ancestor="false" source="manual">
- <property name="suitePlan" direction="asc"/>
- <property name="testTypeIndex.SIGNED" direction="asc"/>
- <property name="__key__" direction="desc"/>
- </datastore-index>
-
- <datastore-index kind="TestSuiteResultEntity" ancestor="false" source="manual">
- <property name="suitePlan" direction="asc"/>
- <property name="branch" direction="asc"/>
- <property name="target" direction="asc"/>
- </datastore-index>
-
- <datastore-index kind="TestSuiteResultEntity" ancestor="false" source="manual">
- <property name="branch" direction="asc"/>
- <property name="failedTestCaseCount" direction="asc"/>
- <property name="suitePlan" direction="asc"/>
- <property name="target" direction="asc"/>
- <property name="__key__" direction="asc"/>
- <property name="buildId" direction="asc"/>
- </datastore-index>
-
- <datastore-index kind="TestSuiteResultEntity" ancestor="false" source="manual">
- <property name="branch" direction="asc"/>
- <property name="suitePlan" direction="asc"/>
- <property name="target" direction="asc"/>
- <property name="__key__" direction="asc"/>
- <property name="buildId" direction="asc"/>
- </datastore-index>
-</datastore-indexes>
diff --git a/src/main/webapp/WEB-INF/jsp/auth_error.jsp b/src/main/webapp/WEB-INF/jsp/auth_error.jsp
deleted file mode 100644
index 43bd9f3..0000000
--- a/src/main/webapp/WEB-INF/jsp/auth_error.jsp
+++ /dev/null
@@ -1,38 +0,0 @@
-<%--
- ~ Copyright (c) 2018 Google Inc. All Rights Reserved.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-
-<html>
- <link rel='stylesheet' href='/css/dashboard_main.css'>
- <%@ include file='header.jsp' %>
- <body>
-
- <div class='container wide'>
-
- <div class="card-panel">
- <span class="red-text text-darken-2">
- <h3> Sorry! you got a wrong email account. </h3>
- <br/>
- You have to register an account to access dashboard.
- </span>
- </div>
-
- </div>
- <%@ include file='footer.jsp' %>
- </body>
-</html>
diff --git a/src/main/webapp/WEB-INF/jsp/dashboard_main.jsp b/src/main/webapp/WEB-INF/jsp/dashboard_main.jsp
deleted file mode 100644
index 71f6679..0000000
--- a/src/main/webapp/WEB-INF/jsp/dashboard_main.jsp
+++ /dev/null
@@ -1,351 +0,0 @@
-<%--
- ~ Copyright (c) 2016 Google Inc. All Rights Reserved.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-
-<html>
- <link rel='stylesheet' href='/css/dashboard_main.css'>
- <%@ include file='header.jsp' %>
- <body>
- <script>
- var allTests = ${allTestsJson};
- var testSet = new Set(allTests);
- var subscriptionMap = ${subscriptionMapJson};
-
- var addFavorite = function() {
- if ($(this).hasClass('disabled')) {
- return;
- }
- var test = $('#input-box').val();
- if (!testSet.has(test) || test in subscriptionMap) {
- return;
- }
- $('#add-button').addClass('disabled');
- $.post('/api/favorites', { testName: test}).then(function(data) {
- if (!data.key) {
- return;
- }
- subscriptionMap[test] = data.key;
- var wrapper = $('<div></div>');
- var a = $('<a></a>')
- .attr('href', '${resultsUrl}?testName=' + test);
- var div = $('<div class="col s11 card hoverable option"></div>');
- div.addClass('valign-wrapper waves-effect');
- div.appendTo(a);
- var span = $('<span class="entry valign"></span>').text(test);
- span.appendTo(div);
- a.appendTo(wrapper);
-
- var btnContainer = $('<div class="col s1 center btn-container"></div>');
- var silence = $('<a class="col s6 btn-flat notification-button active"></a>');
- silence.append('<i class="material-icons">notifications_active</i>');
- silence.attr('test', test);
- silence.attr('title', 'Disable notifications');
- silence.appendTo(btnContainer);
- silence.click(toggleNotifications);
-
- var clear = $('<a class="col s6 btn-flat remove-button"></a>');
- clear.append('<i class="material-icons">clear</i>');
- clear.attr('test', test);
- clear.attr('title', 'Remove favorite');
- clear.appendTo(btnContainer);
- clear.click(removeFavorite);
-
- btnContainer.appendTo(wrapper);
-
- wrapper.prependTo('#options').hide()
- .slideDown(150);
- $('#input-box').val(null);
- Materialize.updateTextFields();
- }).always(function() {
- $('#add-button').removeClass('disabled');
- });
- }
-
- var toggleNotifications = function() {
- var self = $(this);
- if (self.hasClass('disabled')) {
- return;
- }
- self.addClass('disabled');
- var test = self.attr('test');
- if (!(test in subscriptionMap)) {
- return;
- }
- var muteStatus = self.hasClass('active');
- var element = self;
- $.post('/api/favorites', { userFavoritesKey: subscriptionMap[test], muteNotifications: muteStatus}).then(function(data) {
- element = self.clone();
- if (element.hasClass('active')) {
- element.find('i').text('notifications_off')
- element.removeClass('active');
- element.addClass('inactive');
- element.attr('title', 'Enable notifications');
- } else {
- element.find('i').text('notifications_active')
- element.removeClass('inactive');
- element.addClass('active');
- element.attr('title', 'Disable notifications');
- }
- element.click(toggleNotifications);
- self.replaceWith(function() {
- return element;
- });
- }).always(function() {
- element.removeClass('disabled');
- });
- }
-
- var removeFavorite = function() {
- var self = $(this);
- if (self.hasClass('disabled')) {
- return;
- }
- var test = self.attr('test');
- if (!(test in subscriptionMap)) {
- return;
- }
- self.addClass('disabled');
- $.ajax({
- url: '/api/favorites/' + subscriptionMap[test],
- type: 'DELETE'
- }).always(function() {
- self.removeClass('disabled');
- }).then(function() {
- delete subscriptionMap[test];
- self.parent().parent().slideUp(150, function() {
- self.remove();
- });
- });
- }
-
- var addFavoriteButton = function() {
- var self = $(this);
- var test = self.attr('test');
-
- $.post('/api/favorites', { testName: test}).then(function(data) {
- if (data.key) {
- subscriptionMap[test] = data.key;
-
- self.children().text("star");
- self.switchClass("add-fav-button", "min-fav-button", 0);
-
- self.off('click', addFavoriteButton);
- self.on('click', removeFavoriteButton);
- }
- })
- .fail(function() {
- alert( "Error occurred on registering your favorite test case!" );
- });
- }
-
- var removeFavoriteButton = function() {
- var self = $(this);
- var test = self.attr('test');
-
- $.ajax({
- url: '/api/favorites/' + subscriptionMap[test],
- type: 'DELETE'
- }).then(function() {
- delete subscriptionMap[test];
-
- self.children().text("star_border");
- self.switchClass("min-fav-button", "add-fav-button", 0);
-
- self.off('click', removeFavoriteButton);
- self.on('click', addFavoriteButton);
- });
- }
-
- $.widget('custom.sizedAutocomplete', $.ui.autocomplete, {
- _resizeMenu: function() {
- this.menu.element.outerWidth($('#input-box').width());
- }
- });
-
- $(function() {
- $('#input-box').sizedAutocomplete({
- source: allTests,
- classes: {
- 'ui-autocomplete': 'card'
- }
- });
-
- $('#input-box').keyup(function(event) {
- if (event.keyCode == 13) { // return button
- $('#add-button').click();
- }
- });
-
- $('.remove-button').click(removeFavorite);
- $('.notification-button').click(toggleNotifications);
- $('#add-button').click(addFavorite);
-
- $('.add-fav-button').click(addFavoriteButton);
-
- $('.min-fav-button').click(removeFavoriteButton);
-
- $('#favoritesLink').click(function() {
- window.open('/', '_self');
- });
- $('#allLink').click(function() {
- window.open('/?showAll=true', '_self');
- });
- $('#acksLink').click(function() {
- window.open('/show_test_acknowledgments', '_self');
- });
- });
- </script>
- <div class='container wide'>
-
- <c:if test="${!showAll}">
- <ul id="guide_collapsible" class="collapsible" data-collapsible="accordion">
- <li>
- <div class="collapsible-header">
- <i class="material-icons">library_books</i>
- Notice
- <span class="new badge right" style="position: inherit;">1</span>
- </div>
- <div class="collapsible-body">
- <div class='row'>
- <div class='col s12' style="margin: 15px 0px 0px 30px;">
- <c:choose>
- <c:when test="${fn:endsWith(serverName, 'googleplex.com')}">
- <c:set var="dataVersion" scope="page" value="new"/>
- <c:choose>
- <c:when test="${fn:startsWith(serverName, 'android-vts-internal')}">
- <c:set var="dataLink" scope="page" value="https://android-vts.appspot.com"/>
- </c:when>
- <c:when test="${fn:startsWith(serverName, 'android-vts-staging')}">
- <c:set var="dataLink" scope="page" value="https://android-vts-staging.appspot.com"/>
- </c:when>
- <c:otherwise>
- <c:set var="dataLink" scope="page" value="https://android-vts-staging.appspot.com"/>
- </c:otherwise>
- </c:choose>
- </c:when>
- <c:when test="${fn:endsWith(serverName, 'appspot.com')}">
- <c:set var="dataVersion" scope="page" value="previous"/>
- <c:choose>
- <c:when test="${fn:startsWith(serverName, 'android-vts-staging')}">
- <c:set var="dataLink" scope="page" value="https://android-vts-staging.googleplex.com"/>
- </c:when>
- <c:when test="${fn:startsWith(serverName, 'android-vts')}">
- <c:set var="dataLink" scope="page" value="https://android-vts-internal.googleplex.com"/>
- </c:when>
- <c:otherwise>
- <c:set var="dataLink" scope="page" value="https://android-vts-staging.googleplex.com"/>
- </c:otherwise>
- </c:choose>
- </c:when>
- <c:otherwise>
- <c:set var="dataVersion" scope="page" value="local dev"/>
- <c:set var="dataLink" scope="page" value="http://localhost"/>
- </c:otherwise>
- </c:choose>
- Recently, we launched new appspot servers for dashboard. Thus you will have two diffrent versions of server for each staging and production data.
- <br/>
- If you want to find the <c:out value = "${dataVersion}"/> test data, please visit the next url <a href="<c:out value = "${dataLink}"/>"><c:out value = "${dataLink}"/></a>.
- </div>
- </div>
- </div>
- </li>
- </ul>
- </c:if>
-
- <c:choose>
- <c:when test='${not empty error}'>
- <div id='error-container' class='row card'>
- <div class='col s12 center-align'>
- <h5>${error}</h5>
- </div>
- </div>
- </c:when>
- <c:otherwise>
- <div class='row home-tabs-row'>
- <div class='col s12'>
- <ul class='tabs'>
- <li class='tab col s4' id='favoritesLink'><a class='${showAll ? "inactive" : "active"}'>Favorites</a></li>
- <li class='tab col s4' id='allLink'><a class='${showAll ? "active" : "inactive"}'>All Tests</a></li>
- <li class='tab col s4' id='acksLink'><a>Test Acknowledgements</a></li>
- </ul>
- </div>
- </div>
- <c:set var='width' value='${showAll ? 11 : 11}' />
- <c:if test='${not showAll}'>
- <div class='row'>
- <div class='input-field col s8'>
- <input type='text' id='input-box'></input>
- <label for='input-box'>Search for tests to add to favorites</label>
- </div>
- <div id='add-button-wrapper' class='col s1 valign-wrapper'>
- <a id='add-button' class='btn-floating btn waves-effect waves-light red valign'><i class='material-icons'>add</i></a>
- </div>
- </div>
- </c:if>
- <div class='row' id='options'>
- <c:forEach items='${testNames}' var='test'>
- <div>
- <a href='${resultsUrl}?testName=${test.name}'>
- <div class='col s${width} card hoverable option valign-wrapper waves-effect'>
- <span class='entry valign'>${test.name}
- <c:if test='${test.failCount >= 0 && test.passCount >= 0}'>
- <c:set var='color' value='${test.failCount > 0 ? "red" : (test.passCount > 0 ? "green" : "grey")}' />
- <span class='indicator right center ${color}'>
- ${test.passCount} / ${test.passCount + test.failCount}
- </span>
- </c:if>
- </span>
- </div>
- </a>
- <c:choose>
- <c:when test="${showAll}">
- <div class="col s1 center btn-container">
- <c:choose>
- <c:when test="${test.isFavorite}">
- <a class="col s6 btn-flat min-fav-button" test="${test.name}" title="Remove favorite">
- <i class="material-icons">star</i>
- </a>
- </c:when>
- <c:otherwise>
- <a class="col s6 btn-flat add-fav-button" test="${test.name}" title="Add favorite">
- <i class="material-icons">star_border</i>
- </a>
- </c:otherwise>
- </c:choose>
- </div>
- </c:when>
- <c:otherwise>
- <div class='col s1 center btn-container'>
- <a class='col s6 btn-flat notification-button ${test.muteNotifications ? "inactive" : "active"}' test='${test.name}' title='${test.muteNotifications ? "Enable" : "Disable"} notifications'>
- <i class='material-icons'>notifications_${test.muteNotifications ? "off" : "active"}</i>
- </a>
- <a class='col s6 btn-flat remove-button' test='${test.name}' title='Remove favorite'>
- <i class='material-icons'>clear</i>
- </a>
- </div>
- </c:otherwise>
- </c:choose>
- </div>
- </c:forEach>
- </div>
- </c:otherwise>
- </c:choose>
- </div>
- <%@ include file='footer.jsp' %>
- </body>
-</html>
diff --git a/src/main/webapp/WEB-INF/jsp/error_msg.jsp b/src/main/webapp/WEB-INF/jsp/error_msg.jsp
deleted file mode 100644
index 13e6657..0000000
--- a/src/main/webapp/WEB-INF/jsp/error_msg.jsp
+++ /dev/null
@@ -1,38 +0,0 @@
-<%--
- ~ Copyright (c) 2018 Google Inc. All Rights Reserved.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-
-<html>
-<link rel='stylesheet' href='/css/dashboard_main.css'>
-<%@ include file='header.jsp' %>
-<body>
-
-<div class='container wide'>
-
- <div class="card-panel">
- <span class="red-text text-darken-2">
- <h3> <c:out value="${error_title}"></c:out> </h3>
- <br/>
- <c:out value="${error_message}"></c:out>
- </span>
- </div>
-
-</div>
-<%@ include file='footer.jsp' %>
-</body>
-</html>
diff --git a/src/main/webapp/WEB-INF/jsp/footer.jsp b/src/main/webapp/WEB-INF/jsp/footer.jsp
deleted file mode 100644
index b804a21..0000000
--- a/src/main/webapp/WEB-INF/jsp/footer.jsp
+++ /dev/null
@@ -1,25 +0,0 @@
-<%--
- ~ Copyright (c) 2017 Google Inc. All Rights Reserved.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-
-<footer class="page-footer" style="height: 70px;">
- <div class="footer-copyright">
- <div class="container">
- © 2017 - The Android Open Source Project
- </div>
- </div>
-</footer>
diff --git a/src/main/webapp/WEB-INF/jsp/header.jsp b/src/main/webapp/WEB-INF/jsp/header.jsp
deleted file mode 100644
index 1d7de87..0000000
--- a/src/main/webapp/WEB-INF/jsp/header.jsp
+++ /dev/null
@@ -1,70 +0,0 @@
-<%--
- ~ Copyright (c) 2017 Google Inc. All Rights Reserved.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-
-<head>
- <link rel='stylesheet' href='https://www.gstatic.com/external_hosted/materialize/all_styles-bundle.css'>
- <link rel='icon' href='https://www.gstatic.com/images/branding/googleg/1x/googleg_standard_color_32dp.png' sizes='32x32'>
- <link rel='stylesheet' href='https://fonts.googleapis.com/icon?family=Material+Icons'>
- <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700'>
- <link rel='stylesheet' href='/css/navbar.css'>
- <link rel='stylesheet' href='/css/common.css'>
- <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>
- <script src='https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js'></script>
- <script src='https://www.gstatic.com/external_hosted/materialize/materialize.min.js'></script>
- <script type='text/javascript'>
- if (${analyticsID}) {
- // Autogenerated from Google Analytics
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
- ga('create', ${analyticsID}, 'auto');
- ga('send', 'pageview');
- }
- </script>
- <title>VTS Dashboard</title>
-</head>
-<body>
- <nav id='navbar'>
- <div class='nav-wrapper'>
- <a href='#' class='brand-logo center'>VTS Dashboard</a>
- <ul class='nav-list'>
- <c:forEach items='${navbarLinks}' var='link' varStatus='loop'>
- <li class='${loop.index == activeIndex ? "active" : ""}'>
- <a class='nav-list-item' href='${link.url}'>${link.name}</a>
- </li>
- </c:forEach>
- </ul>
- <ul class='right'><li>
- <a id='dropdown-button' class='dropdown-button btn red lighten-3' href='#' data-activates='dropdown'>
- ${email}
- </a>
- </li></ul>
- <ul id='dropdown' class='dropdown-content'>
- <li><a href='${logoutURL}'>Log out</a></li>
- </ul>
- <c:if test='${breadcrumbLinks != null}'>
- <div id='nav-sublist'>
- <c:forEach items='${breadcrumbLinks}' var='link'>
- <a href='${link.url}' class='nav-sublist-item breadcrumb'>${link.name}</a>
- </c:forEach>
- </div>
- </c:if>
- </div>
- </nav>
-</body>
diff --git a/src/main/webapp/WEB-INF/jsp/show_coverage.jsp b/src/main/webapp/WEB-INF/jsp/show_coverage.jsp
deleted file mode 100644
index ee68588..0000000
--- a/src/main/webapp/WEB-INF/jsp/show_coverage.jsp
+++ /dev/null
@@ -1,210 +0,0 @@
-<%--
- ~ Copyright (c) 2016 Google Inc. All Rights Reserved.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-
-<html>
- <%@ include file="header.jsp" %>
- <link rel="stylesheet" href="/css/show_coverage.css">
- <script async defer src="https://apis.google.com/js/api.js"
- onload="this.onload=function(){};handleClientLoad()"
- onreadystatechange="if (this.readyState === 'complete') this.onload()">
- </script>
- <body>
- <script type="text/javascript">
- $(document).ready(function() {
- // Initialize AJAX for CORS
- $.ajaxSetup({
- xhrFields : {
- withCredentials: true
- }
- });
-
- $('.collapsible.popout').collapsible({
- accordion : true
- }).find('.collapsible-header').click(onClick);
-
-
- $("div.collapsible-header > span.indicator.waves-effect").click(function(evt) {
- evt.preventDefault();
-
- $("#loader-indicator").show();
-
- var cmd = $(evt.target).text();
- var testRunId = $(evt.target).data("id");
- var postData = { coverageId: testRunId, testName: "${testName}", testRunId: "${startTime}", cmd: cmd};
- $.post("/api/coverage/data", postData, function() {
- // success
- console.log("success");
- var detachedLi = $(evt.target).parent().parent().detach();
- if (cmd == "enable") {
- $(evt.target).text("disable");
- $(evt.target).parent().removeClass("grey");
- $('ul.collapsible.popout').prepend(detachedLi);
- } else {
- $(evt.target).text("enable");
- $(evt.target).parent().addClass("grey");
- $('ul.collapsible.popout').append(detachedLi);
- }
- })
- .done(function() {
- // Done
- $("#loader-indicator").fadeOut("slow");
- })
- .fail(function() {
- alert( "Error occurred during changing the status" );
- });
- });
- });
-
- function handleClientLoad() {
- // Load the API client and auth2 library
- gapi.load('client:auth2', initClient);
- }
-
- function initClient() {
- gapi.client.init({
- client_id: ${clientId},
- scope: ${gerritScope}
- }).then(function () {
- // displayEntries();
- });
- }
-
- /* Open a window to Gerrit so that user can login.
- Minimize the previously clicked entry.
- */
- var gerritLogin = function(element) {
- window.open(${gerritURI}, "Ratting", "toolbar=0,status=0");
- element.click();
- }
-
- /* Loads source code for a particular entry and displays it with
- coverage information as the accordion entry expands.
- */
- var onClick = function() {
- // Remove source code from the accordion entry that was open before
- var self = $(this);
- var prev = self.parent().siblings('li.active');
- if (prev.length > 0) {
- prev.find('.table-container').empty();
- }
- var url = self.parent().data('url');
- var container = self.parent().find('.table-container');
- container.html('<div class="center-align">Loading...</div>');
- var coverageVectors = self.parent().data('coverage');
- if (self.parent().hasClass('active')) {
- // Remove the code from display
- container.empty();
- } else {
- /* Fetch and display the code.
- Note: a coverageVector may be shorter than sourceContents due
- to non-executable (i.e. comments or language-specific syntax)
- lines in the code. Trailing source lines that have no
- coverage information are assumed to be non-executable.
- */
- $.ajax({
- url: url,
- dataType: 'text'
- }).promise().done(function(src) {
- src = atob(src);
- if (!src) return;
- srcLines = src.split('\n');
- covered = 0;
- total = 0;
- var table = $('<table class="table"></table>');
- var rows = srcLines.forEach(function(line, j) {
- var count = coverageVectors[j];
- var row = $('<tr></tr>');
- if (typeof count == 'undefined' || count < 0) {
- count = "--";
- } else if (count == 0) {
- row.addClass('uncovered');
- total += 1;
- } else {
- row.addClass('covered');
- total += 1;
- }
- row.append('<td class="count">' + String(count) + '</td>');
- row.append('<td class="line_no">' + String(j+1) + '</td>');
- code = $('<td class="code"></td>');
- code.text(String(line));
- code.appendTo(row);
- row.appendTo(table);
- });
- container.empty();
- container.append(table);
- }).fail(function(error) {
- if (error.status == 0) { // origin error, refresh cookie
- container.empty();
- container.html('<div class="center-align">' +
- '<span class="login-button">' +
- 'Click to authorize Gerrit access' +
- '</span></div>');
- container.find('.login-button').click(function() {
- gerritLogin(self);
- });
- } else {
- container.html('<div class="center-align">' +
- 'Not found.</div>');
- }
- });
- }
- }
- </script>
- <div id='coverage-container' class='wide container'>
- <h4 class="section-title"><b>Coverage:</b> </h4>
- <ul class="collapsible popout" data-collapsible="accordion">
- <c:forEach var="coverageEntity" items="${coverageEntityList}" varStatus="loop">
- <li data-url="<c:url value="${coverageEntity.gerritUrl}"/>" data-index="${loop.index}" data-coverage="${coverageEntity.lineCoverage}">
- <div class="collapsible-header <c:out value='${coverageEntity.isIgnored ? "grey" : ""}'/>">
- <i class="material-icons">library_books</i>
- <div class="truncate"><b>${coverageEntity.projectName}</b>/${coverageEntity.filePath}</div>
- <div class="right total-count">${coverageEntity.coveredCount}/${coverageEntity.totalCount}</div>
- <div class="indicator ${coverageEntity.percentage >= 70 ? "green" : "red"}">${coverageEntity.percentage}%</div>
- <c:if test="${isModerator}">
- <span data-id="${coverageEntity.id}" class="indicator waves-effect blue lighten-1" style="margin-left: 5px;"><c:out value='${coverageEntity.isIgnored ? "enable" : "disable"}'/></span>
- </c:if>
- </div>
- <div class="collapsible-body row">
- <div class="html-container">
- <div class="table-container"></div>
- </div>
- </div>
- </li>
- </c:forEach>
- </ul>
- </div>
-
- <div id="loader-indicator" class="loader-background" style="display: none">
- <div class="preloader-wrapper big active">
- <div class="spinner-layer spinner-blue-only">
- <div class="circle-clipper left">
- <div class="circle"></div>
- </div>
- <div class="gap-patch">
- <div class="circle"></div>
- </div>
- <div class="circle-clipper right">
- <div class="circle"></div>
- </div>
- </div>
- </div>
- </div>
- <%@ include file="footer.jsp" %>
- </body>
-</html>
diff --git a/src/main/webapp/WEB-INF/jsp/show_coverage_overview.jsp b/src/main/webapp/WEB-INF/jsp/show_coverage_overview.jsp
deleted file mode 100644
index 0516c9d..0000000
--- a/src/main/webapp/WEB-INF/jsp/show_coverage_overview.jsp
+++ /dev/null
@@ -1,505 +0,0 @@
-<%--
- ~ Copyright (c) 2017 Google Inc. All Rights Reserved.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core' %>
-<%@ taglib prefix='fmt' uri='http://java.sun.com/jsp/jstl/fmt' %>
-
-<html>
- <!-- <link rel='stylesheet' href='/css/dashboard_main.css'> -->
- <%@ include file='header.jsp' %>
- <link type='text/css' href='/css/show_test_runs_common.css' rel='stylesheet'>
- <link type='text/css' href='/css/test_results.css' rel='stylesheet'>
- <link rel='stylesheet' href='/css/search_header.css'>
- <script type='text/javascript' src='https://www.gstatic.com/charts/loader.js'></script>
- <script src='https://www.gstatic.com/external_hosted/moment/min/moment-with-locales.min.js'></script>
- <script src='js/common.js'></script>
- <script src='js/time.js'></script>
- <script type='text/javascript'>
- google.charts.load('current', {'packages':['table', 'corechart']});
- google.charts.setOnLoadCallback(drawStatsChart);
- google.charts.setOnLoadCallback(drawCoverageCharts);
-
- $(document).ready(function() {
-
- $('select').material_select();
-
- $(".search-icon-wrapper").click(function() {
- $(".search-wrapper").toggle();
- });
-
- var inputIdList = ["device", "branch"];
-
- $("#schBtn").click(function (evt) {
- if($(this).hasClass('disabled')) return;
- var queryParam = "?";
- $.each(inputIdList, function( index, value ) {
- var selectId = value.charAt(0).toUpperCase() + value.slice(1)
- var result = $("#search" + selectId).val();
- if ( !$.isEmptyObject(result) ) {
- queryParam += value + "=" + result.trim() + "&";
- }
- });
- var link = '${pageContext.request.contextPath}' + '/show_coverage_overview' + queryParam;
- window.open(link, '_self');
- });
-
- var no_data_msg = "NO DATA";
-
- $('#coverageModalGraph').modal({
- width: '75%',
- dismissible: true, // Modal can be dismissed by clicking outside of the modal
- opacity: .5, // Opacity of modal background
- inDuration: 300, // Transition in duration
- outDuration: 200, // Transition out duration
- startingTop: '4%', // Starting top style attribute
- endingTop: '10%', // Ending top style attribute
- ready: function(modal, trigger) { // Callback for Modal open. Modal and trigger parameters available.
- var testname = modal.data('testname');
- $('#coverageModalTitle').text("Code Coverage Chart : " + testname);
- var query = new google.visualization.Query('show_coverage_overview?pageType=datatable&testName=' + testname);
- // Send the query with a callback function.
- query.send(handleQueryResponse);
- },
- complete: function() {
- $('#coverage_combo_chart_div').empty();
- $('#coverage_line_chart_div').empty();
- $('#coverage_table_chart_div').empty();
-
- $("div.valign-wrapper > h2.center-align:contains('" + no_data_msg + "')").each(function(index){
- $(this).parent().remove();
- });
- $("span.indicator.badge.blue:contains('Graph')").each(function( index ) {
- $(this).removeClass('blue');
- $(this).addClass('grey');
- });
-
- $('#dataTableLoading').show("slow");
- } // Callback for Modal close
- });
-
- // Handle the query response.
- function handleQueryResponse(response) {
- $('#dataTableLoading').hide("slow");
- if (response.isError()) {
- alert('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage());
- return;
- }
- // Draw the visualization.
- var data = response.getDataTable();
- if (data.getNumberOfRows() == 0) {
- var blankData = '<div class="valign-wrapper" style="height: 90%;">'
- + '<h2 class="center-align" style="width: 100%;">' + no_data_msg + '</h2>'
- + '</div>';
- $('#coverageModalTitle').after(blankData);
- return;
- }
- data.sort([{column: 0}]);
-
- var date_formatter = new google.visualization.DateFormat({ pattern: "yyyy-MM-dd" });
- date_formatter.format(data, 0);
-
- var dataView = new google.visualization.DataView(data);
-
- // Disable coveredLine and totalLine
- dataView.hideColumns([1,2]);
-
- var lineOptions = {
- title: 'Source Code Line Coverage',
- width: '100%',
- height: 450,
- curveType: 'function',
- intervals: { 'color' : 'series-color' },
- interval: {
- 'fill': {
- 'style': 'area',
- 'curveType': 'function',
- 'fillOpacity': 0.2
- },
- 'bar': {
- 'style': 'bars',
- 'barWidth': 0,
- 'lineWidth': 1,
- 'pointSize': 3,
- 'fillOpacity': 1
- }},
- legend: { position: 'bottom' },
- tooltip: { isHtml: true },
- fontName: 'Roboto',
- titleTextStyle: {
- color: '#757575',
- fontSize: 16,
- bold: false
- },
- pointsVisible: true,
- vAxis:{
- title: 'Code Coverage Ratio (%)',
- titleTextStyle: {
- color: '#424242',
- fontSize: 12,
- italic: false
- },
- textStyle: {
- fontSize: 12,
- color: '#757575'
- },
- },
- hAxis: {
- title: 'Date',
- format: 'yyyy-MM-dd',
- minTextSpacing: 0,
- showTextEvery: 1,
- slantedText: true,
- slantedTextAngle: 45,
- textStyle: {
- fontSize: 12,
- color: '#757575'
- },
- titleTextStyle: {
- color: '#424242',
- fontSize: 12,
- italic: false
- }
- },
- };
- var lineChart = new google.visualization.LineChart(document.getElementById('coverage_line_chart_div'));
- lineChart.draw(dataView, lineOptions);
-
- var tableOptions = {
- title: 'Covered/Total Source Code Line Count (SLOC)',
- width: '95%',
- // height: 350,
- is3D: true
- };
- var tableChart = new google.visualization.Table(document.getElementById('coverage_table_chart_div'));
- tableChart.draw(data, tableOptions);
- }
-
- $('.collapsible').collapsible({
- accordion: false,
- onOpen: function(el) {
- var header = $( el[0].children[0] );
- var body = $( el[0].children[1] );
- var icon = header.children('.material-icons.expand-arrow');
- var testName = header.data('test');
- var timestamp = header.data('time');
- var url = '/api/test_run?test=' + testName + '&timestamp=' + timestamp;
- $.get(url).done(function(data) {
- displayTestDetails(body, data, 16);
- }).fail(function() {
- icon.removeClass('rotate');
- }).always(function() {
- header.removeClass('disabled');
- });
- }, // Callback for Collapsible open
- onClose: function(el) {
- console.log(el);
- var body = $( el[0].children[1] );
- body.empty();
- } // Callback for Collapsible close
- });
-
- $( "span.indicator.badge:contains('Coverage')" ).click(function (evt) {
- var header = $(evt.currentTarget.parentElement);
- var testName = header.data('test');
- var startTime = header.data('time');
- var url = '/show_coverage?testName=' + testName + '&startTime=' + startTime;
- window.location.href = url;
- return false;
- });
-
- $( "span.indicator.badge:contains('Links')" ).click(function (evt) {
- var header = $(evt.currentTarget.parentElement);
- var logLinks = header.data('links');
- showLinks($('body'), logLinks);
- return false;
- });
-
- $( "span.indicator.badge:contains('Graph')" ).click(function (evt) {
- var header = $(evt.currentTarget.parentElement);
- var testname = header.data('test');
- $('#coverageModalGraph').data("testname", testname);
- $('#coverageModalGraph').modal('open');
- $(evt.target).removeClass("grey");
- $(evt.target).addClass("blue");
- return false;
- });
- });
-
- // draw test statistics chart
- function drawStatsChart() {
- var testStats = ${testStats};
- if (testStats.length < 1) {
- return;
- }
- var resultNames = ${resultNamesJson};
- var rows = resultNames.map(function(res, i) {
- nickname = res.replace('TEST_CASE_RESULT_', '').replace('_', ' ')
- .trim().toLowerCase();
- return [nickname, parseInt(testStats[i])];
- });
- rows.unshift(['Result', 'Count']);
-
- // Get CSS color definitions (or default to white)
- var colors = resultNames.map(function(res) {
- return $('.' + res).css('background-color') || 'white';
- });
-
- var data = google.visualization.arrayToDataTable(rows);
- var options = {
- is3D: false,
- colors: colors,
- fontName: 'Roboto',
- fontSize: '14px',
- legend: {position: 'labeled'},
- tooltip: {showColorCode: true, ignoreBounds: false},
- chartArea: {height: '80%', width: '90%'},
- pieHole: 0.4
- };
-
- var chart = new google.visualization.PieChart(document.getElementById('pie-chart-stats'));
- chart.draw(data, options);
- }
-
- // draw the coverage pie charts
- function drawCoverageCharts() {
- var coveredLines = ${coveredLines};
- var uncoveredLines = ${uncoveredLines};
- var rows = [
- ["Result", "Count"],
- ["Covered Lines", coveredLines],
- ["Uncovered Lines", uncoveredLines]
- ];
-
- // Get CSS color definitions (or default to white)
- var colors = [
- $('.TEST_CASE_RESULT_PASS').css('background-color') || 'white',
- $('.TEST_CASE_RESULT_FAIL').css('background-color') || 'white'
- ]
-
- var data = google.visualization.arrayToDataTable(rows);
-
- var optionsRaw = {
- is3D: false,
- colors: colors,
- fontName: 'Roboto',
- fontSize: '14px',
- pieSliceText: 'value',
- legend: {position: 'bottom'},
- chartArea: {height: '80%', width: '90%'},
- tooltip: {showColorCode: true, ignoreBounds: false, text: 'value'},
- pieHole: 0.4
- };
-
- var optionsNormalized = {
- is3D: false,
- colors: colors,
- fontName: 'Roboto',
- fontSize: '14px',
- legend: {position: 'bottom'},
- tooltip: {showColorCode: true, ignoreBounds: false, text: 'percentage'},
- chartArea: {height: '80%', width: '90%'},
- pieHole: 0.4
- };
-
- var chart = new google.visualization.PieChart(document.getElementById('pie-chart-coverage-raw'));
- chart.draw(data, optionsRaw);
-
- chart = new google.visualization.PieChart(document.getElementById('pie-chart-coverage-normalized'));
- chart.draw(data, optionsNormalized);
- }
-
- // refresh the page to see the runs matching the specified filter
- function refresh() {
- var link = '${pageContext.request.contextPath}' +
- '/show_coverage_overview?' + search.args();
- if (${unfiltered}) {
- link += '&unfiltered=';
- }
- window.open(link,'_self');
- }
-
- </script>
-
- <body>
- <div class='wide container'>
- <div id="filter-bar">
- <div class="row card search-bar expanded">
- <div class="header-wrapper">
- <h5 class="section-header">
- <b>Code Coverage</b>
- </h5>
- <div class="search-icon-wrapper">
- <i class="material-icons">search</i>
- </div>
- </div>
- <div class="search-wrapper" ${empty branch and empty device ? 'style="display: none"' : ''}>
- <div class="row">
- <div class="col s9">
- <div class="input-field col s4">
- <c:set var="branchVal" value='${fn:replace(branch, "\\\"", "")}'></c:set>
- <select id="searchBranch">
- <option value="" <c:if test="${empty branch}">disabled selected</c:if> >Choose your branch</option>
- <c:forEach items='${branchOptions}' var='branchOption'>
- <option value="${branchOption}" ${branchVal == branchOption ? 'selected' : ''}>${branchOption}</option>
- </c:forEach>
- </select>
- <label>Branch Select</label>
- </div>
- <div class="input-field col s4">
- <c:set var="deviceVal" value='${fn:replace(device, "\\\"", "")}'></c:set>
- <select id="searchDevice">
- <option value="" <c:if test="${empty device}">disabled selected</c:if> >Choose your device</option>
- <c:forEach items='${deviceOptions}' var='deviceOption'>
- <option value="${deviceOption}" ${deviceVal == deviceOption ? 'selected' : ''}>${deviceOption}</option>
- </c:forEach>
- </select>
- <label>Device Select</label>
- </div>
- <div class="col s4"></div>
- </div>
- <div class="refresh-wrapper col s3">
- <a id="schBtn" class="btn-floating btn-medium red waves-effect waves-light" style="margin-right: 30px;">
- <i class="medium material-icons">cached</i>
- </a>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class='row'>
- <div class='col s12'>
- <div class='col s12 card center-align'>
- <div id='legend-wrapper'>
- <c:forEach items='${resultNames}' var='res'>
- <div class='center-align legend-entry'>
- <c:set var='trimmed' value='${fn:replace(res, "TEST_CASE_RESULT_", "")}'/>
- <c:set var='nickname' value='${fn:replace(trimmed, "_", " ")}'/>
- <label for='${res}'>${nickname}</label>
- <div id='${res}' class='${res} legend-bubble'></div>
- </div>
- </c:forEach>
- </div>
- </div>
- </div>
- <div class='col s4 valign-wrapper'>
- <!-- pie chart -->
- <div class='pie-chart-wrapper col s12 valign center-align card'>
- <h6 class='pie-chart-title'>Test Statistics</h6>
- <div id='pie-chart-stats' class='pie-chart-div'></div>
- </div>
- </div>
- <div class='col s4 valign-wrapper'>
- <!-- pie chart -->
- <div class='pie-chart-wrapper col s12 valign center-align card'>
- <h6 class='pie-chart-title'>Line Coverage (Raw)</h6>
- <div id='pie-chart-coverage-raw' class='pie-chart-div'></div>
- </div>
- </div>
- <div class='col s4 valign-wrapper'>
- <!-- pie chart -->
- <div class='pie-chart-wrapper col s12 valign center-align card'>
- <h6 class='pie-chart-title'>Line Coverage (Normalized)</h6>
- <div id='pie-chart-coverage-normalized' class='pie-chart-div'></div>
- </div>
- </div>
- </div>
- <div class='col s12' id='test-results-container'>
- <ul class="collapsible popout test-runs" data-collapsible="expandable">
- <c:forEach var="testRunEntity" items="${testRunEntityList}" varStatus="loop">
- <li class="test-run-container">
- <div data-test="<c:out value="${testRunEntity.testName}" />" data-time="<c:out value="${testRunEntity.startTimestamp}" />" data-links='${testRunEntity.jsonLogLinks}' class="collapsible-header test-run">
- <span class="test-run-metadata">
- <span class="test-run-label">
- <c:out value="${testRunEntity.testName}" />
- </span>
- <br />
- <b>VTS Build: </b><c:out value="${testRunEntity.testBuildId}" />
- <br />
- <b>Host: </b><c:out value="${testRunEntity.hostName}" />
- <br />
- <c:out value="${testRunEntity.startDateTime}" /> - <c:out value="${testRunEntity.endDateTime}" />+0900 (<c:out value="${(testRunEntity.endTimestamp - testRunEntity.startTimestamp) / 1000}" />s)
- </span>
- <span class="indicator badge green" style="color: white;">
- <c:out value="${testRunEntity.passCount}" />/<c:out value="${testRunEntity.passCount + testRunEntity.passCount}" />
- </span>
-
- <c:set var="coveredLineCnt" value="${codeCoverageEntityMap[testRunEntity.id].coveredLineCount}" />
- <c:set var="totalLineCnt" value="${codeCoverageEntityMap[testRunEntity.id].totalLineCount}" />
- <c:set var="covPct"
- value="${(coveredLineCnt / totalLineCnt * 1000) / 10}"/>
-
- <c:choose>
- <c:when test = "${covPct <= 20}">
- <c:set var="badgeColor" value="red" />
- </c:when>
- <c:when test = "${covPct >= 70}">
- <c:set var="badgeColor" value="green" />
- </c:when>
- <c:otherwise>
- <c:set var="badgeColor" value="orange" />
- </c:otherwise>
- </c:choose>
-
- <span class="indicator badge padded hoverable waves-effect <c:out value="${badgeColor}" />" style="color: white; margin-left: 1px;">
- Coverage: <c:out value="${coveredLineCnt}" />/<c:out value="${totalLineCnt}" />
- (<fmt:formatNumber value="${(coveredLineCnt / totalLineCnt * 1000) / 10}" type="number" pattern="#.##"/>%)
- </span>
- <span class="indicator badge padded hoverable waves-effect grey lighten-1" style="color: white; margin-left: 1px;">Links</span>
- <span class="indicator badge padded hoverable waves-effect grey lighten-1" style="color: white; margin-left: 1px;">Graph</span>
- <i class="material-icons expand-arrow">expand_more</i>
- </div>
- <div class="collapsible-body test-results row"></div>
- </li>
- </c:forEach>
- </ul>
-
- </div>
- </div>
-
- <!-- Coverage Graph Modal Structure -->
- <div id="coverageModalGraph" class="modal modal-fixed-footer" style="width: 75%;">
- <div class="modal-content">
- <h4 id="coverageModalTitle">Code Coverage Chart</h4>
-
- <div class="preloader-wrapper big active loaders">
- <div id="dataTableLoading" class="spinner-layer spinner-blue-only">
- <div class="circle-clipper left">
- <div class="circle"></div>
- </div>
- <div class="gap-patch">
- <div class="circle"></div>
- </div>
- <div class="circle-clipper right">
- <div class="circle"></div>
- </div>
- </div>
- </div>
-
- <!--Div that will hold the visualization graph -->
- <div id="coverage_line_chart_div"></div>
- <p></p>
- <p></p>
- <div id="coverage_table_chart_div" class="center-align"></div>
- </div>
- <div class="modal-footer">
- <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">Close</a>
- </div>
- </div>
-
- <%@ include file="footer.jsp" %>
- </body>
-</html>
diff --git a/src/main/webapp/WEB-INF/jsp/show_gcs_log.jsp b/src/main/webapp/WEB-INF/jsp/show_gcs_log.jsp
deleted file mode 100644
index 8d73d34..0000000
--- a/src/main/webapp/WEB-INF/jsp/show_gcs_log.jsp
+++ /dev/null
@@ -1,188 +0,0 @@
-<%--
- ~ Copyright (c) 2018 Google Inc. All Rights Reserved.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-
-<html>
- <%@ include file="header.jsp" %>
- <link rel='stylesheet' href='/css/show_gcs_log.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/time.js'></script>
- <script src='js/plan_runs.js'></script>
- <script src='js/search_header.js'></script>
- <script type='text/javascript'>
- $(document).ready(function() {
- var paraMap = {'path': '', 'entry': ''};
- $('.modal').modal({
- dismissible: true, // Modal can be dismissed by clicking outside of the modal
- opacity: .5, // Opacity of modal background
- inDuration: 300, // Transition in duration
- outDuration: 200, // Transition out duration
- startingTop: '4%', // Starting top style attribute
- endingTop: '10%', // Ending top style attribute
- ready: function(modal, trigger) { // Callback for Modal open. Modal and trigger parameters available.
- $('.loading-overlay').show();
- if ($(modal).attr("id") == "logEntryListModal") {
- console.log($(trigger));
- $(trigger).addClass("active");
- paraMap['path'] = "${path}" + trigger.text().trim();
- var fileName = paraMap['path'].substring(paraMap['path'].lastIndexOf('/')+1); // Getting filename
- $(modal).find('#entry-list-modal-title').text(fileName); // Set file name for modal window
- var url = "${requestScope['javax.servlet.forward.servlet_path']}?path=" + paraMap['path'];
- $(modal).find('#downloadLink').prop('href', url + "&action=download");
- $.get( url, function(data) {
- var entryList = $(modal).find('#modal-entry-list');
- $(data.entryList).each(function( index, element ) {
- entryList.append("<li class='collection-item'><a href='#logEntryViewModal' class='modal-trigger'>" + element + "</a></li>");
- });
- }).done(function() {
- $('.loading-overlay').hide();
- });
- } else {
- paraMap['entry'] = trigger.text().trim();
- $(modal).find('#entry-view-modal-title').text(paraMap['entry']);
- var entryUrl = "${requestScope['javax.servlet.forward.servlet_path']}?path=" + paraMap['path'] + "&entry=" + paraMap['entry'];
- $.get( entryUrl, function(data) {
- $(modal).find('#entry-view-modal-content').text(data.entryContent);
- }).done(function() {
- $('.loading-overlay').hide();
- });
- }
- },
- complete: function(modal) {
- if ($(modal).attr("id") == "logEntryListModal") {
- $(modal).find('#modal-entry-list').find("li").remove();
- $("div.collection > a.collection-item.active").removeClass('active')
- } else {
- $(modal).find('#entry-view-modal-content').text('');
- }
- } // Callback for Modal close
- });
- });
- </script>
-
- <body>
- <div class='wide container'>
- <div class='row' id='release-container'>
- <h5>Current Directory Path : ${path}</h5>
- <hr/>
- <div class="row">
- <div class="col s7">
- <h4>Directory List</h4>
- <ul class="collection">
- <c:forEach varStatus="dirLoop" var="dirName" items="${dirList}">
- <li class="collection-item">
- <a href="${requestScope['javax.servlet.forward.servlet_path']}?path=${dirName}">
- <c:out value="${dirName}"></c:out>
- <c:if test="${dirLoop.first && path ne '/'}">
- (Move to Parent)
- </c:if>
- </a>
- </li>
- <c:if test="${!dirLoop.last}">
- </c:if>
- </c:forEach>
- </ul>
- </div>
- <div class="col s5">
- <h4>File List</h4>
- <div class="collection">
- <c:forEach varStatus="fileLoop" var="fileName" items="${fileList}">
- <a href="#logEntryListModal" class="collection-item modal-trigger">
- <c:out value="${fileName}"></c:out>
- </a>
- <c:if test="${!fileLoop.last}">
- </c:if>
- </c:forEach>
- </div>
- </div>
- </div>
-
- </div>
- </div>
-
- <%@ include file="footer.jsp" %>
-
- <!-- Modal For Zip file entries -->
- <div id="logEntryListModal" class="modal">
- <div class="modal-content">
- <h4 id="entry-list-modal-title" class="truncate"></h4>
- <div id="entry-list-modal-content">
- <ul id="modal-entry-list" class="collection"></ul>
- </div>
- </div>
- <div class="modal-footer">
- <div class="row">
- <div class="col s3 offset-s6">
- <a href="#!" id="downloadLink" class="modal-action modal-close waves-effect waves-green btn">Download</a>
- </div>
- <div class="col s3">
- <a href="#!" class="modal-action modal-close waves-effect waves-green btn">Close</a>
- </div>
- </div>
- </div>
-
- <div class="loading-overlay">
- <div class="preloader-wrapper big active" style="top: 25%; left: 45%;">
- <div class="spinner-layer spinner-blue-only">
- <div class="circle-clipper left">
- <div class="circle"></div>
- </div>
- <div class="gap-patch">
- <div class="circle"></div>
- </div>
- <div class="circle-clipper right">
- <div class="circle"></div>
- </div>
- </div>
- </div>
- </div>
-
- </div>
-
- <!-- Modal For Zip file entry's content -->
- <div id="logEntryViewModal" class="modal modal-fixed-footer">
- <div class="modal-content">
- <h4 id="entry-view-modal-title" class="truncate"></h4>
- <div id="entry-view-modal-content">
-
- </div>
- </div>
- <div class="modal-footer">
- <a href="#!" class="modal-action modal-close waves-effect waves-green btn">Close</a>
- </div>
-
- <div class="loading-overlay">
- <div class="preloader-wrapper big active" style="top: 25%; left: 45%;">
- <div class="spinner-layer spinner-blue-only">
- <div class="circle-clipper left">
- <div class="circle"></div>
- </div>
- <div class="gap-patch">
- <div class="circle"></div>
- </div>
- <div class="circle-clipper right">
- <div class="circle"></div>
- </div>
- </div>
- </div>
- </div>
-
- </div>
- </body>
-</html>
diff --git a/src/main/webapp/WEB-INF/jsp/show_graph.jsp b/src/main/webapp/WEB-INF/jsp/show_graph.jsp
deleted file mode 100644
index 7111f58..0000000
--- a/src/main/webapp/WEB-INF/jsp/show_graph.jsp
+++ /dev/null
@@ -1,292 +0,0 @@
-<%--
- ~ Copyright (c) 2016 Google Inc. All Rights Reserved.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-
-<html>
- <%@ include file="header.jsp" %>
- <link type='text/css' href='/css/datepicker.css' rel='stylesheet'>
- <link type='text/css' href='/css/show_graph.css' rel='stylesheet'>
- <link rel='stylesheet' href='https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.0/jquery-ui.css'>
- <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', 'table', 'line']});
- google.charts.setOnLoadCallback(drawAllGraphs);
-
- ONE_DAY = 86400000000;
- MICRO_PER_MILLI = 1000;
- N_BUCKETS = 200;
-
- var graphs = ${graphs};
-
- $(function() {
- $('select').material_select();
- var date = $('#date').datepicker({
- showAnim: 'slideDown',
- maxDate: new Date()
- });
- date.datepicker('setDate', new Date(${endTime} / MICRO_PER_MILLI));
- $('#load').click(load);
- $('#outlier-select').change(drawAllGraphs);
- });
-
- // Draw all graphs.
- function drawAllGraphs() {
- $('#profiling-container').empty();
- var percentileIndex = Number($('#outlier-select').val());
-
- // Get histogram extrema
- var histMin = null;
- var histMax = null;
- graphs.forEach(function(g) {
- if (g.type != 'HISTOGRAM') return;
- var minVal;
- var maxVal;
- if (percentileIndex == -1) {
- minVal = g.min;
- maxVal = g.max;
- } else {
- minVal = g.percentile_values[percentileIndex];
- var endIndex = g.percentiles.length - percentileIndex - 1
- maxVal = g.percentile_values[endIndex];
- }
- if (!histMin || minVal < histMin) histMin = minVal;
- if (!histMax || maxVal > histMax) histMax = maxVal;
- });
-
- graphs.forEach(function(graph) {
- if (graph.type == 'LINE_GRAPH') drawLineGraph(graph);
- else if (graph.type == 'HISTOGRAM')
- drawHistogram(graph, histMin, histMax);
- });
- }
-
- /**
- * Draw a line graph.
- *
- * Args:
- * lineGraph: a JSON object containing the following fields:
- * - name: the name of the graph
- * - values: an array of numbers
- * - ticks: an array of strings to use as x-axis labels
- * - ids: an array of string labels for each point (e.g. the
- * build info for the run that produced the point)
- * - x_label: the string label for the x axis
- * - y_label: the string label for the y axis
- */
- function drawLineGraph(lineGraph) {
- if (!lineGraph.ticks || lineGraph.ticks.length < 1) {
- return;
- }
- var title = 'Performance';
- if (lineGraph.name) title += ' (' + lineGraph.name + ')';
- lineGraph.ticks.forEach(function (label, i) {
- lineGraph.values[i].unshift(label);
- });
- var data = new google.visualization.DataTable();
- data.addColumn('string', lineGraph.x_label);
- lineGraph.ids.forEach(function(id) {
- data.addColumn('number', id);
- });
- data.addRows(lineGraph.values);
- var options = {
- chart: {
- title: title,
- subtitle: lineGraph.y_label
- },
- legend: { position: 'none' }
- };
- var container = $('<div class="row card center-align col s12 graph-wrapper"></div>');
- container.appendTo('#profiling-container');
- var chartDiv = $('<div class="col s12 graph"></div>');
- chartDiv.appendTo(container);
- var chart = new google.charts.Line(chartDiv[0]);
- chart.draw(data, options);
- }
-
- /**
- * Draw a histogram.
- *
- * Args:
- * hist: a JSON object containing the following fields:
- * - name: the name of the graph
- * - values: an array of numbers
- * - ids: an array of string labels for each point (e.g. the
- * build info for the run that produced the point)
- * - x_label: the string label for the x axis
- * - y_label: the string label for the y axis
- * min: the minimum value to display
- * max: the maximum value to display
- */
- function drawHistogram(hist, min, max) {
- if (!hist.values || hist.values.length == 0) return;
- var title = 'Performance';
- if (hist.name) title += ' (' + hist.name + ')';
- var values = hist.values;
- var histogramData = values.reduce(function(result, d, i) {
- if (d <= max && d >= min) result.push([hist.ids[i], d]);
- return result;
- }, []);
-
- var data = google.visualization.arrayToDataTable(histogramData, true);
- var bucketSize = (max - min) / N_BUCKETS;
-
- var options = {
- title: title,
- titleTextStyle: {
- color: '#757575',
- fontSize: 16,
- bold: false
- },
- legend: { position: 'none' },
- colors: ['#4285F4'],
- fontName: 'Roboto',
- vAxis:{
- title: hist.y_label,
- titleTextStyle: {
- color: '#424242',
- fontSize: 12,
- italic: false
- },
- textStyle: {
- fontSize: 12,
- color: '#757575'
- },
- },
- hAxis: {
- title: hist.x_label,
- textStyle: {
- fontSize: 12,
- color: '#757575'
- },
- titleTextStyle: {
- color: '#424242',
- fontSize: 12,
- italic: false
- }
- },
- bar: { gap: 0 },
- histogram: {
- minValue: min,
- maxValue: max,
- maxNumBuckets: N_BUCKETS,
- bucketSize: bucketSize
- },
- chartArea: {
- width: '100%',
- top: 40,
- left: 60,
- height: 375
- }
- };
- var container = $('<div class="row card col s12 graph-wrapper"></div>');
- container.appendTo('#profiling-container');
-
- var chartDiv = $('<div class="col s12 graph"></div>');
- chartDiv.appendTo(container);
- var chart = new google.visualization.Histogram(chartDiv[0]);
- chart.draw(data, options);
-
- var tableDiv = $('<div class="col s12"></div>');
- tableDiv.appendTo(container);
-
- var tableHtml = '<table class="percentile-table"><thead><tr>';
- hist.percentiles.forEach(function(p) {
- tableHtml += '<th data-field="id">' + p + '%</th>';
- });
- tableHtml += '</tr></thead><tbody><tr>';
- hist.percentile_values.forEach(function(v) {
- tableHtml += '<td>' + v + '</td>';
- });
- tableHtml += '</tbody></table>';
- $(tableHtml).appendTo(tableDiv);
- }
-
- // Reload the page.
- function load() {
- var endTime = $('#date').datepicker('getDate').getTime();
- endTime = endTime + (ONE_DAY / MICRO_PER_MILLI) - 1;
- var filterVal = $('#outlier-select').val();
- var ctx = '${pageContext.request.contextPath}';
- var link = ctx + '/show_graph?profilingPoint=${profilingPointName}' +
- '&testName=${testName}' +
- '&endTime=' + (endTime * MICRO_PER_MILLI) +
- '&filterVal=' + filterVal;
- if ($('#device-select').prop('selectedIndex') > 1) {
- link += '&device=' + $('#device-select').val();
- }
- window.open(link,'_self');
- }
- </script>
- <div id='download' class='fixed-action-btn'>
- <a id='b' class='btn-floating btn-large red waves-effect waves-light'>
- <i class='large material-icons'>file_download</i>
- </a>
- </div>
- <div class='container wide'>
- <div class='row card'>
- <div id='header-container' class='valign-wrapper col s12'>
- <div class='col s3 valign'>
- <h5>Profiling Point:</h5>
- </div>
- <div class='col s9 right-align valign'>
- <h5 class='profiling-name truncate'>${profilingPointName}</h5>
- </div>
- </div>
- <div id='date-container' class='col s12'>
- <c:set var='offset' value='${showFilterDropdown ? 0 : 2}' />
- <c:if test='${showFilterDropdown}'>
- <div id='outlier-select-wrapper' class='col s2'>
- <select id='outlier-select'>
- <option value='-1' ${filterVal eq -1 ? 'selected' : ''}>Show outliers</option>
- <option value='0' ${filterVal eq 0 ? 'selected' : ''}>Filter outliers (1%)</option>
- <option value='1' ${filterVal eq 1 ? 'selected' : ''}>Filter outliers (2%)</option>
- <option value='2' ${filterVal eq 2 ? 'selected' : ''}>Filter outliers (5%)</option>
- </select>
- </div>
- </c:if>
- <div id='device-select-wrapper' class='input-field col s5 m3 offset-m${offset + 4} offset-s${offset}'>
- <select id='device-select'>
- <option value='' disabled>Select device</option>
- <option value='0' ${empty selectedDevice ? 'selected' : ''}>All Devices</option>
- <c:forEach items='${devices}' var='device' varStatus='loop'>
- <option value=${device} ${selectedDevice eq device ? 'selected' : ''}>${device}</option>
- </c:forEach>
- </select>
- </div>
- <input type='text' id='date' name='date' class='col s4 m2'>
- <a id='load' class='btn-floating btn-medium red right waves-effect waves-light'>
- <i class='medium material-icons'>cached</i>
- </a>
- </div>
- </div>
- <div id='profiling-container'>
- </div>
- <c:if test='${not empty error}'>
- <div id='error-container' class='row card'>
- <div class='col s10 offset-s1 center-align'>
- <!-- Error in case of profiling data is missing -->
- <h5>${error}</h5>
- </div>
- </div>
- </c:if>
- </div>
- <%@ include file="footer.jsp" %>
- </body>
-</html>
diff --git a/src/main/webapp/WEB-INF/jsp/show_green_plan_release.jsp b/src/main/webapp/WEB-INF/jsp/show_green_plan_release.jsp
deleted file mode 100644
index 1bb00dd..0000000
--- a/src/main/webapp/WEB-INF/jsp/show_green_plan_release.jsp
+++ /dev/null
@@ -1,104 +0,0 @@
-<%--
- ~ Copyright (c) 2017 Google Inc. All Rights Reserved.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-
-<html>
- <%@ include file="header.jsp" %>
- <link rel='stylesheet' href='/css/show_plan_release.css'>
- <link rel='stylesheet' href='/css/plan_runs.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/time.js'></script>
- <script src='js/plan_runs.js'></script>
- <script src='js/search_header.js'></script>
- <script type='text/javascript'>
- $(document).ready(function() {
-
- });
- </script>
-
- <body>
- <div class='wide container'>
- <div class="row">
- <div class="col s12">
- <h4 id="test-plan-section-header">Test Plans</h4>
- </div>
- </div>
- <div class='row' id='test-plan-green-release-container'>
- <table class="bordered highlight">
- <thead>
- <tr>
- <th>Branch</th>
- <th>Last Finished Build</th>
- <th>Last Green Build</th>
- </tr>
- </thead>
-
- <tbody>
- <c:forEach var="branchList" items="${greenBuildInfo}">
- <tr>
- <td> <c:out value="${branchList.key}"></c:out> </td>
- <td>
- <c:forEach varStatus="deviceLoop" var="deviceBuildInfo" items="${branchList.value}">
- <p>
- <c:out value="${deviceBuildInfo.deviceBuildTarget}"></c:out> :
- <c:choose>
- <c:when test="${deviceBuildInfo.candidateBuildId eq 'No Test Results'}">
- <c:out value="${deviceBuildInfo.candidateBuildId}"></c:out>
- </c:when>
- <c:otherwise>
- <a href="/show_plan_run?plan=${plan}&time=${deviceBuildInfo.candidateBuildIdTimestamp}">
- <c:out value="${deviceBuildInfo.candidateBuildId}"></c:out>
- </a>
- </c:otherwise>
- </c:choose>
- </p>
- <c:if test="${!deviceLoop.last}">
- <hr/>
- </c:if>
- </c:forEach>
- </td>
- <td>
- <c:forEach varStatus="deviceLoop" var="deviceBuildInfo" items="${branchList.value}">
- <p>
- <c:choose>
- <c:when test="${deviceBuildInfo.greenBuildId eq 'N/A'}">
- <c:out value="${deviceBuildInfo.greenBuildId}"></c:out>
- </c:when>
- <c:otherwise>
- <a href="/show_plan_run?plan=${plan}&time=${deviceBuildInfo.greenBuildIdTimestamp}">
- <c:out value="${deviceBuildInfo.greenBuildId}"></c:out>
- </a>
- </c:otherwise>
- </c:choose>
- </p>
- <c:if test="${!deviceLoop.last}">
- <hr/>
- </c:if>
- </c:forEach>
- </td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
- </div>
-
- </div>
- <%@ include file="footer.jsp" %>
- </body>
-</html>
diff --git a/src/main/webapp/WEB-INF/jsp/show_green_suite_release.jsp b/src/main/webapp/WEB-INF/jsp/show_green_suite_release.jsp
deleted file mode 100644
index c883ee2..0000000
--- a/src/main/webapp/WEB-INF/jsp/show_green_suite_release.jsp
+++ /dev/null
@@ -1,101 +0,0 @@
-<%--
- ~ Copyright (c) 2018 Google Inc. All Rights Reserved.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-
-<html>
- <%@ include file="header.jsp" %>
- <link rel='stylesheet' href='/css/show_plan_release.css'>
- <link rel='stylesheet' href='/css/plan_runs.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/time.js'></script>
- <script src='js/plan_runs.js'></script>
- <script src='js/search_header.js'></script>
- <script type='text/javascript'>
- $(document).ready(function() {
-
- });
- </script>
-
- <body>
- <div class='wide container'>
- <div class="row">
- <div class="col s12">
- <h4 id="test-suite-section-header">Test Suites</h4>
- </div>
- </div>
-
- <div class='row' id='test-plan-green-release-container'>
- <table class="bordered highlight">
- <thead>
- <tr>
- <th>Branch</th>
- <th>Last Finished Build</th>
- <th>Last Green Build</th>
- </tr>
- </thead>
-
- <tbody>
- <c:forEach var="branchList" items="${greenBuildInfo}">
- <tr>
- <td> <c:out value="${branchList.key}"></c:out> </td>
- <td>
- <c:forEach varStatus="deviceLoop" var="deviceBuildInfo" items="${branchList.value}">
- <p>
- <c:out value="${deviceBuildInfo.deviceBuildTarget}"></c:out> :
- <c:choose>
- <c:when test="${deviceBuildInfo.candidateBuildId eq 'No Test Results'}">
- <c:out value="${deviceBuildInfo.candidateBuildId}"></c:out>
- </c:when>
- <c:otherwise>
- <c:out value="${deviceBuildInfo.candidateBuildId}"></c:out>
- </c:otherwise>
- </c:choose>
- </p>
- <c:if test="${!deviceLoop.last}">
- <hr/>
- </c:if>
- </c:forEach>
- </td>
- <td>
- <c:forEach varStatus="deviceLoop" var="deviceBuildInfo" items="${branchList.value}">
- <p>
- <c:choose>
- <c:when test="${deviceBuildInfo.greenBuildId eq 'N/A'}">
- <c:out value="${deviceBuildInfo.greenBuildId}"></c:out>
- </c:when>
- <c:otherwise>
- <c:out value="${deviceBuildInfo.greenBuildId}"></c:out>
- </c:otherwise>
- </c:choose>
- </p>
- <c:if test="${!deviceLoop.last}">
- <hr/>
- </c:if>
- </c:forEach>
- </td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
- </div>
-
- </div>
- <%@ include file="footer.jsp" %>
- </body>
-</html>
diff --git a/src/main/webapp/WEB-INF/jsp/show_performance_digest.jsp b/src/main/webapp/WEB-INF/jsp/show_performance_digest.jsp
deleted file mode 100644
index 224d847..0000000
--- a/src/main/webapp/WEB-INF/jsp/show_performance_digest.jsp
+++ /dev/null
@@ -1,100 +0,0 @@
-<%--
- ~ Copyright (c) 2016 Google Inc. All Rights Reserved.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-
-<html>
- <%@ include file="header.jsp" %>
- <link type='text/css' href='/css/datepicker.css' rel='stylesheet'>
- <link type='text/css' href='/css/show_performance_digest.css' rel='stylesheet'>
- <link rel='stylesheet' href='https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.0/jquery-ui.css'>
- <script src='https://www.gstatic.com/external_hosted/moment/min/moment-with-locales.min.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'>
- ONE_DAY = 86400000000;
- MICRO_PER_MILLI = 1000;
-
- function load() {
- var time = $('#date').datepicker('getDate').getTime() - 1;
- time = time * MICRO_PER_MILLI + ONE_DAY; // end of day
- var ctx = '${pageContext.request.contextPath}';
- var link = ctx + '/show_performance_digest?profilingPoint=${profilingPointName}' +
- '&testName=${testName}' +
- '&startTime=' + time;
- if ($('#device-select').prop('selectedIndex') > 1) {
- link += '&device=' + $('#device-select').val();
- }
- window.open(link,'_self');
- }
-
- $(function() {
- var date = $('#date').datepicker({
- showAnim: "slideDown",
- maxDate: new Date()
- });
- date.datepicker('setDate', new Date(${startTime} / MICRO_PER_MILLI));
- $('#load').click(load);
-
- $('.date-label').each(function(i) {
- var label = $(this);
- label.html(moment(parseInt(label.html())).format('M/D/YY'));
- });
- $('select').material_select();
- });
- </script>
- <div class='wide container'>
- <div class='row card'>
- <div id='header-container' class='col s12'>
- <div class='col s12'>
- <h4>Daily Performance Digest</h4>
- </div>
- <div id='device-select-wrapper' class='input-field col s6 m3 offset-m6'>
- <select id='device-select'>
- <option value='' disabled>Select device</option>
- <option value='0' ${empty selectedDevice ? 'selected' : ''}>All Devices</option>
- <c:forEach items='${devices}' var='device' varStatus='loop'>
- <option value=${device} ${selectedDevice eq device ? 'selected' : ''}>${device}</option>
- </c:forEach>
- </select>
- </div>
- <input type='text' id='date' name='date' class='col s5 m2'>
- <a id='load' class='btn-floating btn-medium red right waves-effect waves-light'>
- <i class='medium material-icons'>cached</i>
- </a>
- </div>
- </div>
- <div class='row'>
- <c:forEach items='${tables}' var='table' varStatus='loop'>
- <div class='col s12 card summary'>
- <div class='col s3 valign'>
- <h5>Profiling Point:</h5>
- </div>
- <div class='col s9 right-align valign'>
- <h5 class="profiling-name truncate">${tableTitles[loop.index]}</h5>
- </div>
- ${table}
- <span class='profiling-subtitle'>
- ${tableSubtitles[loop.index]}
- </span>
- </div>
- </c:forEach>
- </div>
- </div>
- <%@ include file="footer.jsp" %>
- </body>
-</html>
diff --git a/src/main/webapp/WEB-INF/jsp/show_plan_release.jsp b/src/main/webapp/WEB-INF/jsp/show_plan_release.jsp
deleted file mode 100644
index 9a312e9..0000000
--- a/src/main/webapp/WEB-INF/jsp/show_plan_release.jsp
+++ /dev/null
@@ -1,119 +0,0 @@
-<%--
- ~ Copyright (c) 2017 Google Inc. All Rights Reserved.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-
-<html>
- <%@ include file="header.jsp" %>
- <link rel='stylesheet' href='/css/show_plan_release.css'>
- <link rel='stylesheet' href='/css/plan_runs.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/time.js'></script>
- <script src='js/plan_runs.js'></script>
- <script src='js/search_header.js'></script>
- <script type='text/javascript'>
- var search;
- $(document).ready(function() {
- // disable buttons on load
- if (!${hasNewer}) {
- $('#newer-button').toggleClass('disabled');
- }
- if (!${hasOlder}) {
- $('#older-button').toggleClass('disabled');
- }
-
- $('#newer-button').click(prev);
- $('#older-button').click(next);
- search = $('#filter-bar').createSearchHeader('Plan: ', '${plan}', refresh);
- search.addFilter('Branch', 'branch', {
- corpus: ${branches}
- }, ${branch});
- search.addFilter('Device', 'device', {
- 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', {
- validate: 'inequality',
- width: 's2'
- }, ${passing});
- search.addFilter('Non-Passing Count', 'nonpassing', {
- validate: 'inequality',
- width: 's2'
- }, ${nonpassing});
- search.addRunTypeCheckboxes(${showPresubmit}, ${showPostsubmit});
- search.display();
- $('#release-container').showPlanRuns(${planRuns});
- });
-
- // view older data
- function next() {
- if($(this).hasClass('disabled')) return;
- var endTime = ${startTime};
- var link = '${pageContext.request.contextPath}' +
- '/show_plan_release?plan=${plan}&endTime=' + endTime +
- search.args();
- if (${unfiltered}) {
- link += '&unfiltered=';
- }
- window.open(link,'_self');
- }
-
- // view newer data
- function prev() {
- if($(this).hasClass('disabled')) return;
- var startTime = ${endTime};
- var link = '${pageContext.request.contextPath}' +
- '/show_plan_release?plan=${plan}&startTime=' + startTime +
- search.args();
- if (${unfiltered}) {
- link += '&unfiltered=';
- }
- window.open(link,'_self');
- }
-
- // refresh the page to see the runs matching the specified filter
- function refresh() {
- var link = '${pageContext.request.contextPath}' +
- '/show_plan_release?plan=${plan}' + search.args();
- if (${unfiltered}) {
- link += '&unfiltered=';
- }
- window.open(link,'_self');
- }
- </script>
-
- <body>
- <div class='wide container'>
- <div id='filter-bar'></div>
- <div class='row' id='release-container'></div>
- <div id='newer-wrapper' class='page-button-wrapper fixed-action-btn'>
- <a id='newer-button' class='btn-floating btn red waves-effect'>
- <i class='large material-icons'>keyboard_arrow_left</i>
- </a>
- </div>
- <div id='older-wrapper' class='page-button-wrapper fixed-action-btn'>
- <a id='older-button' class='btn-floating btn red waves-effect'>
- <i class='large material-icons'>keyboard_arrow_right</i>
- </a>
- </div>
- </div>
- <%@ include file="footer.jsp" %>
- </body>
-</html>
diff --git a/src/main/webapp/WEB-INF/jsp/show_plan_run.jsp b/src/main/webapp/WEB-INF/jsp/show_plan_run.jsp
deleted file mode 100644
index bec4c76..0000000
--- a/src/main/webapp/WEB-INF/jsp/show_plan_run.jsp
+++ /dev/null
@@ -1,236 +0,0 @@
-<%--
- ~ Copyright (c) 2017 Google Inc. All Rights Reserved.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-
-<html>
- <%@ include file="header.jsp" %>
- <link type='text/css' href='/css/show_test_runs_common.css' rel='stylesheet'>
- <link type='text/css' href='/css/test_results.css' rel='stylesheet'>
- <script type='text/javascript' src='https://www.gstatic.com/charts/loader.js'></script>
- <script src='https://www.gstatic.com/external_hosted/moment/min/moment-with-locales.min.js'></script>
- <script src='js/time.js'></script>
- <script src='js/test_results.js'></script>
- <script type='text/javascript'>
- google.charts.load('current', {'packages':['table', 'corechart']});
- google.charts.setOnLoadCallback(drawPieChart);
-
- $(document).ready(function() {
- $('#test-results-container').showTests(${testRuns}, true);
- drawSummary();
-
- $('#apiCoverageModal').modal({
- width: '75%',
- dismissible: true, // Modal can be dismissed by clicking outside of the modal
- opacity: .5, // Opacity of modal background
- inDuration: 300, // Transition in duration
- outDuration: 200, // Transition out duration
- startingTop: '4%', // Starting top style attribute
- endingTop: '10%', // Ending top style attribute
- ready: function(modal, trigger) { // Callback for Modal open. Modal and trigger parameters available.
- var urlSafeKeyList = modal.data('urlSafeKeyList');
- var halApiInfoList = [];
- var getAjaxList = $.map( urlSafeKeyList, function( urlSafeKey ) {
- return $.get( "/api/coverage/api/data?key=" + urlSafeKey, function(data) {
- halApiInfoList.push(data);
- })
- .fail(function() {
- alert( "Error : can't bring API coverage data from the server" );
- });
- });
-
- $.when.apply($, getAjaxList).then(function() {
- $.each(halApiInfoList, function( index, data ) {
- $("#halApiList").append(halApiListTemplate());
- var version = data.halMajorVersion + '.' + data.halMinorVersion;
- var defaultInfo = data.halPackageName + '@' + version + '::' + data.halInterfaceName;
- $("#halApiList > li:last > div.collapsible-header").html(
- '<i class="material-icons">report</i> HAL API Information : ' + defaultInfo
- );
- /*
- $("#halApiList > li:last > div.collapsible-body > ul.collection.with-header").append(
- '<li class="collection-header">' +
- '</li>'
- );
- */
-
- $("#halApiList > li:last > div.collapsible-body > ul.collection.with-header").append(
- $.map( data.halApi, function( apiName, idx ) {
- var colorClass = data.coveredHalApi.indexOf(apiName) > -1 ? "green" : "red"
- return '<li class="collection-item ' + colorClass + ' lighten-1">' + apiName + '</li>';
- }).join("")
- );
- $("#halApiList").collapsible('open', index);
- });
- $('#dataTableLoading').hide("slow");
- });
- },
- complete: function() {
- $("#halApiList").empty();
- $('#dataTableLoading').show("slow");
- } // Callback for Modal close
- }
- );
- });
-
- function halApiListTemplate() {
- return '<li>' +
- '<div class="collapsible-header">' +
- '<i class="material-icons">report</i> API Information' +
- '</div>' +
- '<div class="collapsible-body">' +
- '<ul class="collection with-header">' +
- '</ul>' +
- '</div>' +
- '</li>';
- }
-
- // to draw pie chart
- function drawPieChart() {
- var topBuildResultCounts = ${topBuildResultCounts};
- if (topBuildResultCounts.length < 1) {
- return;
- }
- var resultNames = ${resultNamesJson};
- var rows = resultNames.map(function(res, i) {
- nickname = res.replace('TEST_CASE_RESULT_', '').replace('_', ' ')
- .trim().toLowerCase();
- return [nickname, parseInt(topBuildResultCounts[i])];
- });
- rows.unshift(['Result', 'Count']);
-
- // Get CSS color definitions (or default to white)
- var colors = resultNames.map(function(res) {
- return $('.' + res).css('background-color') || 'white';
- });
-
- var data = google.visualization.arrayToDataTable(rows);
- var options = {
- is3D: false,
- colors: colors,
- fontName: 'Roboto',
- fontSize: '14px',
- legend: {position: 'bottom'},
- tooltip: {showColorCode: true, ignoreBounds: false},
- chartArea: {height: '80%', width: '90%'},
- pieHole: 0.4
- };
-
- var chart = new google.visualization.PieChart(document.getElementById('pie-chart-div'));
- chart.draw(data, options);
- }
-
- // Draw a test plan run summary box.
- function drawSummary() {
- var testBuildId = ${testBuildId};
- var startTime = ${startTime};
- var endTime = ${endTime};
- var moduleCount = ${moduleCount};
- var passingTestCaseCount = ${passingTestCaseCount};
- var failingTestCaseCount = ${failingTestCaseCount};
- var div = $('<div></div>');
- var details = $('<span></span>').appendTo(div);
- details.append('<b>VTS Build: </b>' + testBuildId + '<br>');
- details.append('<b>Start Time: </b>' + moment().renderTime(startTime, true) + '<br>');
- details.append('<b>End Time: </b>' + moment().renderTime(endTime, true) + '<br>');
- details.append('<b>Duration: </b>' + moment().renderDuration(endTime - startTime) + '<br>');
- details.append('<b>Modules: </b>' + moduleCount + '<br>');
- details.append('<b>Passing Test Cases: </b>' + passingTestCaseCount + '<br>');
- details.append('<b>Non-Passing Test Cases: </b>' + failingTestCaseCount + '<br>');
-
- <c:if test="${totalApiCount > 0 && totalCoveredApiCount >= 0}">
- details.append('<b>Total API : </b><c:out value="${totalApiCount}"/><br>');
- details.append('<b>Total Covered API : </b><c:out value="${totalCoveredApiCount}"/><br>');
- </c:if>
-
- div.appendTo($('#summary-container'));
- }
- </script>
-
- <body>
- <div class='wide container'>
- <div class='row'>
- <div class='col s7'>
- <div class='col s12 card center-align'>
- <div id='legend-wrapper'>
- <c:forEach items='${resultNames}' var='res'>
- <div class='center-align legend-entry'>
- <c:set var='trimmed' value='${fn:replace(res, "TEST_CASE_RESULT_", "")}'/>
- <c:set var='nickname' value='${fn:replace(trimmed, "_", " ")}'/>
- <label for='${res}'>${nickname}</label>
- <div id='${res}' class='${res} legend-bubble'></div>
- </div>
- </c:forEach>
- </div>
- </div>
- <div id='summary-container' class='col s12 card'>
- <span class='summary-header valign-wrapper'>
- <i class='material-icons'>info_outline</i>Run Details
- </span>
- </div>
- </div>
- <div class='col s5 valign-wrapper'>
- <!-- pie chart -->
- <div id='pie-chart-wrapper' class='col s12 valign center-align card'>
- <div id='pie-chart-div'></div>
- </div>
- </div>
- </div>
-
- <div class='col s12' id='test-results-container'></div>
- </div>
-
- <!-- Modal Structure -->
- <div id="apiCoverageModal" class="modal modal-fixed-footer" style="width: 75%;">
- <div class="modal-content">
- <h4 id="coverageModalTitle">API Coverage</h4>
-
- <div class="preloader-wrapper big active loaders">
- <div id="dataTableLoading" class="spinner-layer spinner-blue-only">
- <div class="circle-clipper left">
- <div class="circle"></div>
- </div>
- <div class="gap-patch">
- <div class="circle"></div>
- </div>
- <div class="circle-clipper right">
- <div class="circle"></div>
- </div>
- </div>
- </div>
-
- <div class="row">
- <div class="col s12">
- <ul class="collection with-header">
- <li class="collection-header">
- <h4>Total HAL API List</h4>
- <ul id="halApiList" class="collapsible popout" data-collapsible="expandable">
-
- </ul>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">Close</a>
- </div>
- </div>
-
- <%@ include file="footer.jsp" %>
- </body>
-</html>
diff --git a/src/main/webapp/WEB-INF/jsp/show_profiling_list.jsp b/src/main/webapp/WEB-INF/jsp/show_profiling_list.jsp
deleted file mode 100644
index f1615d7..0000000
--- a/src/main/webapp/WEB-INF/jsp/show_profiling_list.jsp
+++ /dev/null
@@ -1,44 +0,0 @@
-<%--
- ~ Copyright (c) 2017 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-
-<html>
- <link rel='stylesheet' href='/css/show_release.css'>
- <%@ include file='header.jsp' %>
- <body>
- <div class='container'>
- <div class='row'>
- <div class='col s12'>
- <h4 id='section-header'>Profiling Tests</h4>
- </div>
- </div>
- <div class='row' id='options'>
- <c:forEach items='${testNames}' var='test'>
- <div>
- <a href='/show_profiling_overview?testName=${test}'>
- <div class='col s12 card hoverable option valign-wrapper waves-effect'>
- <span class='entry valign'>${test}</span>
- </div>
- </a>
- </div>
- </c:forEach>
- </div>
- </div>
- <%@ include file='footer.jsp' %>
- </body>
-</html>
diff --git a/src/main/webapp/WEB-INF/jsp/show_profiling_overview.jsp b/src/main/webapp/WEB-INF/jsp/show_profiling_overview.jsp
deleted file mode 100644
index 62bd8de..0000000
--- a/src/main/webapp/WEB-INF/jsp/show_profiling_overview.jsp
+++ /dev/null
@@ -1,172 +0,0 @@
-<%--
- ~ Copyright (C) 2017 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-
-<html>
- <%@ 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='/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>
- <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.
- *
- * Args:
- * container: the jquery selector in which to draw the graph.
- * lineGraph: a JSON-serialized BoxPlot.
- */
- function drawBoxPlot(container, plot) {
- var data = new google.visualization.DataTable();
- data.addColumn('string', 'x');
- plot.seriesList.forEach(function(series) {
- data.addColumn('number', series);
- data.addColumn({id:'fill', type:'number', role:'interval'});
- data.addColumn({id:'fill', type:'number', role:'interval'});
- data.addColumn({id:'bar', type:'number', role:'interval'});
- data.addColumn({id:'bar', type:'number', role:'interval'});
- data.addColumn({type:'string', role:'tooltip', p: {'html': true}});
- });
- var rows = plot.values.map(function(day) {
- var dateString = new moment().renderDate(1 * day.label);
- var statArray = day.values.map(function(stat) {
- var tooltip = (
- dateString +
- '</br><b>Mean:</b> ' +
- stat.mean.toFixed(2) +
- '</br><b>Std:</b> ' +
- stat.std.toFixed(2) +
- '</br><b>Count:</b> ' +
- stat.count.toFixed(0));
- return [
- stat.mean,
- stat.mean + stat.std,
- stat.mean - stat.std,
- stat.mean + stat.std,
- stat.mean - stat.std,
- tooltip];
- });
- return [].concat.apply(
- [dateString], statArray);
- });
- data.addRows(rows);
-
- var options = {
- title: plot.name,
- curveType: 'function',
- intervals: { 'color' : 'series-color' },
- interval: {
- 'fill': {
- 'style': 'area',
- 'curveType': 'function',
- 'fillOpacity': 0.2
- },
- 'bar': {
- 'style': 'bars',
- 'barWidth': 0,
- 'lineWidth': 1,
- 'pointSize': 3,
- 'fillOpacity': 1
- }},
- legend: { position: 'bottom' },
- tooltip: { isHtml: true },
- fontName: 'Roboto',
- titleTextStyle: {
- color: '#757575',
- fontSize: 16,
- bold: false
- },
- pointsVisible: true,
- vAxis:{
- title: plot.y_label,
- titleTextStyle: {
- color: '#424242',
- fontSize: 12,
- italic: false
- },
- textStyle: {
- fontSize: 12,
- color: '#757575'
- },
- },
- hAxis: {
- textStyle: {
- fontSize: 12,
- color: '#757575'
- },
- titleTextStyle: {
- color: '#424242',
- fontSize: 12,
- italic: false
- }
- },
- };
- var plot = new google.visualization.LineChart(container[0]);
- plot.draw(data, options);
- }
-
- // Draw all graphs.
- function drawAllPlots() {
- var container = $('#profiling-container');
- container.empty();
-
- plots.forEach(function(g) {
- var plot = $('<div class="box-plot row card"></div>');
- plot.appendTo(container);
- 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>
- <%@ include file="footer.jsp" %>
- </body>
-</html>
diff --git a/src/main/webapp/WEB-INF/jsp/show_release.jsp b/src/main/webapp/WEB-INF/jsp/show_release.jsp
deleted file mode 100644
index 9e8c2eb..0000000
--- a/src/main/webapp/WEB-INF/jsp/show_release.jsp
+++ /dev/null
@@ -1,80 +0,0 @@
-<%--
- ~ Copyright (c) 2017 Google Inc. All Rights Reserved.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-
-<html>
- <link rel='stylesheet' href='/css/show_release.css'>
- <%@ include file='header.jsp' %>
- <script type='text/javascript'>
- $(document).ready(function() {
- $("li.tab").each(function( index ) {
- $(this).click(function() {
- window.open($(this).children().attr("href"), '_self');
- });
- });
- });
- </script>
- <body>
- <div class='container'>
- <div class='row'>
- <div class='col s12'>
-
- <ul class="tabs z-depth-1">
- <li class="tab col s6" id="planTabLink">
- <a class="${testType == 'plan' ? 'active' : 'inactive'}" href="${requestScope['javax.servlet.forward.servlet_path']}?type=plan">Test Plans</a>
- </li>
- <li class="tab col s6" id="suiteTabLink">
- <a class="${testType == 'suite' ? 'active' : 'inactive'}" href="${requestScope['javax.servlet.forward.servlet_path']}?type=suite">Test Suite Plans</a>
- </li>
- </ul>
-
- </div>
- </div>
- <div class='row' id='options'>
- <c:set var="typeParam" scope="session" value="${testType == 'suite' ? '&type=suite' : '&type=plan'}"/>
-
- <c:forEach items='${planNames}' var='plan'>
- <c:choose>
- <c:when test="${isAdmin}">
- <div class="col s10 center">
- <a href='/show_plan_release?plan=${plan}${typeParam}'>
- <div class='col s12 card hoverable option valign-wrapper waves-effect'>
- <span class='entry valign'>${plan}</span>
- </div>
- </a>
- </div>
- <div class="col s2 center btn-container" style="margin-top: 9px;">
- <a href='/show_green_release?plan=${plan}${typeParam}' class="waves-effect waves-light btn">Green</a>
- </div>
- </c:when>
- <c:otherwise>
- <div class="col s12 center">
- <a href='/show_plan_release?plan=${plan}${typeParam}'>
- <div class='col s12 card hoverable option valign-wrapper waves-effect'>
- <span class='entry valign'>${plan}</span>
- </div>
- </a>
- </div>
- </c:otherwise>
- </c:choose>
- </c:forEach>
- </div>
- </div>
- <%@ include file='footer.jsp' %>
- </body>
-</html>
diff --git a/src/main/webapp/WEB-INF/jsp/show_suite_release.jsp b/src/main/webapp/WEB-INF/jsp/show_suite_release.jsp
deleted file mode 100644
index 523291a..0000000
--- a/src/main/webapp/WEB-INF/jsp/show_suite_release.jsp
+++ /dev/null
@@ -1,362 +0,0 @@
-<%--
- ~ Copyright (c) 2018 Google Inc. All Rights Reserved.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-<%@ taglib prefix='fmt' uri='http://java.sun.com/jsp/jstl/fmt'%>
-<jsp:useBean id="startDateObject" class="java.util.Date"/>
-<jsp:useBean id="endDateObject" class="java.util.Date"/>
-<c:set var="timeZone" value="America/Los_Angeles"/>
-
-<html>
- <%@ include file='header.jsp' %>
- <link type='text/css' href='/css/show_test_runs_common.css' rel='stylesheet'>
- <link type='text/css' href='/css/test_results.css' rel='stylesheet'>
- <link rel='stylesheet' href='/css/search_header.css'>
- <script type='text/javascript'>
- $(document).ready(function() {
-
- $.deparam = $.deparam || function(uri){
- if(uri === undefined){
- uri = window.location.search;
- }
- var queryString = {};
- uri.replace(
- new RegExp(
- "([^?=&]+)(=([^&#]*))?", "g"),
- function($0, $1, $2, $3) { queryString[$1] = $3; }
- );
- return queryString;
- };
-
- $("li.tab").each(function( index ) {
- $(this).click(function() {
- window.open($(this).children().attr("href"), '_self');
- });
- });
-
- $(".search-icon-wrapper").click(function() {
- $(".search-wrapper").slideToggle("fast", function() {
- // Animation complete.
- });
- });
-
- <c:if test="${not empty branch or not empty hostName or not empty buildId or not empty deviceName}">
- $(".search-wrapper").slideToggle("fast");
- </c:if>
-
- $("#searchBtn").click(function(event) {
- event.preventDefault();
-
- var url = '<c:out value="${requestScope['javax.servlet.forward.servlet_path']}" escapeXml="false"></c:out>';
- var params = $.deparam('<c:out value="${requestScope['javax.servlet.forward.query_string']}" escapeXml="false"></c:out>');
-
- var branch = $("#deviceBranch").val().trim();
- if ( branch.length > 0 ) {
- params['branch'] = branch;
- } else {
- delete params['branch'];
- }
- var host = $("#host").val().trim();
- if ( host.length > 0 ) {
- params['hostName'] = host;
- } else {
- delete params['hostName'];
- }
- var buildId = $("#deviceBuildId").val().trim();
- if ( buildId.length > 0 ) {
- params['buildId'] = buildId;
- } else {
- delete params['buildId'];
- }
- var deviceName = $("#deviceName").val().trim();
- if ( deviceName.length > 0 ) {
- params['deviceName'] = deviceName;
- } else {
- delete params['deviceName'];
- }
-
- $(location).prop('href', url + "?" + decodeURIComponent($.param(params)));
- $(this).prop('href', url);
- });
-
- $("#deviceBranch").autocomplete({
- source: [ "c++", "java", "php", "coldfusion", "javascript", "asp", "ruby" ],
- open: function( event, ui ) {
- alert("open")
- },
- close: function( event, ui ) {
- alert("close")
- }
- });
-
- $( "div.test-case-container > div.input-field > a.btn" ).each(function() {
- $( this ).click(function() {
- $(this).parent().prev().children().select();
- document.execCommand('copy');
- alert("Reproduce Command copied to clipboard.");
- });
- });
- });
- </script>
- <body>
- <div class='wide container'>
-
- <div class="row card search-bar expanded">
- <div class="header-wrapper">
- <h5 class="section-header">
- <b>Plan: </b><span><c:out value="${plan}"></c:out></span>
- </h5>
- <div class="search-icon-wrapper">
- <i class="material-icons">search</i>
- </div>
- </div>
- <div class="search-wrapper" style="display: none">
- <div class="col s12">
- <div class="input-field col s4">
- <input id="deviceBranch" type="text" value="<c:out value="${branch}"></c:out>" autocomplete="off" />
- <label>Device Branch</label>
- </div>
- <div class="input-field col s4">
- <input id="host" type="text" value="<c:out value="${hostName}"></c:out>" autocomplete="off" />
- <label>Host</label>
- </div>
- <div class="input-field col s4">
- <input id="deviceBuildId" type="text" value="<c:out value="${buildId}"></c:out>" autocomplete="off" />
- <label>Device Build ID</label>
- </div>
- </div>
- <div class="col s12">
- <div class="input-field col s4">
- <input id="deviceName" type="text" value="<c:out value="${deviceName}"></c:out>" autocomplete="off" />
- <label>Device Name</label>
- </div>
- <div class="input-field col s4">
-
- </div>
- <div class="run-type-wrapper col s4 right-align">
- <a class="waves-effect waves-light btn" id="searchBtn">
- <i class="material-icons left">search</i>Apply
- </a>
- </div>
- </div>
- </div>
- </div>
-
- <div class='row'>
- <div class='col s12'>
-
- <ul class="tabs z-depth-1">
- <li class="tab col s4" id="totTabLink">
- <a class="<c:out value="${testCategoryType == '1' ? 'active' : 'inactive'}"></c:out>" href="${requestScope['javax.servlet.forward.servlet_path']}?plan=${plan}&type=${testType}&testCategoryType=1">TOT</a>
- </li>
- <li class="tab col s4" id="signedTabLink">
- <a class="<c:out value="${testCategoryType == '4' ? 'active' : 'inactive'}"></c:out>" href="${requestScope['javax.servlet.forward.servlet_path']}?plan=${plan}&type=${testType}&testCategoryType=4">SIGNED</a>
- </li>
- <li class="tab col s4" id="otaTabLink">
- <a class="<c:out value="${testCategoryType == '2' ? 'active' : 'inactive'}"></c:out>" href="${requestScope['javax.servlet.forward.servlet_path']}?plan=${plan}&type=${testType}&testCategoryType=2">OTA</a>
- </li>
- </ul>
-
- </div>
- </div>
-
- <div class='row' id='test-suite-green-release-container'>
- <div class="col s12">
-
- <ul class="collapsible popout test-runs">
- <c:forEach var="testSuiteResultEntity" items="${testSuiteResultEntityPagination.list}">
- <li class="test-run-container">
- <div class="collapsible-header test-run">
- <div class="row" style="margin-bottom: 0px; line-height: 30px;">
- <div class="col s9">
- <b><c:out value="${testSuiteResultEntity.branch}"></c:out>/<c:out value="${testSuiteResultEntity.target}"></c:out> (<c:out value="${testSuiteResultEntity.buildId}"></c:out>)</b>
- </div>
- <div class="col s3">
- <span class="indicator right center
- <c:choose>
- <c:when test="${testSuiteResultEntity.passedTestCaseCount eq 0 and testSuiteResultEntity.failedTestCaseCount eq 0}">
- black
- </c:when>
- <c:otherwise>
- green
- </c:otherwise>
- </c:choose>
- ">
- <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="${integerVal eq '100'}">
- 100%
- </c:when>
- <c:otherwise>
- <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>
- )
- </span>
- <c:if test="${!testSuiteResultEntity.bootSuccess}">
- <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>Device Name: </b><c:out value="${testSuiteResultEntity.deviceName}"></c:out><br>
- </span>
- </div>
- <div class="col s5">
- <span class="suite-test-run-metadata">
- <b>Host: </b><c:out value="${testSuiteResultEntity.hostName}"></c:out><br>
- <b>Modules: </b><c:out value="${testSuiteResultEntity.modulesDone}"></c:out>/<c:out value="${testSuiteResultEntity.modulesTotal}"></c:out><br>
- </span>
- </div>
- <div class="col s2" style="padding: 5px 12px;">
- <a href="<c:out value="${testSuiteResultEntity.buganizerLink}"></c:out>" class="waves-effect waves-light btn right blue-grey" style="padding: 0 15px;" target="_blank">
- Buganizer
- </a>
- </div>
- <div class="col s12">
- <span class="suite-test-run-metadata">
- <b>Result Log Path: </b>
- <a href="show_gcs_log?path=${testSuiteResultEntity.screenResultLogPath}">
- <c:out value="${testSuiteResultEntity.screenResultLogPath}"></c:out>
- </a>
- <br>
- <b>Infra Log Path: </b>
- <a href="show_gcs_log/download?file=${testSuiteResultEntity.screenInfraLogPath}">
- <c:out value="${testSuiteResultEntity.screenInfraLogPath}"></c:out>
- </a>
- <br>
- </span>
- </div>
- <div class="col s10">
- <span style="font-size: 13px;">
- <jsp:setProperty name="startDateObject" property="time" value="${testSuiteResultEntity.startTime}"/>
- <jsp:setProperty name="endDateObject" property="time" value="${testSuiteResultEntity.endTime}"/>
- <fmt:formatDate value="${startDateObject}" pattern="yyyy-MM-dd HH:mm:ss" timeZone="${timeZone}" /> - <fmt:formatDate value="${endDateObject}" pattern="yyyy-MM-dd HH:mm:ss z" timeZone="${timeZone}" />
- <c:set var="executionTime" scope="page" value="${(testSuiteResultEntity.endTime - testSuiteResultEntity.startTime) / 1000}"/>
- (<c:out value="${executionTime}"></c:out>s)
- </span>
- </div>
- <div class="col s2">
- <i class="material-icons expand-arrow">expand_more</i>
- </div>
- </div>
- </div>
- <div class="collapsible-body test-results row" style="display: none;">
- <div class="col test-col grey lighten-5 s12 left-most right-most">
- <h5 class="test-result-label white" style="text-transform: capitalize;">
- Vendor Fingerprint
- </h5>
- <div class="test-case-container">
- <c:out value="${testSuiteResultEntity.buildVendorFingerprint}"></c:out>
- </div>
- </div>
- <div class="col test-col grey lighten-5 s12 left-most right-most">
- <h5 class="test-result-label white" style="text-transform: capitalize;">
- System Fingerprint
- </h5>
- <div class="test-case-container">
- <c:out value="${testSuiteResultEntity.buildSystemFingerprint}"></c:out>
- </div>
- </div>
- <div class="col test-col grey lighten-5 s12 left-most right-most">
- <h5 class="test-result-label white" style="text-transform: capitalize;">
- Reproduce Command
- </h5>
- <div class="row test-case-container">
- <div class="input-field col s9">
- <input type="text" class="validate" readonly="true" onclick="this.select()" value="reproduce --report_path=gs://vts-report/<c:out value="${testSuiteResultEntity.getTestSuiteFileEntityKey().getName()}"></c:out> --suite=<c:out value="${fn:toLowerCase(testSuiteResultEntity.getSuiteName())}"></c:out>" />
- </div>
- <div class="input-field col s3">
- <a class="waves-effect waves-light btn right"><i class="material-icons left">content_copy</i>Copy</a>
- </div>
- </div>
- </div>
- </div>
- </li>
- </c:forEach>
- </ul>
-
- </div>
- </div>
-
- <div class="row">
- <c:set var="searchQueryString" value="" />
- <c:if test="${not empty branch}">
- <c:set var="searchQueryString" value="${searchQueryString}&branch=${branch}" />
- </c:if>
- <c:if test="${not empty hostName}">
- <c:set var="searchQueryString" value="${searchQueryString}&hostName=${hostName}" />
- </c:if>
- <c:if test="${not empty buildId}">
- <c:set var="searchQueryString" value="${searchQueryString}&buildId=${buildId}" />
- </c:if>
- <c:if test="${not empty deviceName}">
- <c:set var="searchQueryString" value="${searchQueryString}&deviceName=${deviceName}" />
- </c:if>
- <div class="col s12 center-align">
- <ul class="pagination">
- <c:choose>
- <c:when test="${testSuiteResultEntityPagination.minPageRange gt testSuiteResultEntityPagination.pageSize}">
- <li class="waves-effect">
- <a href="${requestScope['javax.servlet.forward.servlet_path']}?plan=${plan}&type=${testType}&testCategoryType=${testCategoryType}&page=${testSuiteResultEntityPagination.minPageRange - 1}&nextPageToken=${testSuiteResultEntityPagination.previousPageCountToken}${searchQueryString}">
- <i class="material-icons">chevron_left</i>
- </a>
- </li>
- </c:when>
- <c:otherwise>
-
- </c:otherwise>
- </c:choose>
- <c:forEach var="pageLoop" begin="${testSuiteResultEntityPagination.minPageRange}" end="${testSuiteResultEntityPagination.maxPageRange}">
- <li class="waves-effect<c:if test="${pageLoop eq page}"> active</c:if>">
- <a href="${requestScope['javax.servlet.forward.servlet_path']}?plan=${plan}&type=${testType}&testCategoryType=${testCategoryType}&page=${pageLoop}<c:if test="${testSuiteResultEntityPagination.currentPageCountToken ne ''}">&nextPageToken=${testSuiteResultEntityPagination.currentPageCountToken}</c:if>${searchQueryString}">
- <c:out value="${pageLoop}" />
- </a>
- </li>
- </c:forEach>
- <c:choose>
- <c:when test="${testSuiteResultEntityPagination.maxPages gt testSuiteResultEntityPagination.pageSize}">
- <li class="waves-effect">
- <a href="${requestScope['javax.servlet.forward.servlet_path']}?plan=${plan}&type=${testType}&testCategoryType=${testCategoryType}&page=${testSuiteResultEntityPagination.maxPageRange + 1}&nextPageToken=${testSuiteResultEntityPagination.nextPageCountToken}${searchQueryString}">
- <i class="material-icons">chevron_right</i>
- </a>
- </li>
- </c:when>
- <c:otherwise>
-
- </c:otherwise>
- </c:choose>
- </ul>
- </div>
- </div>
-
- </div>
- <%@ include file='footer.jsp' %>
- </body>
-</html>
diff --git a/src/main/webapp/WEB-INF/jsp/show_table.jsp b/src/main/webapp/WEB-INF/jsp/show_table.jsp
deleted file mode 100644
index ec4597c..0000000
--- a/src/main/webapp/WEB-INF/jsp/show_table.jsp
+++ /dev/null
@@ -1,338 +0,0 @@
-<%--
- ~ Copyright (c) 2016 Google Inc. All Rights Reserved.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-
-<html>
- <%@ include file="header.jsp" %>
- <link type='text/css' href='/css/show_table.css' rel='stylesheet'>
- <link type='text/css' href='/css/show_test_runs_common.css' rel='stylesheet'>
- <link type='text/css' href='/css/search_header.css' rel='stylesheet'>
- <script type='text/javascript' src='https://www.gstatic.com/charts/loader.js'></script>
- <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'>
- google.charts.load('current', {'packages':['table', 'corechart']});
- google.charts.setOnLoadCallback(drawGridTable);
- google.charts.setOnLoadCallback(activateLogLinks);
- google.charts.setOnLoadCallback(drawPieChart);
- google.charts.setOnLoadCallback(function() {
- $('.gradient').removeClass('gradient');
- });
-
- var search;
-
- $(document).ready(function() {
- search = $('#filter-bar').createSearchHeader('Module: ', '${testName}', refresh);
- search.addFilter('Branch', 'branch', {
- corpus: ${branches}
- }, ${branch});
- search.addFilter('Device', 'device', {
- 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', {
- validate: 'inequality',
- width: 's2'
- }, ${passing});
- search.addFilter('Non-Passing Count', 'nonpassing', {
- validate: 'inequality',
- width: 's2'
- }, ${nonpassing});
- search.addRunTypeCheckboxes(${showPresubmit}, ${showPostsubmit});
- search.display();
-
- // disable buttons on load
- if (!${hasNewer}) {
- $('#newer-button').toggleClass('disabled');
- }
- if (!${hasOlder}) {
- $('#older-button').toggleClass('disabled');
- }
- $('#treeLink').click(function() {
- window.open('/show_tree?testName=${testName}&treeDefault=true', '_self');
- });
- $('#newer-button').click(prev);
- $('#older-button').click(next);
- });
-
- // Actives the log links to display the log info modal when clicked.
- function activateLogLinks() {
- $('.info-btn').click(function(e) {
- showLog(${logInfoMap}[$(this).data('col')]);
- });
- }
-
- /** Displays a modal window with the specified log entries.
- *
- * @param logEntries Array of string arrays. Each entry in the outer array
- * must contain (1) name string, and (2) url string.
- */
- function showLog(logEntries) {
- if (!logEntries || logEntries.length == 0) return;
-
- var logList = $('<ul class="collection"></ul>');
- var entries = logEntries.reduce(function(acc, entry) {
- if (!entry || entry.length == 0) return acc;
- var link = '<a href="' + entry[1] + '"';
- link += 'class="collection-item">' + entry[0] + '</li>';
- return acc + link;
- }, '');
- logList.html(entries);
- var infoContainer = $('#info-modal>.modal-content>.info-container');
- infoContainer.empty();
- logList.appendTo(infoContainer);
- var modal = $('#info-modal');
- modal.modal();
- modal.modal('open');
- }
-
- // refresh the page to see the selected test types (pre-/post-submit)
- function refresh() {
- if($(this).hasClass('disabled')) return;
- var link = '${pageContext.request.contextPath}' +
- '/show_table?testName=${testName}' + search.args();
- if (${unfiltered}) {
- link += '&unfiltered=';
- }
- window.open(link,'_self');
- }
-
- // view older data
- function next() {
- if($(this).hasClass('disabled')) return;
- var endTime = ${startTime};
- var link = '${pageContext.request.contextPath}' +
- '/show_table?testName=${testName}&endTime=' + endTime +
- search.args();
- if (${unfiltered}) {
- link += '&unfiltered=';
- }
- window.open(link,'_self');
- }
-
- // view newer data
- function prev() {
- if($(this).hasClass('disabled')) return;
- var startTime = ${endTime};
- var link = '${pageContext.request.contextPath}' +
- '/show_table?testName=${testName}&startTime=' + startTime +
- search.args();
- if (${unfiltered}) {
- link += '&unfiltered=';
- }
- window.open(link,'_self');
- }
-
- // to draw pie chart
- function drawPieChart() {
- var topBuildResultCounts = ${topBuildResultCounts};
- if (topBuildResultCounts.length < 1) {
- return;
- }
- var resultNames = ${resultNamesJson};
- var rows = resultNames.map(function(res, i) {
- nickname = res.replace('TEST_CASE_RESULT_', '').replace('_', ' ')
- .trim().toLowerCase();
- return [nickname, parseInt(topBuildResultCounts[i])];
- });
- rows.unshift(['Result', 'Count']);
-
- // Get CSS color definitions (or default to white)
- var colors = resultNames.map(function(res) {
- return $('.' + res).css('background-color') || 'white';
- });
-
- var data = google.visualization.arrayToDataTable(rows);
- var options = {
- is3D: false,
- colors: colors,
- fontName: 'Roboto',
- fontSize: '14px',
- legend: {position: 'bottom'},
- tooltip: {showColorCode: true, ignoreBounds: false},
- chartArea: {height: '80%', width: '90%'},
- pieHole: 0.4
- };
-
- var chart = new google.visualization.PieChart(document.getElementById('pie-chart-div'));
- chart.draw(data, options);
- }
-
- // table for grid data
- function drawGridTable() {
- var data = new google.visualization.DataTable();
-
- // Add column headers.
- headerRow = ${headerRow};
- headerRow.forEach(function(d, i) {
- var classNames = 'table-header-content';
- if (i == 0) classNames += ' table-header-legend';
- data.addColumn('string', '<span class="' + classNames + '">' +
- d + '</span>');
- });
-
- var timeGrid = ${timeGrid};
- var durationGrid = ${durationGrid};
- var summaryGrid = ${summaryGrid};
- var resultsGrid = ${resultsGrid};
-
- // Format time grid to a formatted date
- timeGrid = timeGrid.map(function(row) {
- return row.map(function(cell, j) {
- if (j == 0) return cell;
- return moment().renderTime(cell);
- });
- });
-
- // Format duration grid to HH:mm:ss.SSS
- durationGrid = durationGrid.map(function(row) {
- return row.map(function(cell, j) {
- if (j == 0) return cell;
- return moment().renderDuration(cell);
- });
- });
-
- // add rows to the data.
- data.addRows(timeGrid);
- data.addRows(durationGrid);
- data.addRows(summaryGrid);
- data.addRows(resultsGrid);
-
- var table = new google.visualization.Table(document.getElementById('grid-table-div'));
- var classNames = {
- headerRow : 'table-header',
- headerCell : 'table-header-cell'
- };
- var options = {
- showRowNumber: false,
- alternatingRowStyle: true,
- allowHtml: true,
- frozenColumns: 1,
- cssClassNames: classNames,
- sort: 'disable'
- };
- table.draw(data, options);
- }
- </script>
-
- <body>
- <div class='wide container'>
- <div class='row'>
- <div class='col s12'>
- <div class='card'>
- <ul class='tabs'>
- <li class='tab col s6' id='treeLink'><a>Tree</a></li>
- <li class='tab col s6'><a class='active'>Table</a></li>
- </ul>
- </div>
- <div id='filter-bar'></div>
- </div>
- <div class='col s7'>
- <div class='col s12 card center-align'>
- <div id='legend-wrapper'>
- <c:forEach items='${resultNames}' var='res'>
- <div class='center-align legend-entry'>
- <c:set var='trimmed' value='${fn:replace(res, "TEST_CASE_RESULT_", "")}'/>
- <c:set var='nickname' value='${fn:replace(trimmed, "_", " ")}'/>
- <label for='${res}'>${nickname}</label>
- <div id='${res}' class='${res} legend-bubble'></div>
- </div>
- </c:forEach>
- </div>
- </div>
- <div id='profiling-container' class='col s12'>
- <c:choose>
- <c:when test='${empty profilingPointNames}'>
- <div id='error-div' class='center-align card'><h5>${error}</h5></div>
- </c:when>
- <c:otherwise>
- <ul id='profiling-body' class='collapsible' data-collapsible='accordion'>
- <li>
- <div class='collapsible-header'><i class='material-icons'>timeline</i>Profiling Graphs</div>
- <div class='collapsible-body'>
- <ul id='profiling-list' class='collection'>
- <c:forEach items='${profilingPointNames}' var='pt'>
- <c:set var='profPointArgs' value='testName=${testName}&profilingPoint=${pt}'/>
- <c:set var='timeArgs' value='endTime=${endTime}'/>
- <a href='/show_graph?${profPointArgs}&${timeArgs}'
- class='collection-item profiling-point-name'>${pt}
- </a>
- </c:forEach>
- </ul>
- </div>
- </li>
- <li>
- <a class='collapsible-link' href='/show_performance_digest?testName=${testName}'>
- <div class='collapsible-header'><i class='material-icons'>toc</i>Performance Digest</div>
- </a>
- </li>
- </ul>
- </c:otherwise>
- </c:choose>
- </div>
- </div>
- <div class='col s5 valign-wrapper'>
- <!-- pie chart -->
- <div id='pie-chart-wrapper' class='col s12 valign center-align card'>
- <h6 class='pie-chart-title'>Test Status for Device Build ID: ${topBuildId}</h6>
- <div id='pie-chart-div'></div>
- </div>
- </div>
- </div>
-
- <div class='col s12'>
- <div id='chart-holder' class='col s12 card'>
- <!-- Grid tables-->
- <div id='grid-table-div'></div>
- </div>
- </div>
- <div id='newer-wrapper' class='page-button-wrapper fixed-action-btn'>
- <a id='newer-button' class='btn-floating btn red waves-effect'>
- <i class='large material-icons'>keyboard_arrow_left</i>
- </a>
- </div>
- <div id='older-wrapper' class='page-button-wrapper fixed-action-btn'>
- <a id='older-button' class='btn-floating btn red waves-effect'>
- <i class='large material-icons'>keyboard_arrow_right</i>
- </a>
- </div>
- </div>
- <div id="help-modal" class="modal">
- <div class="modal-content">
- <h4>${searchHelpHeader}</h4>
- <p>${searchHelpBody}</p>
- </div>
- <div class="modal-footer">
- <a href="#!" class="modal-action modal-close waves-effect btn-flat">Close</a>
- </div>
- </div>
- <div id="info-modal" class="modal">
- <div class="modal-content">
- <h4>Logs</h4>
- <div class="info-container"></div>
- </div>
- <div class="modal-footer">
- <a href="#!" class="modal-action modal-close waves-effect btn-flat">Close</a>
- </div>
- </div>
- <%@ include file="footer.jsp" %>
- </body>
-</html>
diff --git a/src/main/webapp/WEB-INF/jsp/show_test_acknowledgments.jsp b/src/main/webapp/WEB-INF/jsp/show_test_acknowledgments.jsp
deleted file mode 100644
index 84ece88..0000000
--- a/src/main/webapp/WEB-INF/jsp/show_test_acknowledgments.jsp
+++ /dev/null
@@ -1,52 +0,0 @@
-<%--
- ~ Copyright (c) 2017 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-
-<html>
- <link rel='stylesheet' href='/css/show_test_acknowledgments.css'>
- <link rel='stylesheet' href='/css/test_acknowledgments.css'>
- <%@ include file='header.jsp' %>
- <script src='js/test_acknowledgments.js'></script>
- <script>
- $(document).ready(function() {
- $('#favoritesLink').click(function() {
- window.open('/', '_self');
- });
- $('#allLink').click(function() {
- window.open('/?showAll=true', '_self');
- });
- var acks = $('#acknowledgments').testAcknowledgments(
- ${allTests}, ${branches}, ${devices}, ${testAcknowledgments}, ${readOnly});
- });
- </script>
- <body>
- <div class='container wide'>
- <div class='row home-tabs-row'>
- <div class='col s12'>
- <ul class='tabs'>
- <li class='tab col s4' id='favoritesLink'><a>Favorites</a></li>
- <li class='tab col s4' id='allLink'><a>All Tests</a></li>
- <li class='tab col s4'><a class='active'>Test Acknowledgements</a></li>
- </ul>
- </div>
- </div>
- <div class='row' id='acknowledgments'></div>
- </div>
- <%@ include file='footer.jsp' %>
- </body>
-</html>
diff --git a/src/main/webapp/WEB-INF/jsp/show_tree.jsp b/src/main/webapp/WEB-INF/jsp/show_tree.jsp
deleted file mode 100644
index aa9b311..0000000
--- a/src/main/webapp/WEB-INF/jsp/show_tree.jsp
+++ /dev/null
@@ -1,323 +0,0 @@
-<%--
- ~ Copyright (c) 2016 Google Inc. All Rights Reserved.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License"); you
- ~ may not use this file except in compliance with the License. You may
- ~ obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- ~ implied. See the License for the specific language governing
- ~ permissions and limitations under the License.
- --%>
-<%@ page contentType='text/html;charset=UTF-8' language='java' %>
-<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
-<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
-
-<html>
- <%@ include file="header.jsp" %>
- <link type='text/css' href='/css/show_test_runs_common.css' rel='stylesheet'>
- <link type='text/css' href='/css/test_results.css' rel='stylesheet'>
- <link rel='stylesheet' href='/css/search_header.css'>
- <script type='text/javascript' src='https://www.gstatic.com/charts/loader.js'></script>
- <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 src='js/test_results.js'></script>
- <script type='text/javascript'>
- google.charts.load('current', {'packages':['table', 'corechart']});
- google.charts.setOnLoadCallback(drawPieChart);
-
- var search;
-
- $(document).ready(function() {
- search = $('#filter-bar').createSearchHeader('Module: ', '${testName}', refresh);
- search.addFilter('Branch', 'branch', {
- corpus: ${branches}
- }, ${branch});
- search.addFilter('Device', 'device', {
- 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', {
- validate: 'inequality',
- width: 's2'
- }, ${passing});
- search.addFilter('Non-Passing Count', 'nonpassing', {
- validate: 'inequality',
- width: 's2'
- }, ${nonpassing});
- search.addRunTypeCheckboxes(${showPresubmit}, ${showPostsubmit});
- search.display();
-
- // disable buttons on load
- if (!${hasNewer}) {
- $('#newer-button').toggleClass('disabled');
- }
- if (!${hasOlder}) {
- $('#older-button').toggleClass('disabled');
- }
- $('#tableLink').click(function() {
- window.open('/show_table?testName=${testName}&treeDefault=false', '_self');
- });
- $('#newer-button').click(prev);
- $('#older-button').click(next);
- $('#test-results-container').showTests(${testRuns});
-
- $('#apiCoverageModal').modal({
- width: '75%',
- dismissible: true, // Modal can be dismissed by clicking outside of the modal
- opacity: .5, // Opacity of modal background
- inDuration: 300, // Transition in duration
- outDuration: 200, // Transition out duration
- startingTop: '4%', // Starting top style attribute
- endingTop: '10%', // Ending top style attribute
- ready: function(modal, trigger) { // Callback for Modal open. Modal and trigger parameters available.
- var urlSafeKeyList = modal.data('urlSafeKeyList');
- var halApiInfoList = [];
- var getAjaxList = $.map( urlSafeKeyList, function( urlSafeKey ) {
- return $.get( "/api/coverage/api/data?key=" + urlSafeKey, function(data) {
- halApiInfoList.push(data);
- })
- .fail(function() {
- alert( "Error : can't bring API coverage data from the server" );
- });
- });
-
- $.when.apply($, getAjaxList).then(function() {
- $.each(halApiInfoList, function( index, data ) {
- $("#halApiList").append(halApiListTemplate());
- var version = data.halMajorVersion + '.' + data.halMinorVersion;
- var defaultInfo = data.halPackageName + '@' + version + '::' + data.halInterfaceName;
- $("#halApiList > li:last > div.collapsible-header").html(
- '<i class="material-icons">report</i> HAL API Information : ' + defaultInfo
- );
-
- $("#halApiList > li:last > div.collapsible-body > ul.collection.with-header").append(
- $.map( data.halApi, function( apiName, idx ) {
- var colorClass = data.coveredHalApi.indexOf(apiName) > -1 ? "green" : "red"
- return '<li class="collection-item ' + colorClass + ' lighten-1">' + apiName + '</li>';
- }).join("")
- );
- $("#halApiList").collapsible('open', index);
- });
- $('#dataTableLoading').hide("slow");
- });
- },
- complete: function() {
- $("#halApiList").empty();
- $('#dataTableLoading').show("slow");
- } // Callback for Modal close
- }
- );
- });
-
- function halApiListTemplate() {
- return '<li>' +
- '<div class="collapsible-header">' +
- '<i class="material-icons">report</i> API Information' +
- '</div>' +
- '<div class="collapsible-body">' +
- '<ul class="collection with-header">' +
- '</ul>' +
- '</div>' +
- '</li>';
- }
-
- // refresh the page to see the selected test types (pre-/post-submit)
- function refresh() {
- if($(this).hasClass('disabled')) return;
- var link = '${pageContext.request.contextPath}' +
- '/show_tree?testName=${testName}' + search.args();
- if (${unfiltered}) {
- link += '&unfiltered=';
- }
- window.open(link,'_self');
- }
-
- // view older data
- function next() {
- if($(this).hasClass('disabled')) return;
- var endTime = ${startTime};
- var link = '${pageContext.request.contextPath}' +
- '/show_tree?testName=${testName}&endTime=' + endTime +
- search.args();
- if (${unfiltered}) {
- link += '&unfiltered=';
- }
- window.open(link,'_self');
- }
-
- // view newer data
- function prev() {
- if($(this).hasClass('disabled')) return;
- var startTime = ${endTime};
- var link = '${pageContext.request.contextPath}' +
- '/show_tree?testName=${testName}&startTime=' + startTime +
- search.args();
- if (${unfiltered}) {
- link += '&unfiltered=';
- }
- window.open(link,'_self');
- }
-
- // to draw pie chart
- function drawPieChart() {
- var topBuildResultCounts = ${topBuildResultCounts};
- if (topBuildResultCounts.length < 1) {
- return;
- }
- var resultNames = ${resultNamesJson};
- var rows = resultNames.map(function(res, i) {
- nickname = res.replace('TEST_CASE_RESULT_', '').replace('_', ' ')
- .trim().toLowerCase();
- return [nickname, parseInt(topBuildResultCounts[i])];
- });
- rows.unshift(['Result', 'Count']);
-
- // Get CSS color definitions (or default to white)
- var colors = resultNames.map(function(res) {
- return $('.' + res).css('background-color') || 'white';
- });
-
- var data = google.visualization.arrayToDataTable(rows);
- var options = {
- is3D: false,
- colors: colors,
- fontName: 'Roboto',
- fontSize: '14px',
- legend: {position: 'bottom'},
- tooltip: {showColorCode: true, ignoreBounds: false},
- chartArea: {height: '80%', width: '90%'},
- pieHole: 0.4
- };
-
- var chart = new google.visualization.PieChart(document.getElementById('pie-chart-div'));
- chart.draw(data, options);
- }
- </script>
-
- <body>
- <div class='wide container'>
- <div class='row'>
- <div class='col s12'>
- <div class='card'>
- <ul class='tabs'>
- <li class='tab col s6'><a class='active'>Tree</a></li>
- <li class='tab col s6' id='tableLink'><a>Table</a></li>
- </ul>
- </div>
- <div id='filter-bar'></div>
- </div>
- <div class='col s7'>
- <div class='col s12 card center-align'>
- <div id='legend-wrapper'>
- <c:forEach items='${resultNames}' var='res'>
- <div class='center-align legend-entry'>
- <c:set var='trimmed' value='${fn:replace(res, "TEST_CASE_RESULT_", "")}'/>
- <c:set var='nickname' value='${fn:replace(trimmed, "_", " ")}'/>
- <label for='${res}'>${nickname}</label>
- <div id='${res}' class='${res} legend-bubble'></div>
- </div>
- </c:forEach>
- </div>
- </div>
- <div id='profiling-container' class='col s12'>
- <c:choose>
- <c:when test='${empty profilingPointNames}'>
- <div id='error-div' class='center-align card'><h5>${error}</h5></div>
- </c:when>
- <c:otherwise>
- <ul id='profiling-body' class='collapsible' data-collapsible='accordion'>
- <li>
- <div class='collapsible-header'><i class='material-icons'>timeline</i>Profiling Graphs</div>
- <div class='collapsible-body'>
- <ul id='profiling-list' class='collection'>
- <c:forEach items='${profilingPointNames}' var='pt'>
- <c:set var='profPointArgs' value='testName=${testName}&profilingPoint=${pt}'/>
- <c:set var='timeArgs' value='endTime=${endTime}'/>
- <a href='/show_graph?${profPointArgs}&${timeArgs}'
- class='collection-item profiling-point-name'>${pt}
- </a>
- </c:forEach>
- </ul>
- </div>
- </li>
- <li>
- <a class='collapsible-link' href='/show_performance_digest?testName=${testName}'>
- <div class='collapsible-header'><i class='material-icons'>toc</i>Performance Digest</div>
- </a>
- </li>
- </ul>
- </c:otherwise>
- </c:choose>
- </div>
- </div>
- <div class='col s5 valign-wrapper'>
- <!-- pie chart -->
- <div id='pie-chart-wrapper' class='col s12 valign center-align card'>
- <h6 class='pie-chart-title'>${topBuildId}</h6>
- <div id='pie-chart-div'></div>
- </div>
- </div>
- </div>
-
- <div class='col s12' id='test-results-container'>
- </div>
- <div id='newer-wrapper' class='page-button-wrapper fixed-action-btn'>
- <a id='newer-button' class='btn-floating btn red waves-effect'>
- <i class='large material-icons'>keyboard_arrow_left</i>
- </a>
- </div>
- <div id='older-wrapper' class='page-button-wrapper fixed-action-btn'>
- <a id='older-button' class='btn-floating btn red waves-effect'>
- <i class='large material-icons'>keyboard_arrow_right</i>
- </a>
- </div>
- </div>
-
- <!-- Modal Structure -->
- <div id="apiCoverageModal" class="modal modal-fixed-footer" style="width: 75%;">
- <div class="modal-content">
- <h4 id="coverageModalTitle">API Coverage</h4>
-
- <div class="preloader-wrapper big active loaders">
- <div id="dataTableLoading" class="spinner-layer spinner-blue-only">
- <div class="circle-clipper left">
- <div class="circle"></div>
- </div>
- <div class="gap-patch">
- <div class="circle"></div>
- </div>
- <div class="circle-clipper right">
- <div class="circle"></div>
- </div>
- </div>
- </div>
-
- <div class="row">
- <div class="col s12">
- <ul class="collection with-header">
- <li class="collection-header">
- <h4>Total HAL API List</h4>
- <ul id="halApiList" class="collapsible popout" data-collapsible="expandable">
-
- </ul>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">Close</a>
- </div>
- </div>
-
- <%@ include file="footer.jsp" %>
- </body>
-</html>
diff --git a/src/main/webapp/WEB-INF/queue.xml b/src/main/webapp/WEB-INF/queue.xml
deleted file mode 100644
index 3a116f2..0000000
--- a/src/main/webapp/WEB-INF/queue.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (C) 2017 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<queue-entries>
- <queue>
- <name>profilingStatsQueue</name>
- <rate>200/s</rate>
- <bucket-size>40</bucket-size>
- </queue>
- <queue>
- <name>suiteTestQueue</name>
- <rate>20/s</rate>
- <bucket-size>40</bucket-size>
- <max-concurrent-requests>10</max-concurrent-requests>
- </queue>
- <queue>
- <name>coverageApiQueue</name>
- <rate>20/s</rate>
- <bucket-size>100</bucket-size>
- <max-concurrent-requests>10</max-concurrent-requests>
- </queue>
-</queue-entries> \ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index a683f48..0000000
--- a/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,363 +0,0 @@
-<web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5">
-<!--
-Copyright 2016 Google Inc. All Rights Reserved.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<listener>
- <listener-class>
- com.android.vts.config.ObjectifyListener
- </listener-class>
-</listener>
-
-<filter>
- <filter-name>ObjectifyFilter</filter-name>
- <filter-class>com.googlecode.objectify.ObjectifyFilter</filter-class>
-</filter>
-<filter-mapping>
- <filter-name>ObjectifyFilter</filter-name>
- <url-pattern>/*</url-pattern>
-</filter-mapping>
-
-<servlet>
- <servlet-name>dashboard_main</servlet-name>
- <servlet-class>com.android.vts.servlet.DashboardMainServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>show_release</servlet-name>
- <servlet-class>com.android.vts.servlet.ShowReleaseServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>show_green_release</servlet-name>
- <servlet-class>com.android.vts.servlet.ShowGreenReleaseServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>show_coverage_overview</servlet-name>
- <servlet-class>com.android.vts.servlet.ShowCoverageOverviewServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>show_tree</servlet-name>
- <servlet-class>com.android.vts.servlet.ShowTreeServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>show_table</servlet-name>
- <servlet-class>com.android.vts.servlet.ShowTableServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>show_graph</servlet-name>
- <servlet-class>com.android.vts.servlet.ShowGraphServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>show_profiling_list</servlet-name>
- <servlet-class>com.android.vts.servlet.ShowProfilingListServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>show_profiling_overview</servlet-name>
- <servlet-class>com.android.vts.servlet.ShowProfilingOverviewServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>show_plan_release</servlet-name>
- <servlet-class>com.android.vts.servlet.ShowPlanReleaseServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>show_plan_run</servlet-name>
- <servlet-class>com.android.vts.servlet.ShowPlanRunServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>show_performance_digest</servlet-name>
- <servlet-class>com.android.vts.servlet.ShowPerformanceDigestServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>show_coverage</servlet-name>
- <servlet-class>com.android.vts.servlet.ShowCoverageServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>show_test_acknowledgments</servlet-name>
- <servlet-class>com.android.vts.servlet.ShowTestAcknowledgmentServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>show_gcs_log</servlet-name>
- <servlet-class>com.android.vts.servlet.ShowGcsLogServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>test_data_api</servlet-name>
- <servlet-class>com.android.vts.api.TestDataForDevServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>datastore_api</servlet-name>
- <servlet-class>com.android.vts.api.DatastoreRestServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>data_api</servlet-name>
- <servlet-class>com.android.vts.api.DataRestServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>coverage_api</servlet-name>
- <servlet-class>com.android.vts.api.CoverageRestServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>test_run_api</servlet-name>
- <servlet-class>com.android.vts.api.TestRunRestServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>favorites_api</servlet-name>
- <servlet-class>com.android.vts.api.UserFavoriteRestServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>test_suite_api</servlet-name>
- <servlet-class>com.android.vts.api.TestSuiteResultRestServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>bigtable_legacy_api</servlet-name>
- <servlet-class>com.android.vts.api.BigtableLegacyJsonServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>test_acknowledgments</servlet-name>
- <servlet-class>com.android.vts.api.TestAcknowledgmentRestServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>vts_alert_job</servlet-name>
- <servlet-class>com.android.vts.job.VtsAlertJobServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>vts_performance_job</servlet-name>
- <servlet-class>com.android.vts.job.VtsPerformanceJobServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>vts_profiling_stats_job</servlet-name>
- <servlet-class>com.android.vts.job.VtsProfilingStatsJobServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>vts_coverage_job</servlet-name>
- <servlet-class>com.android.vts.job.VtsCoverageAlertJobServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>vts_inactivity_job</servlet-name>
- <servlet-class>com.android.vts.job.VtsInactivityJobServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>vts_spreadsheet_sync_job</servlet-name>
- <servlet-class>com.android.vts.job.VtsSpreadSheetSyncServlet</servlet-class>
-</servlet>
-
-<servlet>
- <servlet-name>suite_test_report_gcs_monitor_job</servlet-name>
- <servlet-class>com.android.vts.job.VtsSuiteTestJobServlet</servlet-class>
-</servlet>
-
-<servlet-mapping>
- <servlet-name>dashboard_main</servlet-name>
- <url-pattern>/</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>show_release</servlet-name>
- <url-pattern>/show_release/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>show_green_release</servlet-name>
- <url-pattern>/show_green_release/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>show_coverage_overview</servlet-name>
- <url-pattern>/show_coverage_overview/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>show_tree</servlet-name>
- <url-pattern>/show_tree/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>show_table</servlet-name>
- <url-pattern>/show_table/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>show_graph</servlet-name>
- <url-pattern>/show_graph/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>show_profiling_list</servlet-name>
- <url-pattern>/show_profiling_list/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>show_profiling_overview</servlet-name>
- <url-pattern>/show_profiling_overview/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>show_plan_release</servlet-name>
- <url-pattern>/show_plan_release/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>show_plan_run</servlet-name>
- <url-pattern>/show_plan_run/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>show_performance_digest</servlet-name>
- <url-pattern>/show_performance_digest/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>show_coverage</servlet-name>
- <url-pattern>/show_coverage/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>show_test_acknowledgments</servlet-name>
- <url-pattern>/show_test_acknowledgments/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>show_gcs_log</servlet-name>
- <url-pattern>/show_gcs_log/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>bigtable_legacy_api</servlet-name>
- <url-pattern>/api/bigtable/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>test_data_api</servlet-name>
- <url-pattern>/api/test_data/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>datastore_api</servlet-name>
- <url-pattern>/api/datastore/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>data_api</servlet-name>
- <url-pattern>/api/data/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>coverage_api</servlet-name>
- <url-pattern>/api/coverage/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>test_run_api</servlet-name>
- <url-pattern>/api/test_run/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>favorites_api</servlet-name>
- <url-pattern>/api/favorites/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>test_acknowledgments</servlet-name>
- <url-pattern>/api/test_acknowledgments/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>test_suite_api</servlet-name>
- <url-pattern>/api/test_suite/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>vts_alert_job</servlet-name>
- <url-pattern>/task/vts_alert_job/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>vts_coverage_job</servlet-name>
- <url-pattern>/task/vts_coverage_job/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>vts_profiling_stats_job</servlet-name>
- <url-pattern>/task/vts_profiling_stats_job/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>vts_performance_job</servlet-name>
- <url-pattern>/cron/vts_performance_job/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>vts_inactivity_job</servlet-name>
- <url-pattern>/cron/vts_inactivity_job/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>vts_spreadsheet_sync_job</servlet-name>
- <url-pattern>/cron/vts_spreadsheet_sync_job/*</url-pattern>
-</servlet-mapping>
-
-<servlet-mapping>
- <servlet-name>suite_test_report_gcs_monitor_job</servlet-name>
- <url-pattern>/cron/test_suite_report_gcs_monitor/*</url-pattern>
-</servlet-mapping>
-
-<security-constraint>
- <web-resource-collection>
- <web-resource-name>tasks</web-resource-name>
- <url-pattern>/cron/*</url-pattern>
- <url-pattern>/task/*</url-pattern>
- </web-resource-collection>
- <auth-constraint>
- <role-name>admin</role-name>
- </auth-constraint>
-</security-constraint>
-
-<security-constraint>
- <web-resource-collection>
- <web-resource-name>all</web-resource-name>
- <url-pattern>/show_*</url-pattern>
- </web-resource-collection>
- <auth-constraint>
- <role-name>*</role-name>
- </auth-constraint>
-</security-constraint>
-</web-app>
diff --git a/src/main/webapp/css/common.css b/src/main/webapp/css/common.css
deleted file mode 100644
index 3e0a1c9..0000000
--- a/src/main/webapp/css/common.css
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (C) 2017 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-@media only screen and (min-width: 993px) {
- .wide.container {
- width: 80%;
- max-width: 1600px;
- min-height: 80vh;
- }
-}
-.TEST_CASE_RESULT_PASS {
- background-color: #7FFF00;
-}
-.TEST_CASE_RESULT_FAIL {
- background-color: #ff4d4d;
-}
-.TEST_CASE_RESULT_SKIP {
- background-color: #A8A8A8;
-}
-.TEST_CASE_RESULT_EXCEPTION {
- background-color: black;
-}
-.TEST_CASE_RESULT_TIMEOUT {
- background-color: #9900CC;
-}
-.UNKNOWN_RESULT {
- background-color: white;
- border: 1px #A8A8A8 solid;
-}
diff --git a/src/main/webapp/css/dashboard_main.css b/src/main/webapp/css/dashboard_main.css
deleted file mode 100644
index e4b4658..0000000
--- a/src/main/webapp/css/dashboard_main.css
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Copyright (C) 2016 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-.row.home-tabs-row {
- margin-bottom: 50px;
-}
-
-.row.home-tabs-row li.col.tab {
- cursor: pointer;
- user-select: none;
-}
-
-#add-button-wrapper {
- margin-top: 10px;
- height: 61px;
-}
-
-.btn-container > .btn-flat {
- margin-top: 8px;
- user-select: none;
- color: grey;
-}
-
-.btn-container > .btn-flat.inactive {
- color: lightgray;
-}
-
-.row .col.card.option {
- padding: 6px 15px 6px 15px;
- margin: 5px 0;
- border-radius: 25px;
-}
-
-#error-container {
- padding-top: 50px;
- padding-bottom: 50px;
-}
-
-.entry {
- font-size: 20px;
- font-weight: 300;
- position: relative;
-}
-
-.indicator {
- color: white;
- font-size: 12px;
- font-weight: bold;
- padding: 1px 6px;
- right: 0;
- min-width: 40px;
- border-radius: 10px;
- margin-top: 5px;
-}
-
-#show-button {
- border-radius: 100px;
-}
-
-#show-button-arrow {
- margin-left: 3px;
-}
-
-#section-header {
- cursor: default;
- user-select: none;
- color: #ee6e73;
-}
-
-#section-header:after {
- border: 1px solid #ee6e73;
- margin-top: 10px;
- margin-bottom: 0;
- display: block;
- content: " ";
-}
-
-.ui-menu {
- overflow-y: auto;
- z-index: 100;
- max-height: 50%;
-}
-
-.ui-menu-item {
- font-size: 16px;
- padding: 4px 10px;
- transition: background-color .25s;
-}
-
-.ui-menu-item:hover {
- background-color: #e0f2f1;
-}
-
-.ui-menu-item:active {
- background-color: #b2dfdb;
-}
-
-.ui-helper-hidden-accessible {
- display: none;
-}
diff --git a/src/main/webapp/css/datepicker.css b/src/main/webapp/css/datepicker.css
deleted file mode 100644
index b98dd80..0000000
--- a/src/main/webapp/css/datepicker.css
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Copyright (C) 2016 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-.ui-datepicker table {
- font-family: Roboto !important;
- font-size: 13px !important;
- white-space: nowrap !important;
-}
-
-#ui-datepicker-div {
- font-family: "Roboto", sans-serif;
- padding: 0;
-}
-
-.ui-corner-all {
- border-bottom-right-radius: 0 !important;
- border-bottom-left-radius: 0 !important;
- border-top-right-radius: 0 !important;
- border-top-left-radius: 0 !important;
-}
-
-.ui-datepicker td span.ui-state-default, .ui-datepicker td a.ui-state-default {
- text-align: center;
- padding: 0.7em 0.4em;
- border: none;
- border-radius: 10em;
- background: none;
-}
-
-.ui-datepicker td span.ui-state-hover, .ui-datepicker td a.ui-state-hover {
- background: #e0f2f1;
-}
-
-.ui-datepicker td span.ui-state-active, .ui-datepicker td a.ui-state-active {
- color: white;
- font-weight: 600;
- background: #009688;
-}
-
-.ui-datepicker-header.ui-widget-header.ui-helper-clearfix.ui-corner-all {
- background: #009688;
- border: none;
- color: white;
-}
-
-.ui-datepicker-next.ui-state-hover.ui-datepicker-next-hover {
- right: 2px;
- top: 2px;
-}
-
-.ui-datepicker-prev.ui-state-hover.ui-datepicker-prev-hover {
- left: 2px;
- top: 2px;
-}
-
-.ui-datepicker-next.ui-corner-all.ui-state-hover, .ui-datepicker-prev.ui-corner-all.ui-state-hover {
- background: none;
- border: none;
-}
diff --git a/src/main/webapp/css/navbar.css b/src/main/webapp/css/navbar.css
deleted file mode 100644
index cf16f60..0000000
--- a/src/main/webapp/css/navbar.css
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Copyright (C) 2016 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-nav#navbar {
- margin-bottom: 30px;
- user-select: none;
-}
-nav#navbar .nav-wrapper {
- height: auto;
-}
-nav#navbar ul.nav-list {
- display: inline-block;
-}
-nav#navbar ul li {
- transition: background-color .3s;
- float: left;
- padding: 0;
-}
-nav#navbar ul li.active {
- background-color: rgba(0,0,0,0.1);
-}
-nav#navbar ul li a:hover, nav#navbar ul li.active {
- background-color: #ea454b;
-}
-nav#navbar ul a.nav-list-item {
- font-size: 1.2rem;
-}
-nav#navbar #nav-sublist {
- line-height: 35px;
- background: white;
- padding-left: 15px;
- width: 100%;
- display: inline-block;
- position: relative;
-}
-nav#navbar #nav-sublist .breadcrumb.nav-sublist-item {
- font-size: 15px;
- font-weight: 400;
- color: rgba(238, 110, 115, 0.85);
- line-height: 35px;
-}
-nav#navbar #nav-sublist .breadcrumb.nav-sublist-item:last-child {
- color: rgb(238, 110, 115);
- font-weight: 500;
-}
-nav#navbar #nav-sublist .breadcrumb.nav-sublist-item::before {
- font-size: 22px;
- color: rgba(238, 110, 115, 0.85);
- line-height: 35px;
- margin: 0 5px;
-}
-nav#navbar #dropdown-button {
- font-style: italic;
- color: rgba(255, 255, 255, 0.75);
- margin-left: 0;
- margin-top: 0;
-}
diff --git a/src/main/webapp/css/plan_runs.css b/src/main/webapp/css/plan_runs.css
deleted file mode 100644
index b84a656..0000000
--- a/src/main/webapp/css/plan_runs.css
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright (C) 2017 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-.release-entry {
- border-radius: 5px 5px 10px 10px;
- margin: 0 0 0.65rem 0;
-}
-.release-entry .plan-run-metadata {
- text-overflow: ellipsis;
- overflow-x: hidden;
- white-space: nowrap;
- display: inline-block;
- font-size: 13px;
- color: black;
- line-height: 16px;
- padding: 7px;
- width: 100%;
-}
-.counter {
- color: white;
- font-size: 12px;
- font-weight: bold;
- display: block;
- border-radius: 0 0 10px 10px;
-} \ No newline at end of file
diff --git a/src/main/webapp/css/search_header.css b/src/main/webapp/css/search_header.css
deleted file mode 100644
index d3abaf3..0000000
--- a/src/main/webapp/css/search_header.css
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Copyright (C) 2017 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-.row.card.search-bar {
- margin-left: 0;
- margin-right: 0;
-}
-.row.card.search-bar.expanded {
- border-radius: 0 0 15px 15px;
-}
-.search-bar .section-header {
- color: rgb(97, 97, 97);
- font-weight: 300;
- padding: 15px 20px 15px;
- margin: 0;
- cursor: default;
- user-select: none;
- display: inline-block;
-}
-.search-bar .section-header b {
- color: #ee6e73;
-}
-.search-bar .search-icon-wrapper {
- text-align: center;
- display: inline-block;
- position: absolute;
- right: 0;
- height: 57px;
- width: 57px;
- cursor: pointer;
- user-select: none;
-}
-.search-bar .search-icon-wrapper i {
- line-height: 57px;
- color: rgb(97, 97, 97);
-}
-.search-bar .search-wrapper {
- border-top: 1px solid rgb(221, 221, 221);
-}
-.search-bar .search-wrapper .refresh-wrapper a {
- float: right;
- margin-top: 17px;
-}
-.search-bar .input-field input[type=text].invalid {
- color: #F44336;
-}
-.search-bar .search-wrapper .run-type-wrapper {
- margin: 20px 0;
-}
-.search-bar .search-wrapper .run-type-wrapper [type="checkbox"]+label {
- margin-right: 35px;
-}
-.search-bar-menu.ui-menu {
- overflow: auto;
- z-index: 100;
- max-height: 75%;
-}
-.search-bar-menu .ui-menu-item {
- font-size: 16px;
- padding: 4px 10px;
- transition: background-color .25s;
-}
-.search-bar-menu .ui-menu-item:hover {
- background-color: #e0f2f1;
-}
-
-.search-bar-menu .ui-menu-item:active {
- background-color: #b2dfdb;
-}
-.ui-helper-hidden-accessible {
- display: none;
-}
diff --git a/src/main/webapp/css/show_coverage.css b/src/main/webapp/css/show_coverage.css
deleted file mode 100644
index 7178ec3..0000000
--- a/src/main/webapp/css/show_coverage.css
+++ /dev/null
@@ -1,117 +0,0 @@
-/* Copyright (C) 2016 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-.collapsible.popout {
- margin-bottom: 50px;
-}
-
-.table {
- font-size: 12px;
- border: none;
- width: 100%;
- word-spacing: 4px;
- font-family: monospace;
- white-space: PRE;
- border-collapse: collapse;
-}
-
-.section-title {
- margin-left: 24px;
-}
-
-.html-container {
- padding: 25px 25px;
-}
-
-.login-button {
- border: 1px solid gray;
- color: gray;
- border-radius: 15px;
- padding: 4px 15px;
- cursor: pointer;
-}
-
-td {
- padding: 0;
-}
-
-.count {
- white-space: nowrap;
- text-align: right;
- border-right: 1px solid black;
- padding-right: 5px;
-}
-
-.line_no {
- padding-left: 35px;
- white-space: nowrap;
- padding-right: 5px;
- border-right: 1px dotted gray;
-}
-
-.code {
- padding-left: 10px;
- width: 99%;
-}
-
-.indicator {
- display: inline-block;
- width: 50px;
- line-height: 18px;
- border-radius: 10px;
- padding: 3px 5px;
- font-size: 12px;
- font-weight: bold;
- color: white;
-}
-
-.total-count {
- margin-left: auto;
- margin-right: 8px;
- padding-right: 5px;
- line-height: 22px;
- border-right: 1px solid gray;
- font-size: 12px;
- font-weight: bold;
- color: gray;
-}
-
-.uncovered {
- background-color: LightPink;
-}
-
-.covered {
- background-color: LightGreen;
-}
-
-.source-name {
- margin-top: -25px;
- padding-left: 45px;
-}
-
-.loader-background {
- display: flex;
- align-items: center;
- justify-content: center;
- background-color: #000;
-
- position: fixed;
- z-index: 100;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- opacity: 0.5;
-} \ No newline at end of file
diff --git a/src/main/webapp/css/show_gcs_log.css b/src/main/webapp/css/show_gcs_log.css
deleted file mode 100644
index 1960485..0000000
--- a/src/main/webapp/css/show_gcs_log.css
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-.loading-overlay {
- display: none;
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background-color: #A8A8A8;
- opacity: 0.4;
-}
diff --git a/src/main/webapp/css/show_graph.css b/src/main/webapp/css/show_graph.css
deleted file mode 100644
index 51e4c04..0000000
--- a/src/main/webapp/css/show_graph.css
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Copyright (C) 2016 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-#download {
- bottom: 25px;
- right: 25px;
-}
-
-#header-container {
- padding: 50px;
- padding-bottom: 30px;
-}
-
-#device-select-wrapper {
- margin-top: 0;
-}
-
-#date-container {
- padding: 0 50px;
- padding-bottom: 25px;
-}
-
-#load {
- margin-top: 5px;
-}
-
-.profiling-name {
- font-weight: 200;
- font-style: italic;
- font-size: 1.4rem
-}
-
-#error-container {
- padding-top: 25px;
- padding-bottom: 25px;
-}
-
-.graph-wrapper {
- padding: 30px;
-}
-
-.graph {
- height: 500px;
- padding-bottom: 30px;
-}
-
-.percentile-table {
- width: auto;
- margin: auto;
- margin-top: 20px;
-}
-
-.percentile-table td, th{
- font-size: 11px;
- text-align: center;
- padding: 5px 10px;
-}
-
diff --git a/src/main/webapp/css/show_performance_digest.css b/src/main/webapp/css/show_performance_digest.css
deleted file mode 100644
index 5d0c0e6..0000000
--- a/src/main/webapp/css/show_performance_digest.css
+++ /dev/null
@@ -1,82 +0,0 @@
-/* Copyright (C) 2016 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-#header-container {
- padding: 25px;
-}
-
-#load {
- margin-top: 15px;
-}
-
-#device-select-wrapper {
- margin-top: 9px;
-}
-
-#date {
- margin-bottom: 0;
- margin-top: 10px;
-}
-
-div.col.card.summary {
- padding: 0 20px 20px;
-}
-
-.profiling-name {
- font-weight: 200;
- font-style: italic;
- font-size: 1.4rem
-}
-
-.profiling-subtitle {
- font-style: italic;
- font-size: 12px;
- margin-left: 2px;
-}
-
-.summary table {
- width: 100%;
- border-collapse: collapse;
- border: 1px solid black;
- font-size: 12px;
- font-family: Roboto !important;
-}
-
-.summary table td, th {
- padding: 2px;
-}
-
-.section-label {
- border: 1px solid black;
-}
-
-.axis-label {
- border-top: 1px solid lightgray;
- border-right: 1px solid black;
- text-align: right;
-}
-
-.cell {
- border-top: 1px solid lightgray;
- text-align: right;
-}
-
-.inner-cell {
- border-right: 1px solid lightgray;
-}
-
-.outer-cell {
- border-right: 1px solid black;
-}
diff --git a/src/main/webapp/css/show_plan_release.css b/src/main/webapp/css/show_plan_release.css
deleted file mode 100644
index f55b8da..0000000
--- a/src/main/webapp/css/show_plan_release.css
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Copyright (C) 2017 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-.page-button-wrapper {
- top: 50%;
- bottom: auto;
- padding: 0;
-}
-#newer-wrapper {
- left: 23px;
- right: auto;
-}
diff --git a/src/main/webapp/css/show_profiling_overview.css b/src/main/webapp/css/show_profiling_overview.css
deleted file mode 100644
index 76c194d..0000000
--- a/src/main/webapp/css/show_profiling_overview.css
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Copyright (C) 2017 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-.row.card.box-plot {
- height: 400px;
- padding: 25px 10px;
-}
-div.google-visualization-tooltip {
- padding: 10px;
- white-space: nowrap;
-}
diff --git a/src/main/webapp/css/show_release.css b/src/main/webapp/css/show_release.css
deleted file mode 100644
index 1f1758b..0000000
--- a/src/main/webapp/css/show_release.css
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright (C) 2017 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-.row .col.card.option {
- padding: 10px 15px 10px 25px;
- margin: 5px 0;
- border-radius: 25px;
-}
-.entry {
- font-size: 20px;
- font-weight: 300;
- position: relative;
-}
-#show-button-arrow {
- margin-left: 3px;
-}
-#section-header {
- cursor: default;
- user-select: none;
- color: #ee6e73;
-}
-#section-header:after {
- border: 1px solid #ee6e73;
- margin-top: 10px;
- margin-bottom: 0;
- display: block;
- content: " ";
-}
diff --git a/src/main/webapp/css/show_table.css b/src/main/webapp/css/show_table.css
deleted file mode 100644
index 627d859..0000000
--- a/src/main/webapp/css/show_table.css
+++ /dev/null
@@ -1,137 +0,0 @@
-/* Copyright (C) 2016 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-table {
- font-family: Roboto !important;
- font-size: 13px !important;
- white-space: nowrap !important;
-}
-.table-header-cell {
- background-color: white;
- transition: max-width 1s;
- max-width: 150px;
-}
-.table-header-cell:hover {
- transition-delay: 0.5s;
- max-width: 1000px;
-}
-.table-header-content.table-header-legend {
- max-width: none;
-}
-.table-header-content {
- font-weight: initial;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- display: inline-block;
- max-width: inherit;
- width: 100%;
-}
-.page-button-wrapper {
- top: 50%;
- bottom: auto;
- padding: 0;
-}
-#newer-wrapper {
- left: 23px;
- right: auto;
-}
-#chart-holder {
- padding: 30px 5px;
-}
-#pie-chart-div {
- width: 100%;
- height: 300px;
-}
-#profiling-container {
- padding: 0;
-}
-#error-div {
- padding: 30px 25px;
-}
-#profiling-body {
- border: none;
-}
-#profiling-list {
- max-height: 200px;
- overflow-y: scroll;
-}
-.collapsible-header {
- user-select: none;
-}
-.collapsible-link {
- color: inherit;
-}
-.collection a.collection-item.profiling-point-name {
- color: #616161;
- font-size: 13px;
- padding: 2px 0 2px 25px;
-}
-#legend-wrapper {
- display: inline-block;
- padding: 10px 15px 12px;
-}
-.btn.inline-btn {
- border-radius: 50px;
- height: auto;
- line-height: inherit;
- padding: 1px;
- margin-left: 2px;
-}
-i.material-icons.inline-icon {
- font-size: inherit;
-}
-a.legend-circle {
- width: 15px;
- height: 15px;
- padding: 0;
- border-radius: 15px;
-}
-.legend-header-cell {
- text-transform: capitalize;
-}
-.legend-entry {
- display: inline-block;
- margin: 0 5px;
- min-width: 50px;
-}
-.legend-bubble {
- border-radius: 20px;
- height: 20px;
- width: 20px;
- margin: 0 auto;
-}
-#pie-chart-wrapper {
- padding: 25px 0;
-}
-.pie-chart-title {
- cursor: default;
-}
-div.status-icon {
- width: 10px;
- height: 10px;
- border-radius: 10px;
- display: inline-block;
- margin-left: 5px;
-}
-.test-case-status {
- border-radius: 50px;
- display: inline-block;
- height: 100%;
- width: 100%;
-}
-.test-case-status.width-1 {
- width: calc(100% - 18px);
-}
diff --git a/src/main/webapp/css/show_test_acknowledgments.css b/src/main/webapp/css/show_test_acknowledgments.css
deleted file mode 100644
index 38edb31..0000000
--- a/src/main/webapp/css/show_test_acknowledgments.css
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Copyright (C) 2017 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-.row.home-tabs-row {
- margin-bottom: 50px;
-}
-.row.home-tabs-row li.col.tab {
- cursor: pointer;
- user-select: none;
-} \ No newline at end of file
diff --git a/src/main/webapp/css/show_test_runs_common.css b/src/main/webapp/css/show_test_runs_common.css
deleted file mode 100644
index ff48b73..0000000
--- a/src/main/webapp/css/show_test_runs_common.css
+++ /dev/null
@@ -1,156 +0,0 @@
-/* Copyright (C) 2017 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-.page-button-wrapper {
- top: 50%;
- bottom: auto;
- padding: 0;
-}
-#newer-wrapper {
- left: 23px;
- right: auto;
-}
-#chart-holder {
- padding: 30px 5px;
-}
-#pie-chart-div {
- width: 100%;
- height: 300px;
-}
-.row .col div.pie-chart-div {
- width: 100%;
- height: 255px;
-}
-#profiling-container {
- padding: 0;
-}
-#summary-container {
- padding: 0;
- line-height: 18px;
- font-weight: 300;
- color: rgb(97, 97, 97);
-}
-#summary-container .summary-header {
- font-size: 18px;
- font-weight: normal;
- color: rgba(0, 0, 0, 0.87);
- border-bottom: 1px solid rgb(221, 221, 221);
- margin: 0;
- padding: 10px 15px;
-}
-#summary-container .summary-header i {
- margin-right: 10px;
-}
-#summary-container div {
- margin: 15px;
-}
-#error-div {
- padding: 30px 25px;
-}
-#profiling-body {
- border: none;
-}
-#profiling-list {
- max-height: 200px;
- overflow-y: scroll;
-}
-.collapsible-header {
- user-select: none;
-}
-.collapsible-link {
- color: inherit;
-}
-.collection a.collection-item.profiling-point-name {
- color: #616161;
- font-size: 13px;
- padding: 2px 0 2px 25px;
-}
-#legend-wrapper {
- display: inline-block;
- padding: 10px 15px 12px;
-}
-.btn.inline-btn {
- border-radius: 50px;
- height: auto;
- line-height: inherit;
- padding: 1px;
- margin-left: 2px;
-}
-i.material-icons.inline-icon {
- font-size: inherit;
-}
-a.legend-circle {
- width: 15px;
- height: 15px;
- padding: 0;
- border-radius: 15px;
-}
-.legend-header-cell {
- text-transform: capitalize;
-}
-.legend-entry {
- display: inline-block;
- margin: 0 5px;
- min-width: 50px;
-}
-.legend-bubble {
- border-radius: 20px;
- height: 20px;
- width: 20px;
- margin: 0 auto;
-}
-#pie-chart-wrapper, .row .col.pie-chart-wrapper {
- padding: 25px 0;
-}
-.pie-chart-title {
- cursor: default;
-}
-div.status-icon {
- width: 10px;
- height: 10px;
- border-radius: 10px;
- display: inline-block;
- margin-left: 5px;
-}
-.test-case-status {
- border-radius: 50px;
- display: inline-block;
- height: 100%;
- width: 100%;
-}
-.test-case-status.width-1 {
- width: calc(100% - 18px);
-}
-.TEST_CASE_RESULT_PASS {
- background-color: #4CAF50;
-}
-.TEST_CASE_RESULT_FAIL {
- background-color: #F44336;
-}
-.TEST_CASE_RESULT_SKIP {
- background-color: #A8A8A8;
-}
-.TEST_CASE_RESULT_EXCEPTION {
- background-color: black;
-}
-.TEST_CASE_RESULT_TIMEOUT {
- background-color: #9900CC;
-}
-.UNKNOWN_RESULT {
- background-color: white;
- border: 1px #A8A8A8 solid;
-}
-.tabs > div.indicator {
- height: 3px;
-}
diff --git a/src/main/webapp/css/test_acknowledgments.css b/src/main/webapp/css/test_acknowledgments.css
deleted file mode 100644
index 834b86d..0000000
--- a/src/main/webapp/css/test_acknowledgments.css
+++ /dev/null
@@ -1,145 +0,0 @@
-/* Copyright (C) 2017 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-div.col.s12.section-header-col:after {
- border: 1px solid #ee6e73;
- margin-top: 10px;
- margin-bottom: 0;
- display: block;
- content: " ";
-}
-div.col.s12.section-header-col h4.section-header {
- cursor: default;
- user-select: none;
- color: #ee6e73;
-}
-div.col.s12.section-header-col p.acknowledgment-info {
- font-size: 18px;
- color: rgba(0,0,0,0.6);
- font-weight: 300;
-}
-.search-row .input-field.col.s8 > label {
- pointer-events: none;
-}
-.search-row .col.s1 .btn.btn-floating {
- margin-top: 22px;
-}
-.acknowledgments {
- width: 100%;
- margin-top: 25px;
- display: inline-block;
-}
-.ack-entry .col.card {
- margin: 5px 0;
- border-radius: 5px;
- word-break: break-word;
- cursor: pointer;
-}
-.ack-entry span.info-icon.right {
- padding: 5px 0 0 0;
- height: auto;
- margin-right: -15px;
- pointer-events: none;
-}
-.ack-entry span.info-icon.right i {
- font-size: 16px;
- line-height: 16px;
- user-select: none;
- color: grey;
-}
-.ack-entry .btn-container > .btn-flat {
- margin-top: 10px;
- user-select: none;
- color: grey;
-}
-.ack-entry .count-indicator {
- font-size: 12px;
- font-style: italic;
- font-weight: 300;
- vertical-align: text-top;
-}
-.acknowledgments-modal.modal {
- width: 80%;
-}
-.acknowledgments-modal.modal h4, .acknowledgments-modal.modal h5 {
- user-select: none;
- cursor: default;
-}
-.acknowledgments-modal.modal .modal-content .row .modal-section > .col {
- padding: 0;
-}
-.acknowledgments-modal.modal .modal-content h5 {
- color: rgb(97, 97, 97);
- font-weight: 300;
-}
-.acknowledgments-modal.modal .modal-content h5 b {
- color: #ee6e73;
-}
-.acknowledgments-modal.modal .modal-content .chips {
- max-height: 30%;
- overflow-y: auto;
-}
-.acknowledgments-modal.modal .modal-content .chips .chip {
- font-size: 13px;
- height: auto;
- line-height: 13px;
- padding: 5px 10px;
- margin-right: 5px;
- margin-top: 5px;
-}
-.acknowledgments-modal.modal .modal-content .chips .chip i.material-icons {
- line-height: 13px;
-}
-.acknowledgments-modal.modal .modal-content .input-container {
- position: relative;
-}
-.acknowledgments-modal.modal .modal-content .input-container .material-icons.add-button {
- position: absolute;
- top: 13px;
- right: 5px;
- color: #9e9e9e;
- cursor: pointer;
-}
-.acknowledgments-modal.modal .modal-content .input-container > input[type=text] {
- font-size: 15px;
- height: 30px;
- border: 0;
- color: rgba(0,0,0,0.6);
- margin-top: 10px;
-}
-.acknowledgments-modal.modal .modal-content .input-field {
- margin-top: -25px;
-}
-.acknowledgments-modal.modal .modal-content .input-field textarea.note-field:disabled {
- color: rgba(0,0,0,0.6);
-}
-.ui-autocomplete.card.autocomplete-dropdown {
- z-index: 10000000;
- overflow: auto;
- max-height: 250px;
-}
-.ui-autocomplete.card.autocomplete-dropdown .ui-menu-item {
- font-size: 12px;
- padding: 4px 10px;
- transition: background-color .25s;
-}
-.ui-autocomplete.card.autocomplete-dropdown .ui-menu-item:hover {
- background-color: #e0f2f1;
-}
-.ui-autocomplete.card.autocomplete-dropdown .ui-menu-item:active {
- background-color: #b2dfdb;
-}
-.ui-helper-hidden-accessible {
- display: none;
-}
diff --git a/src/main/webapp/css/test_results.css b/src/main/webapp/css/test_results.css
deleted file mode 100644
index 1e7c13b..0000000
--- a/src/main/webapp/css/test_results.css
+++ /dev/null
@@ -1,117 +0,0 @@
-/* Copyright (C) 2017 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-li.test-run-container.active {
- border-radius: 0 0 10px 10px;
-}
-.collapsible-header {
- user-select: none;
-}
-.collapsible-header.disabled {
- pointer-events: none;
-}
-.collapsible-header.test-run {
- position: relative;
-}
-.test-run-metadata {
- font-size: 13px;
- line-height: 15px;
- padding-top: 10px;
- padding-bottom: 10px;
- position: relative;
- display: inline-block;
- cursor: text;
- user-select: initial;
-}
-.suite-test-run-metadata {
- font-size: 13px;
- line-height: 15px;
- position: relative;
- display: inline-block;
- cursor: text;
- user-select: initial;
-}
-.test-results.row {
- margin: 0;
- border-radius: 0 0 10px 10px;
-}
-.test-case-container {
- font-weight: 400;
- padding: 10px 15px 15px;
- max-height: 33%;
- overflow: auto;
- box-shadow: inset 0 5px 7px -5px lightgrey;
-}
-.row .col.test-col {
- padding: 0;
-}
-.row .col.test-col.bordered {
- border-right: 1px solid lightgray;
-}
-.row .col.test-col.left-most {
- border-radius: 0 0 0 10px;
-}
-.row .col.test-col.right-most {
- border-radius: 0 0 10px 0;
-}
-.row .col.test-col.left-most.right-most {
- border-radius: 0 0 10px 10px;
-}
-.test-result-label {
- text-transform: capitalize;
- border-bottom: 1px solid lightgray;
- padding: 4px 15px;
- margin: 0;
-}
-.loaders {
- position: absolute;
- left:0;
- right:0;
- top:0;
- bottom:0;
- margin:auto;
-}
-.indicator {
- color: white;
- font-size: 12px;
- line-height: 20px;
- font-weight: bold;
- padding: 1px 6px;
- margin-top: 10px;
- min-width: 40px;
- border-radius: 10px;
-}
-.indicator.padded {
- margin-right: 5px;
-}
-.test-col .indicator {
- margin-top: 2px;
-}
-.material-icons.expand-arrow {
- right: 3px;
- bottom: 0px;
- position: absolute;
- transition: transform 0.2s;
-}
-.rotate {
- transform: rotate(-180deg);
-}
-i.material-icons.inline-icon {
- font-size: inherit;
-}
-.test-run-label {
- font-size: 18px;
- line-height: 35px;
- font-weight: 300;
-}
diff --git a/src/main/webapp/js/common.js b/src/main/webapp/js/common.js
deleted file mode 100644
index a815868..0000000
--- a/src/main/webapp/js/common.js
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * Copyright (c) 2018 Google Inc. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may
- * obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-/**
- * Display the log links in a modal window.
- * @param linkList A list of [name, url] tuples representing log links.
- */
-function showLinks(container, linkList) {
- if (!linkList || linkList.length == 0) return;
-
- var logCollection = $('<ul class="collection"></ul>');
- var entries = linkList.reduce(function(acc, entry) {
- if (!entry || entry.length == 0) return acc;
- var link = '<a href="' + entry[1] + '"';
- link += 'class="collection-item">' + entry[0] + '</li>';
- return acc + link;
- }, '');
- logCollection.html(entries);
-
- if (container.find('#info-modal').length == 0) {
- var modal =
- $('<div id="info-modal" class="modal modal-fixed-footer"></div>');
- var content = $('<div class="modal-content"></div>');
- content.append('<h4>Links</h4>');
- content.append('<div class="info-container"></div>');
- content.appendTo(modal);
- var footer = $('<div class="modal-footer"></div>');
- footer.append('<a class="btn-flat modal-close">Close</a></div>');
- footer.appendTo(modal);
- modal.appendTo(container);
- }
- var infoContainer = $('#info-modal>.modal-content>.info-container');
- infoContainer.empty();
- logCollection.appendTo(infoContainer);
- $('#info-modal').modal({dismissible: true});
- $('#info-modal').modal('open');
-}
-
-/**
- * Get the nickname for a test case result.
- *
- * Removes the result prefix and suffix, extracting only the result name.
- *
- * @param testCaseResult The string name of a VtsReportMessage.TestCaseResult.
- * @returns the string nickname of the result.
- */
-function getNickname(testCaseResult) {
- return testCaseResult.replace('TEST_CASE_RESULT_', '')
- .replace('_RESULT', '')
- .trim()
- .toLowerCase();
-}
-
-/**
- * Display test data in the body beneath a test run's metadata.
- * @param container The jquery object in which to insert the test metadata.
- * @param data The json object containing the columns to display.
- * @param lineHeight The height of each list element.
- */
-function displayTestDetails(container, data, lineHeight) {
- var nCol = data.length;
- var width = 's' + (12 / nCol);
- test = container;
- var maxLines = 0;
- data.forEach(function(column, index) {
- if (column.data == undefined || column.name == undefined) {
- return;
- }
- var classes = 'col test-col grey lighten-5 ' + width;
- if (index != nCol - 1) {
- classes += ' bordered';
- }
- if (index == 0) {
- classes += ' left-most';
- }
- if (index == nCol - 1) {
- classes += ' right-most';
- }
- var colContainer = $('<div class="' + classes + '"></div>');
- var col = $('<div class="test-case-container"></div>');
- colContainer.appendTo(container);
- var count = column.data.length;
- var head = $('<h5 class="test-result-label white"></h5>')
- .text(getNickname(column.name))
- .appendTo(colContainer)
- .css('text-transform', 'capitalize');
- $('<div class="indicator right center"></div>')
- .text(count)
- .addClass(column.name)
- .appendTo(head);
- col.appendTo(colContainer);
- var list = $('<ul></ul>').appendTo(col);
- column.data.forEach(function(testCase) {
- $('<li></li>')
- .text(testCase)
- .addClass('test-case')
- .css('font-size', lineHeight - 2)
- .css('line-height', lineHeight + 'px')
- .appendTo(list);
- });
- if (count > maxLines) {
- maxLines = count;
- }
- });
- var containers = container.find('.test-case-container');
- containers.height(maxLines * lineHeight);
-}
diff --git a/src/main/webapp/js/plan_runs.js b/src/main/webapp/js/plan_runs.js
deleted file mode 100644
index 6f11083..0000000
--- a/src/main/webapp/js/plan_runs.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Copyright (c) 2017 Google Inc. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may
- * obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-(function ($, moment) {
-
- /**
- * Display test plan metadata in a vertical popout.
- * @param container The jquery object in which to insert the plan metadata.
- * @param metadataList The list of metadata objects to render on the display.
- */
- function renderCard(container, entry) {
- var card = $('<a class="col s12 m6 l4"></a>');
- var link = (
- '/show_plan_run?plan=' + entry.testPlanRun.testPlanName +
- '&time=' + entry.testPlanRun.startTimestamp);
- card.attr('href', link);
- card.appendTo(container);
- var div = $('<div class="hoverable card release-entry"></div>');
- var startTime = entry.testPlanRun.startTimestamp;
- var endTime = entry.testPlanRun.endTimestamp;
- div.appendTo(card);
- var span = $('<span></span>');
- span.addClass('plan-run-metadata');
- span.appendTo(div);
- $('<b></b>').text(entry.deviceInfo).appendTo(span);
- span.append('<br>');
- $('<b></b>').text('VTS Build: ').appendTo(span);
- span.append(entry.testPlanRun.testBuildId).append('<br>');
- var timeString = (
- moment().renderTime(startTime, false) + ' - ' +
- moment().renderTime(endTime, true) + ' (' +
- moment().renderDuration(endTime - startTime) + ')');
- span.append(timeString);
- var counter = $('<span></span>');
- var color = entry.testPlanRun.failCount > 0 ? 'red' : 'green';
- counter.addClass('counter center ' + color);
- counter.append(
- entry.testPlanRun.passCount + '/' +
- (entry.testPlanRun.passCount + entry.testPlanRun.failCount));
- counter.appendTo(div);
- }
-
- $.fn.showPlanRuns = function(data) {
- var self = $(this);
- data.forEach(function (entry) {
- renderCard(self, entry);
- })
- }
-
-})(jQuery, moment);
diff --git a/src/main/webapp/js/search_header.js b/src/main/webapp/js/search_header.js
deleted file mode 100644
index 4f108c4..0000000
--- a/src/main/webapp/js/search_header.js
+++ /dev/null
@@ -1,251 +0,0 @@
-/**
- * Copyright (c) 2017 Google Inc. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may
- * obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-(function ($) {
- var _inequalityRegex = '(^)(<|>|<=|>=|=)?[ ]*?[0-9]+$';
- var _inequalityHint = 'e.g. 5, >0, <=10';
-
- function _validate(input, valueSet) {
- var value = input.val();
- if (valueSet.has(value) || !value) {
- input.removeClass('invalid');
- } else {
- input.addClass('invalid');
- }
- }
-
- function _createInput(key, config) {
- var value = config.value;
- var values = config.options.corpus;
- var displayName = config.displayName;
- var width = config.options.width || 's4';
- var div = $('<div class="input-field col"></div>');
- div.addClass(width);
- var input = $('<input class="filter-input"></input>');
- input.attr('type', config.options.type || 'text');
- input.appendTo(div);
- var label = $('<label></label>').text(displayName).appendTo(div);
- if (value) {
- input.attr('value', value);
- label.addClass('active');
- }
- if (config.options.validate == 'inequality') {
- input.addClass('validate');
- input.attr('pattern', _inequalityRegex);
- input.attr('placeholder', _inequalityHint);
- label.addClass('active');
- }
- input.focusout(function() {
- config.value = input.val();
- });
- if (values && values.length > 0) {
- var valueSet = new Set(values);
- input.sizedAutocomplete({
- source: values,
- classes: {
- 'ui-autocomplete': 'card search-bar-menu'
- }
- });
- input.focusout(function() {
- _validate(input, valueSet);
- });
- }
- if (values && values.length > 0 && value) {
- _validate(input, valueSet);
- }
- return div;
- }
-
- function _verifyCheckboxes(checkboxes, refreshObject) {
- var oneChecked = checkboxes.presubmit || checkboxes.postsubmit;
- if (!oneChecked) {
- refreshObject.addClass('disabled');
- } else {
- refreshObject.removeClass('disabled');
- }
- }
-
- function _createRunTypeBoxes(checkboxes, refreshObject) {
- var container = $('<div class="run-type-wrapper col s12"></div>');
- var presubmit = $('<input type="checkbox" id="presubmit"></input>');
- presubmit.appendTo(container);
- if (checkboxes.presubmit) {
- presubmit.prop('checked', true);
- }
- container.append('<label for="presubmit">Presubmit</label>');
- var postsubmit = $('<input type="checkbox" id="postsubmit"></input>');
- postsubmit.appendTo(container);
- if (checkboxes.postsubmit) {
- postsubmit.prop('checked', true);
- }
- container.append('<label for="postsubmit">Postsubmit</label>');
- presubmit.change(function() {
- checkboxes.presubmit = presubmit.prop('checked');
- _verifyCheckboxes(checkboxes, refreshObject);
- });
- postsubmit.change(function() {
- checkboxes.postsubmit = postsubmit.prop('checked');
- _verifyCheckboxes(checkboxes, refreshObject);
- });
- return container;
- }
-
- function _expand(
- container, filters, checkboxes, onRefreshCallback, animate=true) {
- var wrapper = $('<div class="search-wrapper"></div>');
- var col = $('<div class="col s9"></div>');
- col.appendTo(wrapper);
- Object.keys(filters).forEach(function(key) {
- col.append(_createInput(key, filters[key]));
- });
- var refreshCol = $('<div class="col s3 refresh-wrapper"></div>');
- var refresh = $('<a class="btn-floating btn-medium red right waves-effect waves-light"></a>')
- .append($('<i class="medium material-icons">cached</i>'))
- .appendTo(refreshCol);
- refresh.click(onRefreshCallback);
- refreshCol.appendTo(wrapper);
- if (Object.keys(checkboxes).length > 0) {
- col.append(_createRunTypeBoxes(checkboxes, refresh));
- }
- if (animate) {
- wrapper.hide().appendTo(container).slideDown({
- duration: 200,
- easing: "easeOutQuart",
- queue: false
- });
- } else {
- wrapper.appendTo(container);
- }
- container.addClass('expanded')
- }
-
- function _renderHeader(
- container, label, value, filters, checkboxes, expand, onRefreshCallback) {
- var div = $('<div class="row card search-bar"></div>');
- var wrapper = $('<div class="header-wrapper"></div>');
- var header = $('<h5 class="section-header"></h5>');
- $('<b></b>').text(label).appendTo(header);
- $('<span></span>').text(value).appendTo(header);
- header.appendTo(wrapper);
- var iconWrapper = $('<div class="search-icon-wrapper"></div>');
- $('<i class="material-icons">search</i>').appendTo(iconWrapper);
- iconWrapper.appendTo(wrapper);
- wrapper.appendTo(div);
- if (expand) {
- _expand(div, filters, checkboxes, onRefreshCallback, false);
- } else {
- var expanded = false;
- iconWrapper.click(function() {
- if (expanded) return;
- expanded = true;
- _expand(div, filters, checkboxes, onRefreshCallback);
- });
- }
- div.appendTo(container);
- }
-
- function _addFilter(filters, displayName, keyName, options, defaultValue) {
- filters[keyName] = {};
- filters[keyName].displayName = displayName;
- filters[keyName].value = defaultValue;
- filters[keyName].options = options;
- }
-
- function _getOptionString(filters, checkboxes) {
- var args = Object.keys(filters).reduce(function(acc, key) {
- if (filters[key].value) {
- return acc + '&' + key + '=' + encodeURIComponent(filters[key].value);
- }
- return acc;
- }, '');
- if (checkboxes.presubmit != undefined && checkboxes.presubmit) {
- args += '&showPresubmit='
- }
- if (checkboxes.postsubmit != undefined && checkboxes.postsubmit) {
- args += '&showPostsubmit='
- }
- return args;
- }
-
- /**
- * Create a search header element.
- * @param label The header label.
- * @param value The value to display next to the label.
- * @param onRefreshCallback The function to call on refresh.
- */
- $.fn.createSearchHeader = function(label, value, onRefreshCallback) {
- var self = $(this);
- $.widget('custom.sizedAutocomplete', $.ui.autocomplete, {
- _resizeMenu : function() {
- this.menu.element.outerWidth($('.search-bar .filter-input').width());
- }
- });
- var filters = {};
- var checkboxes = {};
- var expandOnRender = false;
- var displayed = false;
- return {
- /**
- * Add a filter to the display.
- * @param displayName The input placeholder/label text.
- * @param keyName The URL key to use for the filter options.
- * @param options A dict of additional options (e.g. width, type).
- * @param defaultValue A default filter value.
- */
- addFilter : function(displayName, keyName, options, defaultValue) {
- if (displayed) return;
- _addFilter(filters, displayName, keyName, options, defaultValue);
- if (defaultValue) expandOnRender = true;
- },
- /**
- * Enable run type checkboxes in the filter options.
- *
- * This will display two checkboxes for selecting pre-/postsubmit runs.
- * @param showPresubmit True if presubmit runs are selected.
- * @param showPostsubmit True if postsubmit runs are selected.
- *
- */
- addRunTypeCheckboxes: function(showPresubmit, showPostsubmit) {
- if (displayed) return;
- checkboxes['presubmit'] = showPresubmit;
- checkboxes['postsubmit'] = showPostsubmit;
- if (!showPostsubmit || showPresubmit) {
- expandOnRender = true;
- }
- },
- /**
- * Display the created search bar.
- *
- * This must be called after filters have been added. After displaying, no
- * modifications to the filter options will take effect.
- */
- display : function() {
- displayed = true;
- _renderHeader(
- self, label, value, filters, checkboxes, expandOnRender,
- onRefreshCallback);
- },
- /**
- * Get the URL arguments string for the current set of filters.
- * @returns a URI-encoded component with the search bar keys and values.
- */
- args : function () {
- return _getOptionString(filters, checkboxes);
- }
- }
- }
-
-})(jQuery);
diff --git a/src/main/webapp/js/test_acknowledgments.js b/src/main/webapp/js/test_acknowledgments.js
deleted file mode 100644
index 810d9d6..0000000
--- a/src/main/webapp/js/test_acknowledgments.js
+++ /dev/null
@@ -1,439 +0,0 @@
-/**
- * Copyright (c) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may
- * obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-(function($) {
-
- var _isModalOpen = false;
- var _isReadOnly = true;
- var _allTestsSet = new Set();
- var _allBranches = [];
- var _allDevices = [];
-
- var _writableSummary = 'Known test failures are acknowledged below for specific branch and \
- device configurations, and corresponding test breakage alerts will be silenced. Click an \
- entry to edit or see more information about the test failure.'
- var _readOnlySummary = 'Known test failures are acknowledged below for specific branch and \
- device configurations, and corresponding test breakage alerts will be silenced. Click an \
- entry to see more information about the test failure. To add, edit, or remove a test \
- acknowledgment, contact a VTS Dashboard administrator.'
-
- $.widget('custom.sizedAutocomplete', $.ui.autocomplete, {
- options: {
- parent: ''
- },
- _resizeMenu: function() {
- this.menu.element.outerWidth($(this.options.parent).width());
- }
- });
-
- /**
- * Remove an acknowledgment from the list.
- * @param ack (jQuery object) The object for acknowledgment.
- * @param key (String) The value to display next to the label.
- */
- function removeAcknowledgment(ack, key) {
- if (ack.hasClass('disabled')) {
- return;
- }
- ack.addClass('disabled');
- $.ajax({
- url: '/api/test_acknowledgments/' + key,
- type: 'DELETE'
- }).always(function() {
- ack.removeClass('disabled');
- }).then(function() {
- ack.slideUp(150, function() {
- ack.remove();
- });
- });
- }
-
- /**
- * Callback for when a chip is removed from a chiplist.
- * @param text (String) The value stored in the chip.
- * @param allChipsSet (Set) The set of all chip values.
- * @param allIndicator (jQuery object) The object for "All" indicator adjacent to the chips.
- */
- function chipRemoveCallback(text, allChipsSet, allIndicator) {
- allChipsSet.delete(text);
- if (allChipsSet.size == 0) {
- allIndicator.show();
- }
- }
-
- /**
- * Add chips to the chip UI.
- * @param allChipsSet (Set) The set of all chip values.
- * @param container (jQuery object) The object in which to insert the chips.
- * @param chipList (list) The list of chip values to insert.
- * @param allIndicator (jQuery object) The object for "All" indicator adjacent to the chips.
- */
- function addChips(allChipsSet, container, chipList, allIndicator) {
- if (chipList && chipList.length > 0) {
- chipList.forEach(function(text) {
- if (allChipsSet.has(text)) return;
- var chip = $('<span class="chip">' + text + '</span>');
- if (!_isReadOnly) {
- var icon = $('<i class="material-icons">clear</i>').appendTo(chip);
- icon.click(function() {
- chipRemoveCallback(text, allChipsSet, allIndicator);
- });
- }
- chip.appendTo(container);
- allChipsSet.add(text);
- });
- allIndicator.hide();
- }
- }
-
- /**
- * Create a chip input UI.
- * @param container (jQuery object) The object in which to insert the input box.
- * @param placeholder (String) The placeholder text to display in the input.
- * @param allChipsSet (Set) The set of all chip values.
- * @param chipContainer (jQuery object) The object in which to insert new chips from the input.
- * @param allIndicator (jQuery object) The object for "All" indicator adjacent to the chips.
- * @returns The chip input jQuery object.
- */
- function addChipInput(container, placeholder, allChipsSet, chipContainer, allIndicator) {
- var input = $('<input type="text"></input>');
- input.attr('placeholder', placeholder);
- input.keyup(function(e) {
- if (e.keyCode === 13 && input.val().trim()) {
- addChips(allChipsSet, chipContainer, [input.val()], allIndicator);
- input.val('');
- }
- });
- var addButton = $('<i class="material-icons add-button">add</i>');
- addButton.click(function() {
- if (input.val().trim()) {
- addChips(allChipsSet, chipContainer, [input.val()], allIndicator);
- input.val('');
- addButton.hide();
- }
- });
- addButton.hide();
- input.focus(function() {
- addButton.show();
- });
- input.focusout(function() {
- if (!input.val().trim()) {
- addButton.hide();
- }
- });
- var holder = $('<div class="col s12 input-container"></div>').appendTo(container);
- input.appendTo(holder);
- addButton.appendTo(holder);
- return input;
- }
-
- /**
- * Callback to save changes to the acknowledgment.
- * @param ack (jQuery object) The object for acknowledgment.
- * @param modal (jQuery object) The jQueryUI modal object which invoked the callback.
- * @param key (String) The key associated with the acknowledgment.
- * @param test (String) The test name in the acknowledgment.
- * @param branchSet (Set) The set of all branches in the acknowledgment.
- * @param deviceSet (Set) The set of all devoces in the acknowledgment.
- * @param testCaseSet (Set) The set of all test cases in the acknowledgment.
- * @param note (String) The note in the acknowledgment.
- */
- function saveCallback(ack, modal, key, test, branchSet, deviceSet, testCaseSet, note) {
- var allEmpty = true;
- var firstUnemptyInput = null;
- var vals = modal.find('.modal-section>.input-container>input').each(function(_, input) {
- if (!!$(input).val()) {
- allEmpty = false;
- if (!firstUnemptyInput) firstUnemptyInput = $(input);
- }
- });
- if (!allEmpty) {
- firstUnemptyInput.focus();
- return false;
- }
- var branches = Array.from(branchSet);
- branches.sort();
- var devices = Array.from(deviceSet);
- devices.sort();
- var testCaseNames = Array.from(testCaseSet);
- testCaseNames.sort();
- var data = {
- 'key' : key,
- 'testName' : test,
- 'branches' : branches,
- 'devices' : devices,
- 'testCaseNames' : testCaseNames,
- 'note': note
- };
- $.post('/api/test_acknowledgments', JSON.stringify(data)).done(function(newKey) {
- var newAck = createAcknowledgment(newKey, test, branches, devices, testCaseNames, note);
- if (key == null) {
- ack.replaceWith(newAck.hide());
- newAck.slideDown(150);
- } else {
- ack.replaceWith(newAck);
- }
- }).always(function() {
- modal.modal({
- complete: function() { _isModalOpen = false; }
- });
- modal.modal('close');
- });
- }
-
- /**
- * Callback to save changes to the acknowledgment.
- * @param ack (jQuery object) The object for the acknowledgment.
- * @param key (String) The key associated with the acknowledgment.
- * @param test (String) The test name in the acknowledgment.
- * @param branches (list) The list of all branches in the acknowledgment.
- * @param devices (Set) The list of all devoces in the acknowledgment.
- * @param testCases (Set) The list of all test cases in the acknowledgment.
- * @param note (String) The note in the acknowledgment.
- */
- function showModal(ack, key, test, branches, devices, testCases, note) {
- if (_isModalOpen) {
- return;
- }
- _isModalOpen = true;
- var wrapper = $('#modal');
- wrapper.empty();
- wrapper.modal();
- var content = $('<div class="modal-content"><h4>Test Acknowledgment</h4></div>');
- var row = $('<div class="row"></div>').appendTo(content);
- row.append('<div class="col s12"><h5><b>Test: </b>' + test + '</h5></div>');
-
- var branchSet = new Set();
- var branchContainer = $('<div class="col l4 s12 modal-section"></div>').appendTo(row);
- var branchHeader = $('<h5></h5>').appendTo(branchContainer);
- branchHeader.append('<b>Branches:</b>');
- var allBranchesLabel = $('<span> All</span>').appendTo(branchHeader);
- var branchChips = $('<div class="col s12 chips branch-chips"></div>').appendTo(branchContainer);
- addChips(branchSet, branchChips, branches, allBranchesLabel);
- if (!_isReadOnly) {
- var branchInput = addChipInput(
- branchContainer, 'Specify a branch...', branchSet, branchChips, allBranchesLabel);
- branchInput.sizedAutocomplete({
- source: _allBranches,
- classes: {
- 'ui-autocomplete': 'card autocomplete-dropdown'
- },
- parent: branchInput
- });
- }
-
- var deviceSet = new Set();
- var deviceContainer = $('<div class="col l4 s12 modal-section"></div>').appendTo(row);
- var deviceHeader = $('<h5></h5>').appendTo(deviceContainer);
- deviceHeader.append('<b>Devices:</b>');
- var allDevicesLabel = $('<span> All</span>').appendTo(deviceHeader);
- var deviceChips = $('<div class="col s12 chips device-chips"></div>').appendTo(deviceContainer);
- addChips(deviceSet, deviceChips, devices, allDevicesLabel);
- if (!_isReadOnly) {
- var deviceInput = addChipInput(
- deviceContainer, 'Specify a device...', deviceSet, deviceChips, allDevicesLabel);
- deviceInput.sizedAutocomplete({
- source: _allDevices,
- classes: {
- 'ui-autocomplete': 'card autocomplete-dropdown'
- },
- parent: deviceInput
- });
- }
-
- var testCaseSet = new Set();
- var testCaseContainer = $('<div class="col l4 s12 modal-section"></div>').appendTo(row);
- var testCaseHeader = $('<h5></h5>').appendTo(testCaseContainer);
- testCaseHeader.append('<b>Test Cases:</b>');
- var allTestCasesLabel = $('<span> All</span>').appendTo(testCaseHeader);
- var testCaseChips = $('<div class="col s12 chips test-case-chips"></div>').appendTo(
- testCaseContainer);
- addChips(testCaseSet, testCaseChips, testCases, allTestCasesLabel);
- var testCaseInput = null;
- if (!_isReadOnly) {
- testCaseInput = addChipInput(
- testCaseContainer, 'Specify a test case...', testCaseSet, testCaseChips, allTestCasesLabel);
- }
-
- row.append('<div class="col s12"><h5><b>Note:</b></h5></div>');
- var inputField = $('<div class="input-field col s12"></div>').appendTo(row);
- var textArea = $('<textarea placeholder="Type a note..."></textarea>');
- textArea.addClass('materialize-textarea note-field');
- textArea.appendTo(inputField);
- textArea.val(note);
- if (_isReadOnly) {
- textArea.attr('disabled', true);
- }
-
- content.appendTo(wrapper);
- var footer = $('<div class="modal-footer"></div>');
- if (!_isReadOnly) {
- var save = $('<a class="btn">Save</a></div>').appendTo(footer);
- save.click(function() {
- saveCallback(ack, wrapper, key, test, branchSet, deviceSet, testCaseSet, textArea.val());
- });
- }
- var close = $('<a class="btn-flat">Close</a></div>').appendTo(footer);
- close.click(function() {
- wrapper.modal({
- complete: function() { _isModalOpen = false; }
- });
- wrapper.modal('close');
- })
- footer.appendTo(wrapper);
- if (!_isReadOnly) {
- $.get('/api/test_run?test=' + test + '&timestamp=latest').done(function(data) {
- var allTestCases = data.reduce(function(array, column) {
- return array.concat(column.data);
- }, []);
- testCaseInput.sizedAutocomplete({
- source: allTestCases,
- classes: {
- 'ui-autocomplete': 'card autocomplete-dropdown'
- },
- parent: testCaseInput
- });
- }).always(function() {
- wrapper.modal('open');
- });
- } else {
- wrapper.modal('open');
- }
- }
-
- /**
- * Create a test acknowledgment object.
- * @param key (String) The key associated with the acknowledgment.
- * @param test (String) The test name in the acknowledgment.
- * @param branches (list) The list of all branches in the acknowledgment.
- * @param devices (Set) The list of all devoces in the acknowledgment.
- * @param testCases (Set) The list of all test cases in the acknowledgment.
- * @param note (String) The note in the acknowledgment.
- */
- function createAcknowledgment(key, test, branches, devices, testCases, note) {
- var wrapper = $('<div class="col s12 ack-entry"></div>');
- var details = $('<div class="col card hoverable"></div>').appendTo(wrapper);
- details.addClass(_isReadOnly ? 's12' : 's11')
- var testDiv = $('<div class="col s12"><b>' + test + '</b></div>').appendTo(details);
- var infoBtn = $('<span class="info-icon right"></a>').appendTo(testDiv);
- infoBtn.append('<i class="material-icons">info_outline</i>');
- details.click(function() {
- showModal(wrapper, key, test, branches, devices, testCases, note);
- });
- var branchesSummary = 'All';
- if (!!branches && branches.length == 1) {
- branchesSummary = branches[0];
- } else if (!!branches && branches.length > 1) {
- branchesSummary = branches[0];
- branchesSummary += '<span class="count-indicator"> (+' + (branches.length - 1) + ')</span>';
- }
- $('<div class="col l4 s12"><b>Branches: </b>' + branchesSummary + '</div>').appendTo(details);
- var devicesSummary = 'All';
- if (!!devices && devices.length == 1) {
- devicesSummary = devices[0];
- } else if (!!devices && devices.length > 1) {
- devicesSummary = devices[0];
- devicesSummary += '<span class="count-indicator"> (+' + (devices.length - 1) + ')</span>';
- }
- $('<div class="col l4 s12"><b>Devices: </b>' + devicesSummary + '</div>').appendTo(details);
- var testCaseSummary = 'All';
- if (!!testCases && testCases.length == 1) {
- testCaseSummary = testCases[0];
- } else if (!!testCases && testCases.length > 1) {
- testCaseSummary = testCases[0];
- testCaseSummary += '<span class="count-indicator"> (+' + (testCases.length - 1) + ')</span>';
- }
- details.append('<div class="col l4 s12"><b>Test Cases: </b>' + testCaseSummary + '</div>');
-
- if (!_isReadOnly) {
- var btnContainer = $('<div class="col s1 center btn-container"></div>');
-
- var clear = $('<a class="col s12 btn-flat remove-button"></a>');
- clear.append('<i class="material-icons">clear</i>');
- clear.attr('title', 'Remove');
- clear.click(function() { removeAcknowledgment(wrapper, key); });
- clear.appendTo(btnContainer);
-
- btnContainer.appendTo(wrapper);
- }
- return wrapper;
- }
-
- /**
- * Create a test acknowledgments UI.
- * @param allTests (list) The list of all test names.
- * @param allBranches (list) The list of all branches.
- * @param allDevices (list) The list of all device names.
- * @param testAcknowledgments (list) JSON-serialized TestAcknowledgmentEntity object list.
- * @param readOnly (boolean) True if the acknowledgments are read-only, false if mutable.
- */
- $.fn.testAcknowledgments = function(
- allTests, allBranches, allDevices, testAcknowledgments, readOnly) {
- var self = $(this);
- _allTestsSet = new Set(allTests);
- _allBranches = allBranches;
- _allDevices = allDevices;
- _isReadOnly = readOnly;
- var searchRow = $('<div class="search-row"></div>');
- var headerRow = $('<div></div>');
- var acks = $('<div class="acknowledgments"></div>');
-
- if (!_isReadOnly) {
- var inputWrapper = $('<div class="input-field col s8"></div>');
- var input = $('<input type="text"></input>').appendTo(inputWrapper);
- inputWrapper.append('<label>Search for tests to add an acknowledgment</label>');
- inputWrapper.appendTo(searchRow);
- input.sizedAutocomplete({
- source: allTests,
- classes: {
- 'ui-autocomplete': 'card autocomplete-dropdown'
- },
- parent: input
- });
-
- var btnWrapper = $('<div class="col s1"></div>');
- var btn = $('<a class="btn waves-effect waves-light red btn-floating"></a>');
- btn.append('<i class="material-icons">add</a>');
- btn.appendTo(btnWrapper);
- btnWrapper.appendTo(searchRow);
- btn.click(function() {
- if (!_allTestsSet.has(input.val())) return;
- var ack = createAcknowledgment(undefined, input.val());
- ack.hide().prependTo(acks);
- showModal(ack, undefined, input.val());
- });
- searchRow.appendTo(self);
- }
-
- var headerCol = $('<div class="col s12 section-header-col"></div>').appendTo(headerRow);
- if (_isReadOnly) {
- headerCol.append('<p class="acknowledgment-info">' + _readOnlySummary + '</p>');
- } else {
- headerCol.append('<p class="acknowledgment-info">' + _writableSummary + '</p>');
- }
- headerRow.appendTo(self);
-
- testAcknowledgments.forEach(function(ack) {
- var wrapper = createAcknowledgment(
- ack.key, ack.testName, ack.branches, ack.devices, ack.testCaseNames, ack.note);
- wrapper.appendTo(acks);
- });
- acks.appendTo(self);
-
- self.append('<div class="modal modal-fixed-footer acknowledgments-modal" id="modal"></div>');
- };
-
-})(jQuery);
diff --git a/src/main/webapp/js/test_results.js b/src/main/webapp/js/test_results.js
deleted file mode 100644
index 24d4c0b..0000000
--- a/src/main/webapp/js/test_results.js
+++ /dev/null
@@ -1,349 +0,0 @@
-/**
- * Copyright (c) 2017 Google Inc. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may
- * obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-(function($, moment) {
-
-/**
- * Display the log links in a modal window.
- * @param linkList A list of [name, url] tuples representing log links.
- */
-function showLinks(container, linkList) {
- if (!linkList || linkList.length == 0) return;
-
- var logCollection = $('<ul class="collection"></ul>');
- var entries = linkList.reduce(function(acc, entry) {
- if (!entry || entry.length == 0) return acc;
- var link = '<a href="' + entry[1] + '"';
- link += 'class="collection-item">' + entry[0] + '</li>';
- return acc + link;
- }, '');
- logCollection.html(entries);
-
- if (container.find('#info-modal').length == 0) {
- var modal =
- $('<div id="info-modal" class="modal modal-fixed-footer"></div>');
- var content = $('<div class="modal-content"></div>');
- content.append('<h4>Links</h4>');
- content.append('<div class="info-container"></div>');
- content.appendTo(modal);
- var footer = $('<div class="modal-footer"></div>');
- footer.append('<a class="btn-flat modal-close">Close</a></div>');
- footer.appendTo(modal);
- modal.appendTo(container);
- }
- var infoContainer = $('#info-modal>.modal-content>.info-container');
- infoContainer.empty();
- logCollection.appendTo(infoContainer);
- $('#info-modal').modal({dismissible: true});
- $('#info-modal').modal('open');
-}
-
-/**
- * Get the nickname for a test case result.
- *
- * Removes the result prefix and suffix, extracting only the result name.
- *
- * @param testCaseResult The string name of a VtsReportMessage.TestCaseResult.
- * @returns the string nickname of the result.
- */
-function getNickname(testCaseResult) {
- return testCaseResult.replace('TEST_CASE_RESULT_', '')
- .replace('_RESULT', '')
- .trim()
- .toLowerCase();
-}
-
-/**
- * Get the badge color from ratio value.
- *
- * @param the percentage value.
- * @returns the string of color for the badge.
- */
-function getBadgeColor(ratio) {
- var color = "orange";
- if (ratio <= 20) {
- color = "red";
- } else if (ratio >= 70) {
- color = "green";
- }
- return color;
-}
-
-/**
- * Get the rounded value.
- *
- * @param the percentage value.
- * @returns the rounded value from percentage value.
- */
-function getRoundValue(ratio) {
- return Math.round(ratio * 1000) / 10;
-}
-
-/**
- * Display test data in the body beneath a test run's metadata.
- * @param container The jquery object in which to insert the test metadata.
- * @param data The json object containing the columns to display.
- * @param lineHeight The height of each list element.
- */
-function displayTestDetails(container, data, lineHeight) {
- var nCol = data.length;
- var width = 's' + (12 / nCol);
- test = container;
- var maxLines = 0;
- data.forEach(function(column, index) {
- if (column.data == undefined || column.name == undefined) {
- return;
- }
- var classes = 'col test-col grey lighten-5 ' + width;
- if (index != nCol - 1) {
- classes += ' bordered';
- }
- if (index == 0) {
- classes += ' left-most';
- }
- if (index == nCol - 1) {
- classes += ' right-most';
- }
- var colContainer = $('<div class="' + classes + '"></div>');
- var col = $('<div class="test-case-container"></div>');
- colContainer.appendTo(container);
- var count = column.data.length;
- var head = $('<h5 class="test-result-label white"></h5>')
- .text(getNickname(column.name))
- .appendTo(colContainer)
- .css('text-transform', 'capitalize');
- $('<div class="indicator right center"></div>')
- .text(count)
- .addClass(column.name)
- .appendTo(head);
- col.appendTo(colContainer);
- var list = $('<ul></ul>').appendTo(col);
- column.data.forEach(function(testCase) {
- $('<li></li>')
- .text(testCase)
- .addClass('test-case')
- .css('font-size', lineHeight - 2)
- .css('line-height', lineHeight + 'px')
- .appendTo(list);
- });
- if (count > maxLines) {
- maxLines = count;
- }
- });
- var containers = container.find('.test-case-container');
- containers.height(maxLines * lineHeight);
-}
-
-/**
- * Click handler for displaying test run details.
- * @param e The click event.
- */
-function testRunClick(e) {
- var header = $(this);
- var icon = header.find('.material-icons.expand-arrow');
- var container = header.parent().find('.test-results');
- var test = header.attr('test');
- var time = header.attr('time');
- var url = '/api/test_run?test=' + test + '&timestamp=' + time;
- if (header.parent().hasClass('active')) {
- header.parent().removeClass('active');
- header.removeClass('active');
- icon.removeClass('rotate');
- header.siblings('.collapsible-body').stop(true, false).slideUp({
- duration: 100,
- easing: 'easeOutQuart',
- queue: false,
- complete: function() {
- header.css('height', '');
- }
- });
- } else {
- container.empty();
- header.parent().addClass('active');
- header.addClass('active');
- header.addClass('disabled');
- icon.addClass('rotate');
- $.get(url)
- .done(function(data) {
- displayTestDetails(container, data, 16);
- header.siblings('.collapsible-body').stop(true, false).slideDown({
- duration: 100,
- easing: 'easeOutQuart',
- queue: false,
- complete: function() {
- header.css('height', '');
- }
- });
- })
- .fail(function() {
- icon.removeClass('rotate');
- })
- .always(function() {
- header.removeClass('disabled');
- });
- }
-}
-
-/**
- * Append a clickable indicator link to the container.
- * @param container The jquery object to append the indicator to.
- * @param content The text to display in the indicator.
- * @param classes Additional space-delimited classes to add to the indicator.
- * @param click The click handler to assign to the indicator.
- * @returns The jquery object for the indicator.
- */
-function createClickableIndicator(container, content, classes, click) {
- var link = $('<span></span>');
- link.addClass('indicator badge padded hoverable waves-effect');
- link.addClass(classes);
- link.css('color', 'white');
- link.css('margin-left', '1px');
- link.append(content);
- link.appendTo(container);
- link.click(click);
- return link;
-}
-
-function displayTestMetadata(container, metadataList, showTestNames = false) {
- var popout = $('<ul></ul>');
- popout.attr('data-collapsible', 'expandable');
- popout.addClass('collapsible popout test-runs');
- popout.appendTo(container);
- popout.unbind();
- metadataList.forEach(function(metadata) {
- var li = $('<li class="test-run-container"></li>');
- li.appendTo(popout);
- var div = $('<div></div>');
- var test = metadata.testRun.testName;
- var startTime = metadata.testRun.startTimestamp;
- var endTime = metadata.testRun.endTimestamp;
- div.attr('test', test);
- div.attr('time', startTime);
- div.addClass('collapsible-header test-run');
- div.appendTo(li);
- div.unbind().click(testRunClick);
- var span = $('<span></span>');
- span.addClass('test-run-metadata');
- span.appendTo(div);
- span.click(function() {
- return false;
- });
- if (showTestNames) {
- $('<span class="test-run-label"></span>').text(test).appendTo(span);
- span.append('<br>');
- }
- if (metadata.deviceInfo) {
- $('<b></b>').text(metadata.deviceInfo).appendTo(span);
- span.append('<br>');
- }
- if (metadata.abiInfo) {
- $('<b></b>').text('ABI: ').appendTo(span)
- span.append(metadata.abiInfo).append('<br>');
- }
- $('<b></b>').text('VTS Build: ').appendTo(span)
- span.append(metadata.testRun.testBuildId).append('<br>');
- $('<b></b>').text('Host: ').appendTo(span)
- span.append(metadata.testRun.hostName).append('<br>');
- var timeString =
- (moment().renderTime(startTime, false) + ' - ' +
- moment().renderTime(endTime, true) + ' (' +
- moment().renderDuration(endTime - startTime) + ')');
- span.append(timeString);
- var indicator = $('<span></span>');
- var color = metadata.testRun.failCount > 0 ? 'red' : 'green';
- indicator.addClass('indicator badge ' + color);
- indicator.css('color', 'white');
- indicator.append(
- metadata.testRun.passCount + '/' +
- (metadata.testRun.passCount + metadata.testRun.failCount));
- indicator.appendTo(div);
- if (metadata.testRun.coveredLineCount != undefined &&
- metadata.testRun.totalLineCount != undefined) {
- var url = ('/show_coverage?testName=' + test + '&startTime=' + startTime);
- var covered = metadata.testRun.coveredLineCount;
- var total = metadata.testRun.totalLineCount;
- var covPct = getRoundValue(covered / total);
- var color = getBadgeColor(covPct);
- var coverage =
- ('Coverage: ' + covered + '/' + total + ' (' + covPct + '%)');
- createClickableIndicator(div, coverage, color, function(evt) {
- window.location.href = url;
- return false;
- });
- }
- if (metadata.testRun.coveredApiCount != undefined &&
- metadata.testRun.totalApiCount != undefined) {
- var covered = metadata.testRun.coveredApiCount;
- var total = metadata.testRun.totalApiCount;
- var covPct = getRoundValue(covered / total);
- var color = getBadgeColor(covPct);
- var apiCoverage = ('API Coverage: ' + covered + '/' + total + ' (' + covPct + '%)');
- createClickableIndicator(div, apiCoverage, color, function(evt) {
- $('#apiCoverageModal')
- .data('urlSafeKeyList', metadata.testRun.apiCoverageKeyList);
- $('#apiCoverageModal').modal('open');
- return false;
- });
- }
- if (metadata.testRun.logLinks != undefined) {
- createClickableIndicator(div, 'Links', 'grey lighten-1', function() {
- showLinks(popout, metadata.testRun.logLinks);
- return false;
- });
- }
- if ($('#coverageModalGraph').length) {
- createClickableIndicator(div, 'Graph', 'grey lighten-1', function(evt) {
- $('#coverageModalGraph').data('testname', test);
- $('#coverageModalGraph').modal('open');
- $(evt.target).removeClass('grey');
- $(evt.target).addClass('blue');
- return false;
- });
- }
-
- var expand = $('<i></i>');
- expand.addClass('material-icons expand-arrow')
- expand.text('expand_more');
- expand.appendTo(div);
- var body = $('<div></div>')
- .addClass('collapsible-body test-results row')
- .appendTo(li);
- if (metadata.testDetails != undefined) {
- expand.addClass('rotate');
- li.addClass('active');
- div.addClass('active');
- displayTestDetails(body, metadata.testDetails, 16);
- div.siblings('.collapsible-body').stop(true, false).slideDown({
- duration: 0,
- queue: false,
- complete: function() {
- div.css('height', '');
- }
- });
- }
- });
-}
-
-/**
- * Display test metadata in a vertical popout.
- * @param container The jquery object in which to insert the test metadata.
- * @param metadataList The list of metadata objects to render on the display.
- * @param showTestNames True to label each entry with the test module name.
- */
-$.fn.showTests = function(metadataList, showTestNames = false) {
- displayTestMetadata($(this), metadataList, showTestNames);
-}
-})(jQuery, moment);
diff --git a/src/main/webapp/js/time.js b/src/main/webapp/js/time.js
deleted file mode 100644
index 6178eda..0000000
--- a/src/main/webapp/js/time.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Copyright (c) 2017 Google Inc. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you
- * may not use this file except in compliance with the License. You may
- * obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-(function (moment) {
-
- /**
- * Renders a timestamp in the user timezone.
- * @param timestamp The long timestamp to render (in microseconds).
- * @param showTimezone True if the timezone should be rendered, false otherwise.
- * @returns the string-formatted version of the provided timestamp.
- */
- moment.prototype.renderTime = function (timestamp, showTimezone) {
- var time = moment(timestamp / 1000);
- var format = 'YYYY-M-DD H:mm:ss';
- if (!!showTimezone) {
- format = format + 'ZZ';
- }
- return time.format(format);
- }
-
- /**
- * Renders a date in the user timezone.
- * @param timestamp The long timestamp to render (in microseconds).
- * @param showTimezone True if the timezone should be rendered, false otherwise.
- * @returns the string-formatted version of the provided timestamp.
- */
- moment.prototype.renderDate = function (timestamp, showTimezone) {
- var time = moment(timestamp / 1000);
- var format = 'YYYY-M-DD';
- if (!!showTimezone) {
- format = format + 'ZZ';
- }
- return time.format(format);
- }
-
- /**
- * Renders a duration in the user timezone.
- * @param durationTimestamp The long duration to render (in microseconds).
- * @returns the string-formatted duration of the provided duration timestamp.
- */
- moment.prototype.renderDuration = function (durationTimestamp) {
- var fmt = 's[s]';
- var duration = moment.utc(durationTimestamp / 1000);
- if (duration.hours() > 0) {
- fmt = 'H[h], m[m], ' + fmt;
- } else if (duration.minutes() > 0) {
- fmt = 'm[m], ' + fmt;
- }
- return duration.format(fmt);
- }
-
-})(moment);