1 <!DOCTYPE html> 2 <!-- 3 Copyright 2016 The Chromium Authors. All rights reserved. 4 Use of this source code is governed by a BSD-style license that can be 5 found in the LICENSE file. 6 --> 7 <!-- 8 This template contains HTML for the following things: 9 - A form for creating a new bug for an alert. 10 - A form for choosing an existing bug number for an alert. 11 - A message with a link after creating a new bug. 12 - A "bug created" message with a link after creating a new bug. 13 - Error messages related to the above. 14 --> 15 <html> 16 <head> 17 <style> 18 body { 19 color: #222; 20 font: normal 13px arial, sans-serif; 21 line-height: 1.4; 22 } 23 24 b { 25 color: #000; 26 } 27 28 a:visited { 29 color: #61c; 30 } 31 32 a:link { 33 color: #15c; 34 } 35 36 .bug-list { 37 /* Note: pop-up window size 600x480 is set in triage-dialog.html. */ 38 box-sizing: border-box; 39 max-width: 550px; 40 overflow-x: visible; 41 } 42 43 /* Style of the bug list table should fit with the style of the 44 alerts table. See the CSS in alerts-table.html. */ 45 .bug-list td { 46 border: 1px solid #eee; 47 border-bottom: 2px solid #ccc; 48 padding-left: 7px; 49 padding-right: 7px; 50 } 51 52 .bug-list tr:first-child td { 53 border-top: 0px; 54 } 55 56 .bug-list tr:last-child td { 57 border-bottom: 0px; 58 } 59 60 .bug-list td:first-child { 61 border-left: 0px; 62 } 63 64 .bug-list td:last-child { 65 border-right: 0px; 66 } 67 68 .bug-list .bug-author { 69 max-width: 60px; 70 overflow: hidden; 71 } 72 73 .bug-list .bug-summary { 74 max-width: 350px; 75 } 76 77 /* Color matches that of the color in the alerts table. */ 78 .highlighted { 79 background-color: #f6ebae; 80 border-color: #ebdb84 transparent; 81 z-index: 2; 82 } 83 84 .bug-closed { 85 text-decoration: line-through; 86 } 87 88 input[type=text] { 89 background-color: #fff; 90 border: 1px solid #d9d9d9; 91 border-top: 1px solid #c0c0c0; 92 -webkit-border-radius: 1px; 93 border-radius: 1px; 94 box-sizing: border-box; 95 color: #333; 96 height: 29px; 97 line-height: 27px; 98 padding-left: 8px; 99 vertical-align: top; 100 } 101 102 input[type=checkbox], input[type=radio], .fakecheckbox, .fakeradio { 103 border: 1px solid #c6c6c6; 104 border-radius: 1px; 105 bottom: -1px; 106 box-sizing: border-box; 107 cursor: default; 108 height: 13px; 109 margin: 0; 110 margin-right: 5px; 111 position: relative; 112 width: 13px; 113 -webkit-appearance: none; 114 } 115 116 input[type=checkbox]:checked::after, .fakecheckbox.checked::after { 117 font-size: 1.3em; 118 content: ""; 119 position: absolute; 120 top: -5px; 121 left: -1px; 122 } 123 124 input[type=submit] { 125 background-color: #4d90fe; 126 background-image: -webkit-linear-gradient(top, #4d90fe, #4787ed); 127 background-image: linear-gradient(to bottom, #4d90fe, #4787ed); 128 border: 1px solid #3079ed; 129 color: #fff; 130 } 131 132 button { 133 background-color: #f5f5f5; 134 border: 1px solid rgba(0, 0, 0, 0.1); 135 color: #444; 136 background-image: -webkit-linear-gradient(top, #f5f5f5, #f1f1f1); 137 background-image: linear-gradient(to bottom, #f5f5f5, #f1f1f1); 138 } 139 140 button, input[type=submit] { 141 border-radius: 2px; 142 font-size: 11px; 143 font-weight: bold; 144 height: 27px; 145 line-height: 27px; 146 min-width: 54px; 147 padding: 0px 8px; 148 -webkit-user-select: none; 149 } 150 151 popup-tooltip { 152 white-space: normal; 153 } 154 155 </style> 156 </head> 157 <body> 158 {% if error %} 159 <div class="error">{{error}}</div><br><br> 160 <button onclick="window.close()">Close</button> 161 {% elif bug_associate_form %} 162 <form action="/associate_alerts" method="POST"> 163 <input type="hidden" name="keys" value="{{keys}}"> 164 <input type="text" name="bug_id" id="bug_id" 165 required placeholder="Bug ID"><br><br> 166 <input type="submit"> 167 </form> 168 <p>Recent bugs shown below. Click on a bug ID to copy into the form field. 169 Highlighting indicates overlapping revision range.</p> 170 <div class="bug-list"> 171 <table> 172 <thead> 173 <tr> 174 <th class="bug-link">Bug ID</th> 175 <th class="bug-status">Status</th> 176 <th class="bug-author">Author</th> 177 <th class="bug-summary">Summary</th> 178 </tr> 179 </thead> 180 <tbody> 181 {% for bug in bugs %} 182 <tr {% if bug.relevant %} class="highlighted" {% endif %}> 183 <td> 184 <a href="http://crbug.com/{{bug.id}}" 185 data-bugid="{{bug.id}}" 186 target="_blank" 187 class="bug-link bug-{{bug.state}} bug-{{bug.status}}"> 188 {{bug.id}} 189 </a> 190 </td> 191 <td class="bug-status">{{bug.status}}</td> 192 <td class="bug-author">{{bug.author.name}}</td> 193 <td class="bug-summary">{{bug.summary}}</td> 194 </tr> 195 {% endfor %} 196 </tbody> 197 </table> 198 </div> 199 <script> 200 function init() { 201 var bugLinks = document.getElementsByClassName('bug-link'); 202 for (var i = 0; i < bugLinks.length; i++) { 203 bugLinks[i].addEventListener('click', function(e) { 204 var bugId = e.target.getAttribute('data-bugid'); 205 document.getElementById('bug_id').value = bugId; 206 e.preventDefault(); 207 }, true); 208 } 209 } 210 document.addEventListener('DOMContentLoaded', init); 211 </script> 212 {% elif bug_create_form %} 213 <form action="/file_bug" method="POST"> 214 <input type="hidden" name="finish" value="true"> 215 <input type="hidden" name="keys" value="{{keys}}"> 216 <b>Summary:</b><br> 217 <input name="summary" value="{{summary}}" size=83> 218 <br><br> 219 <b>Description:</b><br> 220 <textarea rows=10 cols=60 name="description">{{description}}</textarea> 221 <br><br> 222 <b>Labels:</b><br> 223 {% for label in labels %} 224 <label> 225 <input type="checkbox" checked name="label" value="{{label}}"> 226 {{label}} 227 </label><br> 228 {% endfor %} 229 <br> 230 <b>Components:</b><br> 231 {% for component in components %} 232 <label> 233 <input type="checkbox" checked name="component" value="{{component}}"> 234 {{component}} 235 </label><br> 236 {% endfor %} 237 <b>Owner:</b><br> 238 <input type="text" name="owner" value="{{owner}}"><br><br> 239 <input type="submit"> 240 </form> 241 {% elif confirmation_required %} 242 <p>{{message}}</p> 243 <p>Do you want to continue?</p> 244 <form action="/{{handler}}" method="POST"> 245 <input type="hidden" name="confirm" value="true"> 246 {% for key, value in parameters.iteritems() %} 247 <input type="hidden" name="{{key}}" value="{{value}}"> 248 {% endfor %} 249 <button onclick="window.history.go(-1); return false;">Back</button> 250 <input type="submit" value="Confirm"> 251 </form> 252 {% else %} 253 <script> 254 function postClose() { 255 var data = { 256 'action': 'bug_create_result', 257 'bug_id': {{bug_id}}, 258 'bisect_error': '{{bisect_error}}', 259 'issue_url': '{{issue_url}}', 260 'issue_id': '{{issue_id}}', 261 }; 262 window.opener.postMessage(JSON.stringify(data), '*'); 263 window.close(); 264 } 265 window.addEventListener('DOMContentLoaded', postClose, false); 266 </script> 267 {% endif %} 268 </body> 269 </html> 270