| Index: appengine/sheriff_o_matic/ui/ct-results-by-builder.html
|
| diff --git a/appengine/sheriff_o_matic/ui/ct-results-by-builder.html b/appengine/sheriff_o_matic/ui/ct-results-by-builder.html
|
| index 344aee9587a68740bb2b50909d8d2cf3e50cb0f3..f86e174618baff65e509bfb87631ce90d7525f59 100644
|
| --- a/appengine/sheriff_o_matic/ui/ct-results-by-builder.html
|
| +++ b/appengine/sheriff_o_matic/ui/ct-results-by-builder.html
|
| @@ -2,16 +2,32 @@
|
| 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.
|
| --->
|
| -
|
| -<link rel="import" href="../bower_components/core-pages/core-pages.html">
|
| +--><html><head><link rel="import" href="../bower_components/iron-pages/iron-pages.html">
|
| <link rel="import" href="../bower_components/paper-tabs/paper-tab.html">
|
| <link rel="import" href="../bower_components/paper-tabs/paper-tabs.html">
|
| <link rel="import" href="ct-results-detail.html">
|
|
|
| -<polymer-element name="ct-results-by-builder" attributes="failure">
|
| - <template>
|
| - <style>
|
| + <!--
|
| + TODO(polyup): unable to infer path to components
|
| + directory. This import path is probably incomplete.
|
| + -->
|
| + <link rel="import" href="iron-flex-layout/iron-flex-layout.html">
|
| +<dom-module id="ct-results-by-builder">
|
| + <style>
|
| + /* TODO(polyup): For speed, consider reworking these styles with .classes
|
| + and #ids rather than [attributes].
|
| + */
|
| + [layout] {
|
| + @apply(--layout);
|
| + }
|
| + [layout][vertical] {
|
| + @apply(--layout-vertical);
|
| + }
|
| + [layout][flex] {
|
| + @apply(--layout-flex);
|
| + }
|
| + </style>
|
| + <style>
|
| :host {
|
| display: block;
|
| }
|
| @@ -27,23 +43,41 @@ found in the LICENSE file.
|
| color: #212121;
|
| }
|
| </style>
|
| + <template>
|
| <paper-tabs selected="{{ selected }}">
|
| - <template repeat="{{ builder in builders }}">
|
| + <template is="dom-repeat" items="{{builders}}" as="builder">
|
| <paper-tab>{{ builder }}</paper-tab>
|
| </template>
|
| </paper-tabs>
|
| - <ct-results-detail flex layout vertical failure="{{ failure }}" builder="{{ builders[selected] }}"></ct-results-detail>
|
| + <ct-results-detail flex="" layout="" vertical="" failure="{{ failure }}" builder="{{computeBuilder(builders, selected)}}"></ct-results-detail>
|
| </template>
|
| <script>
|
| Polymer({
|
| - failure: null,
|
| - builders: [],
|
| - selected: 0,
|
| -
|
| - failureChanged: function() {
|
| + is: 'ct-results-by-builder',
|
| + properties: {
|
| + builders: {
|
| + type: Array,
|
| + value: function () {
|
| + return [];
|
| + }
|
| + },
|
| + failure: {
|
| + value: null,
|
| + notify: true,
|
| + observer: 'failureChanged'
|
| + },
|
| + selected: {
|
| + type: Number,
|
| + value: 0
|
| + }
|
| + },
|
| + failureChanged: function () {
|
| this.builders = Object.getOwnPropertyNames(this.failure.resultNodesByBuilder).sort();
|
| this.selected = 0;
|
| },
|
| + computeBuilder: function (builders, selected) {
|
| + return builders[selected];
|
| + }
|
| });
|
| </script>
|
| -</polymer-element>
|
| +</dom-module>
|
|
|