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

Unified Diff: appengine/sheriff_o_matic/ui/ct-build-failure-ext.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-banner.html ('k') | appengine/sheriff_o_matic/ui/ct-builder.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-build-failure-ext.html
diff --git a/appengine/sheriff_o_matic/ui/ct-build-failure-ext.html b/appengine/sheriff_o_matic/ui/ct-build-failure-ext.html
index 96b736fe1adec136affec4f92a4fefbd38f1a49a..d1e9f3e86646591ed71c7d8f56481c4d28f4b234 100644
--- a/appengine/sheriff_o_matic/ui/ct-build-failure-ext.html
+++ b/appengine/sheriff_o_matic/ui/ct-build-failure-ext.html
@@ -2,14 +2,27 @@
Copyright 2015 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="ct-user-prefs.html">
+--><html><head><link rel="import" href="ct-user-prefs.html">
<link rel="import" href="ct-commit-list.html">
<link rel="import" href="../bower_components/paper-button/paper-button.html">
-<polymer-element name="ct-build-failure-ext" 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-build-failure-ext">
+ <style>
+ /* TODO(polyup): For speed, consider reworking these styles with .classes
+ and #ids rather than [attributes].
+ */
+ [layout] {
+ @apply(--layout);
+ }
+ [layout][vertical] {
+ @apply(--layout-vertical);
+ }
+ </style>
+ <style>
:host {
display: block;
}
@@ -17,36 +30,37 @@ found in the LICENSE file.
margin-bottom: 10px;
}
</style>
+ <template>
<ct-user-prefs id="userPrefs"></ct-user-prefs>
- <div layout vertical>
- <template if="{{ failure.tree_closer }}">
+ <div layout="" vertical="">
+ <template is="dom-if" if="{{ failure.tree_closer }}">
<b>TREE CLOSER</b>
</template>
- <template repeat="{{ builder in failure.builders }}">
+ <template is="dom-repeat" items="{{failure.builders}}" as="builder">
<div>
- <a href="{{ builder.url }}" target="{{ $.userPrefs.values.linkTarget }}">{{ builder.name }}</a>
+ <a target="{{ $.userPrefs.values.linkTarget }}" href$="{{ builder.url }}">{{ builder.name }}</a>
<!-- TODO(seanmccullough): Use revision numbers instead of build numbers -->
- {{ builder.first_failure }} : {{ builder.latest_failure }}
+ <span>{{ builder.first_failure }}</span> : <span>{{ builder.latest_failure }}</span>
</div>
</template>
- <template if="{{ failure.reasons }}">
+ <template is="dom-if" if="{{ failure.reasons }}">
Reason:
- <template repeat="{{ reason in failure.reasons }}">
+ <template is="dom-repeat" items="{{failure.reasons}}" as="reason">
<div>
- <a href="{{ reason.url }}">{{ reason.step }}</a>
+ <a href$="{{ reason.url }}">{{ reason.step }}</a>
</div>
</template>
</template>
- <template repeat="{{ range in failure.regression_ranges }}">
+ <template is="dom-repeat" items="{{failure.regression_ranges}}" as="range">
<div>
- <paper-item on-click="{{ _toggle }}" repo="{{ range.repo }}">
+ <paper-item on-click=" _toggle " repo="{{ range.repo }}">
<paper-icon-button icon="unfold-more"></paper-icon-button>
- {{ range.repo }} ({{ range.revisions.length}})
+ <span>{{ range.repo }}</span> (<span>{{ range.revisions.length}}</span>)
</paper-item>
- <template if="{{ range.expanded }}">
+ <template is="dom-if" if="{{ range.expanded }}">
<ul>
- <template repeat="{{ rev in range.revisions }}">
- <li><a href="{{ range.repo }}/+/{{ rev }}">{{ rev }}</a></li>
+ <template is="dom-repeat" items="{{range.revisions}}" as="rev">
+ <li><a href$="{{computeHref(range, rev)}}">{{ rev }}</a></li>
</template>
</ul>
</template>
@@ -56,19 +70,24 @@ found in the LICENSE file.
</template>
<script>
Polymer({
- revisionInfo: function(rev) {
- return "Revision info for " + rev;
+ is: 'ct-build-failure-ext',
+ properties: { failure: { notify: true } },
+ revisionInfo: function (rev) {
+ return 'Revision info for ' + rev;
},
- _toggle: function(evt, detail, el) {
+ _toggle: function (evt, detail, el) {
for (var i = 0; i < this.failure.regression_ranges.length; i++) {
var range = this.failure.regression_ranges[i];
- if (range.repo == el.getAttribute("repo")) {
+ if (range.repo == el.getAttribute('repo')) {
range.expanded = !range.expanded;
}
}
+ },
+ computeHref: function (range, rev) {
+ return range.repo + '/+/' + rev;
}
});
</script>
-</polymer-element>
+</dom-module>
« no previous file with comments | « appengine/sheriff_o_matic/ui/ct-banner.html ('k') | appengine/sheriff_o_matic/ui/ct-builder.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698