Chromium Code Reviews| Index: Tools/GardeningServer/ui/ct-tree-status-card.html |
| diff --git a/Tools/GardeningServer/ui/ct-tree-status-card.html b/Tools/GardeningServer/ui/ct-tree-status-card.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..56de845a3e77d39d33decd92be3771309124de10 |
| --- /dev/null |
| +++ b/Tools/GardeningServer/ui/ct-tree-status-card.html |
| @@ -0,0 +1,59 @@ |
| +<!-- |
| +Copyright 2014 The Chromium Authors. All rights reserved. |
| +Use of this source code is governed by a BSD-style license that can be |
| +found in the LICENSE file. |
| +--> |
| + |
| + |
| +<polymer-element name="ct-tree-status-card" attributes="group"> |
| + <template> |
| + <style> |
| + #failure { |
| + flex: 1; |
| + } |
| + |
| + #details { |
| + color: red; |
| + font-weight: bold; |
| + } |
| + |
| + .snoozed { |
| + opacity: 0.5; |
| + } |
| + </style> |
| + <div id="failure" class="{{ { snoozed: group.isSnoozed } | tokenList }}"> |
| + <div id="details"> |
| + {{ group.tree }}: {{ group.data.details }} |
| + </div> |
| + <div id='chart'></div> |
| + <div><a href="{{ group.data.url }}">link</a> |
| + </div> |
|
ojan
2014/09/02 02:35:11
This formatting is funky.
shans
2014/09/04 01:59:43
Acknowledged.
|
| + </template> |
| + <script> |
| + Polymer('ct-tree-status-card', { |
|
ojan
2014/09/02 02:35:11
No need for the string name here. It's inferred fo
shans
2014/09/04 01:59:43
Done.
|
| + group: null, |
| + commits: null, |
| + _commits: function() { |
| + if (!this.group) |
| + return undefined; |
| + return this.group.commitList(this.commits); |
| + }, |
| + ready: function() { |
| + var dataTable = google.visualization.arrayToDataTable([ |
| + ['', 'Minimum', 'Actual'], |
| + ['Open', 80, this.group.data.percent_open] |
| + ]); |
| + |
| + var options = { |
| + title: 'tree status', |
| + vAxis: {minValue: 0}, |
| + series: [{color: 'grey'}, {color: 'red'}] |
| + }; |
| + |
| + var chart = new google.visualization.ColumnChart(this.$.chart); |
| + chart.draw(dataTable, options); |
| + }, |
| + }); |
| + </script> |
| +</polymer-element> |
| + |