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

Side by Side Diff: Tools/AutoSheriff/ui/nb-grouped-alert-list.html

Issue 398823008: WIP: Add auto-sheriff.appspot.com code to Blink Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <polymer-element name='nb-grouped-alert-list' attributes='failures groups'>
2 <template>
3 <script src='filters.js'></script>
4 <table>
5 <tr><th>reason</th><th>blame</th><th>builders</th></tr>
6 <template repeat="{{ group in groups }}">
7 <tr>
8 <td>
9 {{ group.failures[0].step_name }}
10 <template repeat="{{ reason in group.reasons }}">
11 <template if="{{ reason }}">
12 <!-- FIXME this will be wrong if there are multiple step names! -->
13 <div>
14 <a href="{{ reason | flakiness_dashboard_url(group.failures[0].step_ name, group.failures[0].master_url) }}">
15 {{reason }}
16 </a>
17 </div>
18 </template>
19 </template>
20 </td>
21 <td>
22 <template if="{{ group.likely_revisions.length < 10}}">
23 <template repeat="{{ revision in group.likely_revisions }}">
24 <div>
25 <a href="{{ revision | change_url }}">{{ revision }}</a>
26 </div>
27 </template>
28 </template>
29 <template if="{{ group.likely_revisions.length >= 10 }}">
30 <nb-changelogs passing="{{ group.merged_last_passing }}" failing="{{ g roup.merged_first_failing }}"></nb-changelogs>
31 </template>
32 </td>
33 <td>
34 <template repeat="{{ builder_name in group.builder_names }}">
35 <span style='border: 1px solid blue'>{{ builder_name }}</span>
36 </template>
37 </td>
38 </tr>
39 </template>
40 </table>
41 </template>
42 <script>
43 Polymer('nb-grouped-alert-list', {
44 change_url: function(value) {
45 var args = value.split(':');
46 return repositories.change_url(args[0], args[1]);
47 },
48 groupsChanged: function(oldValue, newValue) {
49 // This is kinda hacky to modify newValue.
50 newValue.forEach(function(group) {
51 var reasons = {};
52 var builder_names = {};
53 group.failures = []
54 group.failure_keys.forEach(function(failure_key) {
55 var failure = this.failureForKey(failure_key);
56 group.failures.push(failure);
57 if (failure.reason)
58 reasons[failure.reason] = 1;
59 builder_names[failure.builder_name] = 1;
60 }, this);
61 group.reasons = Object.keys(reasons);
62 group.builder_names = Object.keys(builder_names);
63 }, this);
64 },
65 failureForKey: function(key) {
66 for (var x = 0; x < this.failures.length; x++) {
67 var failure = this.failures[x];
68 if (failure.key == key)
69 return failure
70 }
71 }
72 });
73 </script>
74 </polymer-element>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698