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