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

Side by Side 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 unified diff | Download patch
OLDNEW
1 <!-- 1 <!--
2 Copyright 2015 The Chromium Authors. All rights reserved. 2 Copyright 2015 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be 3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file. 4 found in the LICENSE file.
5 --> 5 --><html><head><link rel="import" href="ct-user-prefs.html">
6
7 <link rel="import" href="ct-user-prefs.html">
8 <link rel="import" href="ct-commit-list.html"> 6 <link rel="import" href="ct-commit-list.html">
9 <link rel="import" href="../bower_components/paper-button/paper-button.html"> 7 <link rel="import" href="../bower_components/paper-button/paper-button.html">
10 <polymer-element name="ct-build-failure-ext" attributes="failure"> 8 <!--
11 <template> 9 TODO(polyup): unable to infer path to components
12 <style> 10 directory. This import path is probably incomplete.
11 -->
12 <link rel="import" href="iron-flex-layout/iron-flex-layout.html">
13 <dom-module id="ct-build-failure-ext">
14 <style>
15 /* TODO(polyup): For speed, consider reworking these styles with .classes
16 and #ids rather than [attributes].
17 */
18 [layout] {
19 @apply(--layout);
20 }
21 [layout][vertical] {
22 @apply(--layout-vertical);
23 }
24 </style>
25 <style>
13 :host { 26 :host {
14 display: block; 27 display: block;
15 } 28 }
16 div { 29 div {
17 margin-bottom: 10px; 30 margin-bottom: 10px;
18 } 31 }
19 </style> 32 </style>
33 <template>
20 <ct-user-prefs id="userPrefs"></ct-user-prefs> 34 <ct-user-prefs id="userPrefs"></ct-user-prefs>
21 <div layout vertical> 35 <div layout="" vertical="">
22 <template if="{{ failure.tree_closer }}"> 36 <template is="dom-if" if="{{ failure.tree_closer }}">
23 <b>TREE CLOSER</b> 37 <b>TREE CLOSER</b>
24 </template> 38 </template>
25 <template repeat="{{ builder in failure.builders }}"> 39 <template is="dom-repeat" items="{{failure.builders}}" as="builder">
26 <div> 40 <div>
27 <a href="{{ builder.url }}" target="{{ $.userPrefs.values.linkTarget } }">{{ builder.name }}</a> 41 <a target="{{ $.userPrefs.values.linkTarget }}" href$="{{ builder.url }}">{{ builder.name }}</a>
28 <!-- TODO(seanmccullough): Use revision numbers instead of build num bers --> 42 <!-- TODO(seanmccullough): Use revision numbers instead of build num bers -->
29 {{ builder.first_failure }} : {{ builder.latest_failure }} 43 <span>{{ builder.first_failure }}</span> : <span>{{ builder.latest_f ailure }}</span>
30 </div> 44 </div>
31 </template> 45 </template>
32 <template if="{{ failure.reasons }}"> 46 <template is="dom-if" if="{{ failure.reasons }}">
33 Reason: 47 Reason:
34 <template repeat="{{ reason in failure.reasons }}"> 48 <template is="dom-repeat" items="{{failure.reasons}}" as="reason">
35 <div> 49 <div>
36 <a href="{{ reason.url }}">{{ reason.step }}</a> 50 <a href$="{{ reason.url }}">{{ reason.step }}</a>
37 </div> 51 </div>
38 </template> 52 </template>
39 </template> 53 </template>
40 <template repeat="{{ range in failure.regression_ranges }}"> 54 <template is="dom-repeat" items="{{failure.regression_ranges}}" as="range" >
41 <div> 55 <div>
42 <paper-item on-click="{{ _toggle }}" repo="{{ range.repo }}"> 56 <paper-item on-click=" _toggle " repo="{{ range.repo }}">
43 <paper-icon-button icon="unfold-more"></paper-icon-button> 57 <paper-icon-button icon="unfold-more"></paper-icon-button>
44 {{ range.repo }} ({{ range.revisions.length}}) 58 <span>{{ range.repo }}</span> (<span>{{ range.revisions.length}}</sp an>)
45 </paper-item> 59 </paper-item>
46 <template if="{{ range.expanded }}"> 60 <template is="dom-if" if="{{ range.expanded }}">
47 <ul> 61 <ul>
48 <template repeat="{{ rev in range.revisions }}"> 62 <template is="dom-repeat" items="{{range.revisions}}" as="rev">
49 <li><a href="{{ range.repo }}/+/{{ rev }}">{{ rev }}</a></li> 63 <li><a href$="{{computeHref(range, rev)}}">{{ rev }}</a></li>
50 </template> 64 </template>
51 </ul> 65 </ul>
52 </template> 66 </template>
53 </div> 67 </div>
54 </template> 68 </template>
55 </div> 69 </div>
56 </template> 70 </template>
57 <script> 71 <script>
58 Polymer({ 72 Polymer({
59 revisionInfo: function(rev) { 73 is: 'ct-build-failure-ext',
60 return "Revision info for " + rev; 74 properties: { failure: { notify: true } },
75 revisionInfo: function (rev) {
76 return 'Revision info for ' + rev;
61 }, 77 },
62 _toggle: function(evt, detail, el) { 78 _toggle: function (evt, detail, el) {
63 for (var i = 0; i < this.failure.regression_ranges.length; i++) { 79 for (var i = 0; i < this.failure.regression_ranges.length; i++) {
64 var range = this.failure.regression_ranges[i]; 80 var range = this.failure.regression_ranges[i];
65 if (range.repo == el.getAttribute("repo")) { 81 if (range.repo == el.getAttribute('repo')) {
66 range.expanded = !range.expanded; 82 range.expanded = !range.expanded;
67 } 83 }
68 } 84 }
85 },
86 computeHref: function (range, rev) {
87 return range.repo + '/+/' + rev;
69 } 88 }
70 }); 89 });
71 </script> 90 </script>
72 </polymer-element> 91 </dom-module>
73 92
74 93
OLDNEW
« 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