* Avoid crash for plugin has nothing to render.
Plugins that register a pug file, but has nothing to render (e.g. when WPT timed out for all urls), would still have their pugs rendered. This would break the assumption there was data to render, leading to a crash.
Unhandled rejection TypeError: Cannot read property 'run' of undefined on line 13
Filtering out the plugin pugs where there’s data from messages fixes this crash.
* Allow eslinting on js-files in html templates.
* Simplify css/js/pug for tab rendering.
* Split inline js into separate .js file (to allow linting and syntax highlighting in editor).
* Update js/css to show all tabs by default, and then hide them on page load via javascript. That way all content is visible if js fails to load, instead of all content being hidden.
* Don’t scroll page when switching result tab.
* Rename pagexray image for consistency.
* More granular checks for missing plugin data.
* Reflect tab switches in url fragment.
* Let plugins register pugs = generate HTML
There are three types (two implemented here):
* pug for the page summary page
* pug for the run pages
* pug for a summary page
This commit moves out the pugs for WebPageTest and GPSI so we
have them as example plugins.
There are still some love needed for the CSS.
* fix generic css
* lint
* js fix for right tabs and adding name to each tab
* plugins doc
Chrome is easy, Firefox needs to crop the image to the current viewport.
There's also changes to the layout, to make the image fit in better (and
we can do this much better).
See this as a first move for #952 and let us improve.
This pull request adds support for a waterfall view on the page summary(defaults: off) and and each individual run HTML output using PerfCascade. (#876) A CLI option is available to turn on the waterfall view on the page summary using --html.showWaterfallSummary