OLD | NEW |
1 <!-- | 1 <!-- |
2 Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 3 Use of this source code is governed by a BSD-style license that can be |
4 found in the LICENSE file. | 4 found in the LICENSE file. |
5 --> | 5 --> |
6 <link href="../bower_components/core-icons/core-icons.html" rel="import"> | 6 <link href="../bower_components/core-icons/core-icons.html" rel="import"> |
7 <link href="../bower_components/paper-item/paper-item.html" rel="import"> | 7 <link href="../bower_components/paper-item/paper-item.html" rel="import"> |
8 <link href="../model/ct-builder-revisions.html" rel="import"> | 8 <link href="../model/ct-builder-revisions.html" rel="import"> |
9 <link href="ct-popup-menu.html" rel="import"> | 9 <link href="ct-popup-menu.html" rel="import"> |
10 | 10 |
11 <polymer-element name="ct-revision-details" attributes="builderLatestRevisions r
evisionLog tree"> | 11 <polymer-element name="ct-revision-details" attributes="builderLatestRevisions c
ommitLog tree"> |
12 <template> | 12 <template> |
13 <style> | 13 <style> |
14 ct-popup-menu > div { | 14 ct-popup-menu > div { |
15 display: flex; | 15 display: flex; |
16 justify-content: space-between; | 16 justify-content: space-between; |
17 } | 17 } |
18 .menuRevision { | 18 .menuRevision { |
19 padding-left: 2em; | 19 padding-left: 2em; |
20 } | 20 } |
21 </style> | 21 </style> |
22 <!-- FIXME: Stop special casing the blink tree. --> | 22 <!-- FIXME: Stop special casing the blink tree. --> |
23 <template if="{{ _sortedBuilders.length && tree == 'blink' }}"> | 23 <template if="{{ _sortedBuilders.length && tree == 'blink' }}"> |
24 Latest revision processed by every bot: | 24 Latest revision processed by every bot: |
25 <a id="fullyProcessedRevision" href="{{ _fullyProcessedRevision.url }}">{{
_fullyProcessedRevision.revision }}</a> | 25 <a id="fullyProcessedRevision" href="{{ _fullyProcessedRevision.url }}">{{
_fullyProcessedRevision.revision }}</a> |
26 <ct-popup-menu icon="arrow-drop-down"> | 26 <ct-popup-menu icon="arrow-drop-down"> |
27 <template repeat="{{builder in _sortedBuilders}}"> | 27 <template repeat="{{builder in _sortedBuilders}}"> |
28 <div> | 28 <div> |
29 <div> | 29 <div> |
30 {{ builder }} | 30 {{ builder }} |
31 </div> | 31 </div> |
32 <div class="menuRevision"> | 32 <div class="menuRevision"> |
33 <a href="{{ builderLatestRevisions[builder].url }}">{{ builderLate
stRevisions[builder].revision }}</a> | 33 <a href="{{ builderLatestRevisions[builder].url }}">{{ builderLate
stRevisions[builder].revision }}</a> |
34 </div> | 34 </div> |
35 </div> | 35 </div> |
36 </template> | 36 </template> |
37 </ct-popup-menu> | 37 </ct-popup-menu> |
38 trunk is at <a id="trunkRevision" href="{{ revisionLog.commits.blink[revis
ionLog.lastRevision['blink']].url }}">{{ revisionLog.lastRevision['blink'] }}</a
> | 38 trunk is at <a id="trunkRevision" href="{{ commitLog.commits.blink[commitL
og.lastRevision['blink']].url }}">{{ commitLog.lastRevision['blink'] }}</a> |
39 </template> | 39 </template> |
40 </template> | 40 </template> |
41 <script> | 41 <script> |
42 Polymer({ | 42 Polymer({ |
43 _sortedBuilders: [], | 43 _sortedBuilders: [], |
44 _fullyProcessedRevision: null, | 44 _fullyProcessedRevision: null, |
45 builderLatestRevisions: null, | 45 builderLatestRevisions: null, |
46 | 46 |
47 builderLatestRevisionsChanged: function() { | 47 builderLatestRevisionsChanged: function() { |
48 // Get the list of builders sorted with the most out-of-date one first. | 48 // Get the list of builders sorted with the most out-of-date one first. |
49 var sortedBuilders = Object.keys(this.builderLatestRevisions); | 49 var sortedBuilders = Object.keys(this.builderLatestRevisions); |
50 sortedBuilders.sort(function (a, b) { return this.builderLatestRevisions
[a].revision - this.builderLatestRevisions[b].revision;}.bind(this)); | 50 sortedBuilders.sort(function (a, b) { return this.builderLatestRevisions
[a].revision - this.builderLatestRevisions[b].revision;}.bind(this)); |
51 | 51 |
52 this._sortedBuilders = sortedBuilders; | 52 this._sortedBuilders = sortedBuilders; |
53 this._fullyProcessedRevision = this.builderLatestRevisions[sortedBuilder
s[0]]; | 53 this._fullyProcessedRevision = this.builderLatestRevisions[sortedBuilder
s[0]]; |
54 }, | 54 }, |
55 }); | 55 }); |
56 </script> | 56 </script> |
57 </polymer-element> | 57 </polymer-element> |
OLD | NEW |