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.
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">
11 <polymer-element name="ct-revision-details" attributes="builderLatestRevisions revisionLog tree">
16 justify-content: space-between;
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}}">
32 <div class="menuRevision">
33 <a href="{{ builderLatestRevisions[builder].url }}">{{ builderLatestRevisions[builder].revision }}</a>
38 trunk is at <a id="trunkRevision" href="{{ revisionLog.commits.blink[revisionLog.lastRevision['blink']].url }}">{{ revisionLog.lastRevision['blink'] }}</a>
44 _fullyProcessedRevision: null,
45 builderLatestRevisions: null,
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));
52 this._sortedBuilders = sortedBuilders;
53 this._fullyProcessedRevision = this.builderLatestRevisions[sortedBuilders[0]];