Chromium Code Reviews| Index: Tools/AutoSheriff/nannybot.html |
| diff --git a/Tools/AutoSheriff/nannybot.html b/Tools/AutoSheriff/nannybot.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7d56bf6b51da4039100579e42bb45f0d619d5787 |
| --- /dev/null |
| +++ b/Tools/AutoSheriff/nannybot.html |
| @@ -0,0 +1,75 @@ |
| +<!doctype html> |
|
ojan
2014/07/22 02:01:25
Ditto all the comments on the previous html file.
|
| +<html> |
| +<head> |
| + <title>Auto-Sheriff</title> |
| + <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> |
| + <script src="components/platform/platform.js"></script> |
| + <script src="scripts/repositories.js"></script> |
|
ojan
2014/07/22 02:01:25
Ditto: re using html imports for scripts.
|
| + <script src="scripts/third_party/js_humanized_time_span/humanized_time_span.js"></script> |
| + <style> |
| + html,body { |
| + height: 100%; |
| + margin: 0; |
| + background-color: #E5E5E5; |
| + font-family: 'RobotoDraft', sans-serif; |
| + } |
| + </style> |
| + <link rel="import" href="components/polymer/polymer.html"> |
| + <script src='ui/filters.js'></script> |
| + <link rel="import" href="components/font-roboto/roboto.html"> |
| + <link rel="import" href="components/core-ajax/core-ajax.html"> |
| + <link rel="import" href="components/sortable-table/sortable-table.html"> |
| + <link rel="import" href="ui/nb-changelogs.html"> |
| + <link rel="import" href="ui/nb-alert-list.html"> |
| + <link rel="import" href="ui/nb-grouped-alert-list.html"> |
| + <link rel="import" href="ui/nb-ignores-list.html"> |
| + <link rel="shortcut icon" href="/favicon.ico"> |
| +</head> |
| + |
| +<body unresolved touch-action="auto"> |
| + |
| +<polymer-element name="nb-main" attributes='failures filteredFailures displayedFailures'> |
| +<template> |
| +<div>This is a debugging view for building a global-failures datastream (<a href='/data'>/data</a>) off of which we can build tools to automatically maintain Chromium bots. <a href='https://github.com/eseidel/cycletimes/tree/master/nannybot'>Source<a></div> |
|
ojan
2014/07/22 02:01:25
Nit: please indent all this stuff to show nesting.
|
| +<div> |
| +Updated: {{ response.date | since_string }}, |
| +{{ displayedFailures.length }} failures ({{ failures.length - displayedFailures.length }} ignored) |
| +</div> |
| +<h3>Failures grouped by reason</h3> |
| +<nb-grouped-alert-list groups='{{grouped_alerts}}' failures='{{failures}}'></nb-grouped-alert-list> |
| +<h3>All failures</h3> |
| +<nb-alert-list failures='{{displayedFailures}}'></nb-alert-list> |
| +<h3>Ignore Rules</h3> |
| +<nb-ignores-list ignores='{{response.ignores}}'></nb-ignores-list> |
| +<core-ajax url="/data" id='loader' auto handleAs="json" response="{{ response }}"></core-ajax> |
| +</template> |
| +<script> |
| +Polymer('nb-main', { |
| + ready: function() { |
| + console.log('nb-main ready'); |
| + window.setInterval(30 * 1000, function() { |
| + console.log('refreshing'); |
| + this.$.loader.go(); |
| + }); |
| + }, |
| + responseChanged: function(oldValue, newValue) { |
| + this.failures = newValue.alerts; |
| + this.filteredFailures = this.failures.filter(function(failure) { return !failure.ignored_by.length }); |
| + // Could have a check-box to toggle these. |
| + this.displayedFailures = this.filteredFailures; |
| + this.grouped_alerts = newValue.range_groups; |
| + this.grouped_alerts.sort(function(a, b) { return a.sort_key.localeCompare(b.sort_key); }) |
| + }, |
| +}); |
| +</script> |
| +</polymer-element> |
| +<nb-main></nb-main> |
| + |
| +<form action='/ignore' method='post'> |
| +<core-field> |
| + <label>Pattern:</label><input name='pattern'> |
| +</core-field> |
| +<input type='submit'> |
| +</form> |
| +</body> |
| +</html> |