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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: Tools/AutoSheriff/ui/nb-grouped-alert-list.html
diff --git a/Tools/AutoSheriff/ui/nb-grouped-alert-list.html b/Tools/AutoSheriff/ui/nb-grouped-alert-list.html
new file mode 100644
index 0000000000000000000000000000000000000000..063839467eaf085e0672edd3c00f7fc5113f704f
--- /dev/null
+++ b/Tools/AutoSheriff/ui/nb-grouped-alert-list.html
@@ -0,0 +1,74 @@
+<polymer-element name='nb-grouped-alert-list' attributes='failures groups'>
+<template>
+ <script src='filters.js'></script>
+ <table>
+ <tr><th>reason</th><th>blame</th><th>builders</th></tr>
+ <template repeat="{{ group in groups }}">
+ <tr>
+ <td>
+ {{ group.failures[0].step_name }}
+ <template repeat="{{ reason in group.reasons }}">
+ <template if="{{ reason }}">
+ <!-- FIXME this will be wrong if there are multiple step names! -->
+ <div>
+ <a href="{{ reason | flakiness_dashboard_url(group.failures[0].step_name, group.failures[0].master_url) }}">
+ {{reason }}
+ </a>
+ </div>
+ </template>
+ </template>
+ </td>
+ <td>
+ <template if="{{ group.likely_revisions.length < 10}}">
+ <template repeat="{{ revision in group.likely_revisions }}">
+ <div>
+ <a href="{{ revision | change_url }}">{{ revision }}</a>
+ </div>
+ </template>
+ </template>
+ <template if="{{ group.likely_revisions.length >= 10 }}">
+ <nb-changelogs passing="{{ group.merged_last_passing }}" failing="{{ group.merged_first_failing }}"></nb-changelogs>
+ </template>
+ </td>
+ <td>
+ <template repeat="{{ builder_name in group.builder_names }}">
+ <span style='border: 1px solid blue'>{{ builder_name }}</span>
+ </template>
+ </td>
+ </tr>
+ </template>
+ </table>
+</template>
+<script>
+Polymer('nb-grouped-alert-list', {
+ change_url: function(value) {
+ var args = value.split(':');
+ return repositories.change_url(args[0], args[1]);
+ },
+ groupsChanged: function(oldValue, newValue) {
+ // This is kinda hacky to modify newValue.
+ newValue.forEach(function(group) {
+ var reasons = {};
+ var builder_names = {};
+ group.failures = []
+ group.failure_keys.forEach(function(failure_key) {
+ var failure = this.failureForKey(failure_key);
+ group.failures.push(failure);
+ if (failure.reason)
+ reasons[failure.reason] = 1;
+ builder_names[failure.builder_name] = 1;
+ }, this);
+ group.reasons = Object.keys(reasons);
+ group.builder_names = Object.keys(builder_names);
+ }, this);
+ },
+ failureForKey: function(key) {
+ for (var x = 0; x < this.failures.length; x++) {
+ var failure = this.failures[x];
+ if (failure.key == key)
+ return failure
+ }
+ }
+});
+</script>
+</polymer-element>

Powered by Google App Engine
This is Rietveld 408576698