summaryrefslogtreecommitdiff
path: root/src/main/webapp
diff options
context:
space:
mode:
authorRyan Campbell <ryanjcampbell@google.com>2017-09-25 17:31:34 -0700
committerRyan Campbell <ryanjcampbell@google.com>2017-09-26 09:52:48 -0700
commitad0f1696d9ae8879fedbe22735466f0b5927b019 (patch)
treedcefecefb0268697a71dfd0e3a9270ad5c068897 /src/main/webapp
parentb34b74b7041f2d87dc62fd8c0e42f3b5ee1cd8d8 (diff)
downloaddashboard-ad0f1696d9ae8879fedbe22735466f0b5927b019.tar.gz
Create UI entry point for acks UI.
Create a tab UI on the ToT Home so that the user can page between favorites, all tests, and test acknowledgments. Test: staging Bug: 65208372 Change-Id: I26c558e0ddc6066f20ab4d2e5cdaed29f49a392a
Diffstat (limited to 'src/main/webapp')
-rw-r--r--src/main/webapp/WEB-INF/jsp/dashboard_main.jsp33
-rw-r--r--src/main/webapp/WEB-INF/jsp/show_test_acknowledgments.jsp16
-rw-r--r--src/main/webapp/css/dashboard_main.css8
-rw-r--r--src/main/webapp/css/show_test_acknowledgments.css17
-rw-r--r--src/main/webapp/css/test_acknowledgments.css7
-rw-r--r--src/main/webapp/js/test_acknowledgments.js8
6 files changed, 63 insertions, 26 deletions
diff --git a/src/main/webapp/WEB-INF/jsp/dashboard_main.jsp b/src/main/webapp/WEB-INF/jsp/dashboard_main.jsp
index 796e295..0552f8f 100644
--- a/src/main/webapp/WEB-INF/jsp/dashboard_main.jsp
+++ b/src/main/webapp/WEB-INF/jsp/dashboard_main.jsp
@@ -156,9 +156,19 @@
$('.remove-button').click(removeFavorite);
$('.notification-button').click(toggleNotifications);
$('#add-button').click(addFavorite);
+
+ $('#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'>
+ <div class='container wide'>
<c:choose>
<c:when test='${not empty error}'>
<div id='error-container' class='row card'>
@@ -168,6 +178,15 @@
</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 ? 12 : 11}' />
<c:if test='${not showAll}'>
<div class='row'>
@@ -180,11 +199,6 @@
</div>
</div>
</c:if>
- <div class='row'>
- <div class='col s12'>
- <h4 id='section-header'>${headerLabel}</h4>
- </div>
- </div>
<div class='row' id='options'>
<c:forEach items='${testNames}' var='test'>
<div>
@@ -216,13 +230,6 @@
</c:otherwise>
</c:choose>
</div>
- <c:if test='${empty error}'>
- <div class='center'>
- <a href='${buttonLink}' id='show-button' class='btn waves-effect red'>${buttonLabel}
- <i id='show-button-arrow' class='material-icons right'>${buttonIcon}</i>
- </a>
- </div>
- </c:if>
<%@ 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
index 515b594..84ece88 100644
--- a/src/main/webapp/WEB-INF/jsp/show_test_acknowledgments.jsp
+++ b/src/main/webapp/WEB-INF/jsp/show_test_acknowledgments.jsp
@@ -18,17 +18,33 @@
<%@ 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' %>
diff --git a/src/main/webapp/css/dashboard_main.css b/src/main/webapp/css/dashboard_main.css
index 0db4c94..ef63130 100644
--- a/src/main/webapp/css/dashboard_main.css
+++ b/src/main/webapp/css/dashboard_main.css
@@ -12,13 +12,7 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
-
-#edit-button-wrapper {
- bottom: 25px;
- right: 25px;
-}
-
-.input-field {
+.row.home-tabs-row {
margin-bottom: 50px;
}
diff --git a/src/main/webapp/css/show_test_acknowledgments.css b/src/main/webapp/css/show_test_acknowledgments.css
new file mode 100644
index 0000000..cf7ae86
--- /dev/null
+++ b/src/main/webapp/css/show_test_acknowledgments.css
@@ -0,0 +1,17 @@
+/* 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;
+} \ No newline at end of file
diff --git a/src/main/webapp/css/test_acknowledgments.css b/src/main/webapp/css/test_acknowledgments.css
index 4296181..4e5a1f5 100644
--- a/src/main/webapp/css/test_acknowledgments.css
+++ b/src/main/webapp/css/test_acknowledgments.css
@@ -33,7 +33,12 @@ div.col.s12.section-header-col p.acknowledgment-info {
pointer-events: none;
}
.search-row .col.s1 .btn.btn-floating {
- margin-top: 18px;
+ margin-top: 22px;
+}
+.acknowledgments {
+ width: 100%;
+ margin-top: 25px;
+ display: inline-block;
}
.ack-entry .col.card {
margin: 5px 0;
diff --git a/src/main/webapp/js/test_acknowledgments.js b/src/main/webapp/js/test_acknowledgments.js
index c617769..8c5d837 100644
--- a/src/main/webapp/js/test_acknowledgments.js
+++ b/src/main/webapp/js/test_acknowledgments.js
@@ -372,9 +372,9 @@
_allBranches = allBranches;
_allDevices = allDevices;
_isReadOnly = readOnly;
- var searchRow = $('<div class="row search-row"></div>');
- var headerRow = $('<div class="row"></div>');
- var acks = $('<div></div>');
+ 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>');
@@ -403,8 +403,6 @@
}
var headerCol = $('<div class="col s12 section-header-col"></div>').appendTo(headerRow);
- headerCol.append(
- '<h4 class="section-header">Test Acknowledgments</h4>');
if (_isReadOnly) {
headerCol.append('<p class="acknowledgment-info">' + _readOnlySummary + '</p>');
} else {