| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 | 7 |
| 8 <link rel="import" href="/dashboard/elements/bisect-button.html"> | 8 <link rel="import" href="/dashboard/elements/bisect-button.html"> |
| 9 | 9 |
| 10 <polymer-element name="bug-info"> | 10 <dom-module id="bug-info"> |
| 11 <template> | 11 <template> |
| 12 <style> | 12 <style> |
| 13 #container { | 13 #container { |
| 14 display: flex; | 14 display: flex; |
| 15 display: -webkit-flex; | 15 display: -webkit-flex; |
| 16 -webkit-flex-direction: column; | 16 -webkit-flex-direction: column; |
| 17 flex-direction: column; | 17 flex-direction: column; |
| 18 margin-left: 1px; | 18 margin-left: 1px; |
| 19 margin-top: 3px; | 19 margin-top: 3px; |
| 20 } | 20 } |
| 21 | 21 |
| 22 #container p { | 22 #container p { |
| 23 margin-top: 7px; | 23 margin-top: 7px; |
| 24 margin-bottom: 7px; | 24 margin-bottom: 7px; |
| 25 } | 25 } |
| 26 | 26 |
| 27 .warning { | 27 .warning { |
| 28 font-weight: bold; | 28 font-weight: bold; |
| 29 color: red; | 29 color: red; |
| 30 } | 30 } |
| 31 |
| 32 li { |
| 33 display: inline; |
| 34 /* Width of a space is 0.25em. */ |
| 35 padding: 0 0.15em 0 0.4em; |
| 36 } |
| 37 |
| 38 li + li { |
| 39 border-left: solid 1px; |
| 40 } |
| 31 </style> | 41 </style> |
| 32 <div id="container" style="display:none"> | 42 <div id="container" style="display:none"> |
| 33 <div class="info-bar"> | 43 <div class="info-bar"> |
| 34 <p><a href="http://crbug.com/{{bugId}}">crbug.com/{{bugId}}</a></p> | 44 <p><a href="http://crbug.com/{{bugId}}">crbug.com/{{bugId}}</a></p> |
| 35 <p> | 45 <p> |
| 36 <span id="revision_range"></span> | 46 <span id="revision_range"></span> |
| 37 <span id="warning" class="warning"></span> | 47 <span id="warning" class="warning"></span> |
| 38 <bisect-button id="bisect" class="mini"></bisect-button> | 48 <bisect-button id="bisect" class="mini"></bisect-button> |
| 39 </p> | 49 </p> |
| 40 <template bind if="{{ownerInfo}}"> | 50 <template is="dom-if" if="{{ownerInfo}}"> |
| 41 <p> | 51 <p> |
| 42 Owners: | 52 Owners: |
| 43 <template repeat="{{owner, index in ownerInfo}}"> | 53 <ul> |
| 44 <!--TODO(chrisphan): Link this to bug comment dialog.--> | 54 <template is="dom-repeat" items="{{ownerInfo}}"> |
| 45 <a href="#" onclick="return false;">{{owner.email}}</a> | 55 <!--TODO(chrisphan): Link this to bug comment dialog.--> |
| 46 <span hidden?="{{index == ownerInfo.length - 1}}"> | </span> | 56 <li><a href="#" onclick="return false;">{{item.email}}</a></li> |
| 47 </template> | 57 </template> |
| 58 </ul> |
| 48 </p> | 59 </p> |
| 49 </template> | 60 </template> |
| 50 </div> | 61 </div> |
| 51 </div> | 62 </div> |
| 52 </template> | 63 </template> |
| 53 <script> | 64 <script> |
| 54 'use strict'; | 65 'use strict'; |
| 55 Polymer('bug-info', { | 66 Polymer({ |
| 56 alertsTable: null, | 67 is: 'bug-info', |
| 57 bugId: null, | 68 properties: { |
| 69 alertsTable: { value: null}, |
| 70 bugId: { value: null}, |
| 71 } |
| 58 | 72 |
| 59 /** | 73 /** |
| 60 * Initializes this element. | 74 * Initializes this element. |
| 61 * @param {Number} bugId A bug ID number. | 75 * @param {Number} bugId A bug ID number. |
| 62 * @param {HTMLElement} alertsTable HTML element of alerts-table. | 76 * @param {HTMLElement} alertsTable HTML element of alerts-table. |
| 63 * @param {Array.<Object>} ownerInfo List of owners info. | 77 * @param {Array.<Object>} ownerInfo List of owners info. |
| 64 */ | 78 */ |
| 65 initialize: function(bugId, alertsTable, ownerInfo) { | 79 initialize: function(bugId, alertsTable, ownerInfo) { |
| 66 this.$.container.style.display = ''; | 80 this.$.container.style.display = ''; |
| 67 this.bugId = bugId; | 81 this.bugId = bugId; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 return alerts[i]['master'] + '/' + | 160 return alerts[i]['master'] + '/' + |
| 147 alerts[i]['bot'] + '/' + | 161 alerts[i]['bot'] + '/' + |
| 148 alerts[i]['testsuite'] + '/' + | 162 alerts[i]['testsuite'] + '/' + |
| 149 alerts[i]['test']; | 163 alerts[i]['test']; |
| 150 } | 164 } |
| 151 } | 165 } |
| 152 return null; | 166 return null; |
| 153 } | 167 } |
| 154 }); | 168 }); |
| 155 </script> | 169 </script> |
| 156 </polymer-element> | 170 </dom-module> |
| OLD | NEW |