OLD | NEW |
---|---|
(Empty) | |
1 <!doctype html> | |
ojan
2014/07/22 02:01:25
Ditto all the comments on the previous html file.
| |
2 <html> | |
3 <head> | |
4 <title>Auto-Sheriff</title> | |
5 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial- scale=1.0, user-scalable=yes"> | |
6 <script src="components/platform/platform.js"></script> | |
7 <script src="scripts/repositories.js"></script> | |
ojan
2014/07/22 02:01:25
Ditto: re using html imports for scripts.
| |
8 <script src="scripts/third_party/js_humanized_time_span/humanized_time_span.js "></script> | |
9 <style> | |
10 html,body { | |
11 height: 100%; | |
12 margin: 0; | |
13 background-color: #E5E5E5; | |
14 font-family: 'RobotoDraft', sans-serif; | |
15 } | |
16 </style> | |
17 <link rel="import" href="components/polymer/polymer.html"> | |
18 <script src='ui/filters.js'></script> | |
19 <link rel="import" href="components/font-roboto/roboto.html"> | |
20 <link rel="import" href="components/core-ajax/core-ajax.html"> | |
21 <link rel="import" href="components/sortable-table/sortable-table.html"> | |
22 <link rel="import" href="ui/nb-changelogs.html"> | |
23 <link rel="import" href="ui/nb-alert-list.html"> | |
24 <link rel="import" href="ui/nb-grouped-alert-list.html"> | |
25 <link rel="import" href="ui/nb-ignores-list.html"> | |
26 <link rel="shortcut icon" href="/favicon.ico"> | |
27 </head> | |
28 | |
29 <body unresolved touch-action="auto"> | |
30 | |
31 <polymer-element name="nb-main" attributes='failures filteredFailures displayedF ailures'> | |
32 <template> | |
33 <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 Ch romium bots. <a href='https://github.com/eseidel/cycletimes/tree/master/nannybo t'>Source<a></div> | |
ojan
2014/07/22 02:01:25
Nit: please indent all this stuff to show nesting.
| |
34 <div> | |
35 Updated: {{ response.date | since_string }}, | |
36 {{ displayedFailures.length }} failures ({{ failures.length - displayedFailures. length }} ignored) | |
37 </div> | |
38 <h3>Failures grouped by reason</h3> | |
39 <nb-grouped-alert-list groups='{{grouped_alerts}}' failures='{{failures}}'></nb- grouped-alert-list> | |
40 <h3>All failures</h3> | |
41 <nb-alert-list failures='{{displayedFailures}}'></nb-alert-list> | |
42 <h3>Ignore Rules</h3> | |
43 <nb-ignores-list ignores='{{response.ignores}}'></nb-ignores-list> | |
44 <core-ajax url="/data" id='loader' auto handleAs="json" response="{{ response }} "></core-ajax> | |
45 </template> | |
46 <script> | |
47 Polymer('nb-main', { | |
48 ready: function() { | |
49 console.log('nb-main ready'); | |
50 window.setInterval(30 * 1000, function() { | |
51 console.log('refreshing'); | |
52 this.$.loader.go(); | |
53 }); | |
54 }, | |
55 responseChanged: function(oldValue, newValue) { | |
56 this.failures = newValue.alerts; | |
57 this.filteredFailures = this.failures.filter(function(failure) { return !fai lure.ignored_by.length }); | |
58 // Could have a check-box to toggle these. | |
59 this.displayedFailures = this.filteredFailures; | |
60 this.grouped_alerts = newValue.range_groups; | |
61 this.grouped_alerts.sort(function(a, b) { return a.sort_key.localeCompare(b. sort_key); }) | |
62 }, | |
63 }); | |
64 </script> | |
65 </polymer-element> | |
66 <nb-main></nb-main> | |
67 | |
68 <form action='/ignore' method='post'> | |
69 <core-field> | |
70 <label>Pattern:</label><input name='pattern'> | |
71 </core-field> | |
72 <input type='submit'> | |
73 </form> | |
74 </body> | |
75 </html> | |
OLD | NEW |