correct header when testing sites and show the right runsummary

This commit is contained in:
soulgalore 2014-08-12 08:02:01 +02:00
parent 054664b602
commit affceb426a
3 changed files with 32 additions and 30 deletions

View File

@ -106,9 +106,10 @@ HTMLRenderer.prototype.renderSites = function(sitesAggregates, cb) {
"pageMeta": {
"title": "",
"description": "",
"hideMenu": true,
"isSites": true
}
};
renderHtmlToFile('sites', renderData, cb, 'sites.html', '..');
};

View File

@ -1,27 +1,28 @@
{{#if config.url}}
<h2 class="url">
<!-- TODO handle runs from file with no url -->
{{numberOfPages}} page{{getPlural numberOfPages}} analyzed for <a href="{{config.url}}" target="_blank">{{config.url}}</a>
</h2>
{{/if}}
{{#if config.sites}}
<h2> Sites analyzed from file {{config.sites}}</h2>
{{/if}}
{{#if config.file}}
<h2> {{numberOfPages}} page{{getPlural numberOfPages}} analyzed for file {{config.file}}</h2>
{{/if}}
{{#if config.name}}
<h3>{{config.name}}</h3>
{{/if}}
<p>
Test performed {{config.run.date}} with {{config.ruleSet}} rules.
</p>
<p>
<small>
{{#if config.ip}}
<strong>IP:</strong> <em>{{config.ip}}</em>
{{/if}}
<strong>User-Agent:</strong> <em>{{config.userAgent}}</em>
<strong>Viewport:</strong> <em>{{config.viewPort}}</em>
</small>
</p>
{{#if pageMeta.isSites}}
<h2> Sites analyzed from file {{config.sites}}</h2>
{{else}}
{{#if config.url}}
<h2 class="url">
{{numberOfPages}} page{{getPlural numberOfPages}} analyzed for <a href="{{config.url}}" target="_blank">{{config.url}}</a>
</h2>
{{else}}
{{#if config.file}}
<h2> {{numberOfPages}} page{{getPlural numberOfPages}} analyzed for file {{config.file}}</h2>
{{/if}}
{{/if}}
{{/if}}
{{#if config.name}}
<h3>{{config.name}}</h3>
{{/if}}
<p>Test performed {{config.run.date}} with {{config.ruleSet}} rules.</p>
<p>
<small>
{{#if config.ip}}
<strong>IP:</strong> <em>{{config.ip}}</em>
{{/if}}
<strong>User-Agent:</strong> <em>{{config.userAgent}}</em>
<strong>Viewport:</strong> <em>{{config.viewPort}}</em>
</small>
</p>

View File

@ -40,8 +40,8 @@
<script>
$(function(){
$("#sitesTable").stupidtable();
});
$("#sitesTable").stupidtable();
});
</script>
<script>