| Index: appengine/sheriff_o_matic/ui/ct-builder-status.html
|
| diff --git a/appengine/sheriff_o_matic/ui/ct-builder-status.html b/appengine/sheriff_o_matic/ui/ct-builder-status.html
|
| index b617642e900ce3faee358cf4fe17051d979672f1..ba98c82643c1db7bac2452243f140d0b6958343d 100644
|
| --- a/appengine/sheriff_o_matic/ui/ct-builder-status.html
|
| +++ b/appengine/sheriff_o_matic/ui/ct-builder-status.html
|
| @@ -2,13 +2,10 @@
|
| 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.
|
| --->
|
| +--><html><head><link href="../model/ct-builder-status.html" rel="import">
|
|
|
| -<link href="../model/ct-builder-status.html" rel="import">
|
| -
|
| -<polymer-element name="ct-builder-status">
|
| - <template>
|
| - <style>
|
| +<dom-module id="ct-builder-status">
|
| + <style>
|
| li > a { display: inline-block; width: 40ex; }
|
| li > span { display: inline-block; width: 20ex;}
|
| .groups {
|
| @@ -31,29 +28,30 @@ found in the LICENSE file.
|
| margin: 0;
|
| }
|
| </style>
|
| + <template>
|
|
|
| - <template if="{{ errorMessage }}">
|
| + <template is="dom-if" if="{{ errorMessage }}">
|
| <h2>Failed to load and/or parse data.</h2>
|
| <p>{{ errorMessage }}</p>
|
| </template>
|
|
|
| - <template if="{{ groups.length && !errorMessage }}">
|
| + <template is="dom-if" if="{{computeIf(errorMessage, groups)}}">
|
| <ul class="groups">
|
| - <template repeat="{{ group in groups }}">
|
| + <template is="dom-repeat" items="{{groups}}" as="group">
|
| <li>
|
| <h2>{{ group.name }}</h2>
|
| <ul class="builds">
|
| - <template repeat="{{ builder in group.builders }}">
|
| + <template is="dom-repeat" items="{{group.builders}}" as="builder">
|
| <li>
|
| - <a href="{{builder.uri}}">{{ builder.name }}</a>
|
| - <template repeat="{{ repository in builder.repositories }}">
|
| + <a href$="{{builder.uri}}">{{ builder.name }}</a>
|
| + <template is="dom-repeat" items="{{builder.repositories}}" as="repository">
|
| <span>
|
| - {{ repository.name }}:
|
| - <template if="{{ repository.uri }}">
|
| - <a href="{{repository.uri}}">{{ repository.revision }}</a>
|
| + <span>{{ repository.name }}</span>:
|
| + <template is="dom-if" if="{{ repository.uri }}">
|
| + <a href$="{{repository.uri}}">{{ repository.revision }}</a>
|
| </template>
|
| - <template if="{{ !repository.uri }}">
|
| - {{ repository.revision }}
|
| + <template is="dom-if" if="{{ !repository.uri }}">
|
| + <span>{{ repository.revision }}</span>
|
| </template>
|
| </span>
|
| </template>
|
| @@ -65,13 +63,16 @@ found in the LICENSE file.
|
| </ul>
|
| </template>
|
| </template>
|
| -
|
| <script>
|
| - Polymer('ct-builder-status', {
|
| - ready: function() {
|
| + Polymer({
|
| + is: 'ct-builder-status',
|
| + ready: function () {
|
| this.groups = [];
|
| this.errorMessage = '';
|
| + },
|
| + computeIf: function (errorMessage, groups) {
|
| + return groups.length && !errorMessage;
|
| }
|
| });
|
| </script>
|
| -</polymer-element>
|
| +</dom-module>
|
|
|