Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!-- | |
| 2 Copyright 2014 The Chromium Authors. All rights reserved. | |
| 3 Use of this source code is governed by a BSD-style license that can be | |
| 4 found in the LICENSE file. | |
| 5 --> | |
| 6 | |
| 7 | |
| 8 <polymer-element name="ct-cq-latency-card" attributes="group"> | |
| 9 <template> | |
| 10 <style> | |
| 11 #failure { | |
| 12 flex: 1; | |
| 13 margin-left: 10px; | |
| 14 } | |
| 15 | |
| 16 #details { | |
| 17 color: red; | |
|
ojan
2014/09/02 02:35:11
No red. I'm OK with using color on this page to de
shans
2014/09/04 01:59:43
Done.
| |
| 18 font-weight: bold; | |
| 19 } | |
| 20 | |
| 21 .snoozed { | |
| 22 opacity: 0.5; | |
| 23 } | |
| 24 </style> | |
| 25 <div id="failure" class="{{ { snoozed: group.isSnoozed } | tokenList }}"> | |
| 26 <div id="details"> | |
| 27 {{ group.tree }}: {{ group.data.details }} | |
| 28 </div> | |
| 29 <div id='chart'></div> | |
| 30 <div><a href="{{ group.data.url }}">link</a> | |
| 31 </div> | |
| 32 </template> | |
| 33 <script> | |
| 34 Polymer('ct-cq-latency-card', { | |
| 35 group: null, | |
| 36 commits: null, | |
| 37 _commits: function() { | |
| 38 if (!this.group) | |
| 39 return undefined; | |
| 40 return this.group.commitList(this.commits); | |
| 41 }, | |
| 42 ready: function() { | |
| 43 var dataTable = google.visualization.arrayToDataTable([ | |
| 44 ['Percentile', 'Limit', 'Actual', {role: 'style'}], | |
| 45 ['p50', 60, this.group.data.p50, this.group.data.p50 > 60 ? 'red' : 'green'], | |
| 46 ['p90', 180, this.group.data.p90, this.group.data.p90 > 180 ? 'red' : 'green'] | |
| 47 ]); | |
| 48 | |
| 49 var options = { | |
| 50 title: 'cq latency', | |
| 51 hAxis: {title: 'Percentile'}, | |
| 52 vAxis: {minValue: 0}, | |
| 53 series: [{color: 'grey'}, {color: 'red'}] | |
| 54 }; | |
| 55 | |
| 56 var chart = new google.visualization.ColumnChart(this.$.chart); | |
| 57 chart.draw(dataTable, options); | |
| 58 }, | |
| 59 }); | |
| 60 </script> | |
| 61 </polymer-element> | |
| 62 | |
| 63 | |
| OLD | NEW |