Chromium Code Reviews| Index: fuzzer/templates/index.html |
| diff --git a/fuzzer/templates/index.html b/fuzzer/templates/index.html |
| index 6571e9fc03a093a11525305fc92f539fb1a13eb9..5b4344639b6b0b363e1f633a1fec4914527de1da 100644 |
| --- a/fuzzer/templates/index.html |
| +++ b/fuzzer/templates/index.html |
| @@ -5,6 +5,50 @@ |
| {{template "header.html" .}} |
| </head> |
| <body> |
| + <scaffold-sk responsiveWidth="700px"> |
| + {{template "titlebar.html" .}} |
| + <div id="fuzzes"></div> |
| + </scaffold-sk> |
| + |
| +<script type="text/javascript" charset="utf-8"> |
| +(function() { |
| + var page = {}; |
|
jcgregorio
2015/06/01 14:39:47
This looks good, but wrap it in the 'then' of the
humper
2015/06/01 16:14:43
Done.
|
| + var fuzzes = []; |
| + |
| + page.state = { |
| + failed: true, |
| + passed: false |
| + }; |
| + |
| + function displayFuzzes() { |
| + var container = $$$("#fuzzes"); |
| + sk.clearChildren(container); |
| + |
| + fuzzes.forEach(function(c, i) { |
| + var s = document.createElement('fuzz-summary-sk'); |
| + s.hash = c; |
| + |
| + container.appendChild(s); |
| + }) |
| + } |
| + |
| + function loadFuzzes() { |
| + sk.get("{{.LoadFuzzListURL}}?"+sk.query.fromObject(page.state)).then(JSON.parse).then(function(data) { |
| + fuzzes = data; |
| + displayFuzzes(); |
| + }); |
| + } |
| + |
| + path = document.location.pathname; |
| + if (path.startsWith("/passed")) { |
| + page.state.failed = false; |
| + page.state.passed = true; |
| + } |
| + |
| + sk.stateReflector(page, loadFuzzes); |
| +})(); |
| +</script> |
| + |
| {{template "footer.html" .}} |
| </body> |
| </html> |