Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(908)

Unified Diff: appengine/sheriff_o_matic/ui/ct-builder-status.html

Issue 1315693002: SoM: upgrade Polymer from 0.5 to 1.0 Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: get bower_components from polymer_1.0.4 Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/sheriff_o_matic/ui/ct-builder-grid.html ('k') | appengine/sheriff_o_matic/ui/ct-button.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « appengine/sheriff_o_matic/ui/ct-builder-grid.html ('k') | appengine/sheriff_o_matic/ui/ct-button.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698