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

Unified Diff: appengine/sheriff_o_matic/ui/ct-results-by-builder.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
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>
« no previous file with comments | « appengine/sheriff_o_matic/ui/ct-popup-menu.html ('k') | appengine/sheriff_o_matic/ui/ct-results-comparison.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698