added link to video rec for webpagetest when SPOF is found

This commit is contained in:
Peter Hedenskog 2012-10-13 22:57:11 +02:00
parent 7663afa544
commit 26995de2eb
3 changed files with 16 additions and 9 deletions

BIN
dependencies/xml-velocity-1.1-full.jar vendored Normal file

Binary file not shown.

View File

@ -4,7 +4,7 @@
<div class="span12">
<h2>
Pages ($document.getRootElement().getChildren().size()) - <a href="$document.getRootElement().getAttribute("url").getValue()" target="_blank"><$document.getRootElement().getAttribute("url").getValue()</a>
Pages ($document.getRootElement().getChildren().size()) - <a href="$document.getRootElement().getAttribute("url").getValue()" target="_blank">$document.getRootElement().getAttribute("url").getValue()</a>
</h2>
<p>
Test performed: $document.getRootElement().getAttribute("date").getValue()
@ -173,14 +173,20 @@
<td>
#if ($results.getChild("g").getChild("spof").getChild("components").getChildren("item").size() > 0)
#set($spofDomains = "")
#foreach ($spofUrl in $results.getChild("g").getChild("spof").getChild("components").getChildren("item"))
#set($spofDomains = $spofDomains + $host.getHost($spofUrl.getValue()) + ",")
#end
<a href="#spof-$foreach.count" data-toggle="modal">
$results.getChild("g").getChild("spof").getChild("components").getChildren("item").size()
</a>
<!--
// TODO add the domains
<a href="http://www.webpagetest.org/?url=$esc.url($results.getChild("u").getValue())&video=1&runs=3&spof=" target="_blank" title="Check this page on webpagetest.org with the spof domains"> <i class="icon-time"></i>
<a href="http://www.webpagetest.org/?url=$esc.url($results.getChild("u").getValue())&video=1&runs=3&spof=$esc.url($spofDomains)" target="_blank" title="Record a video at webpagetest.org with the spof domains down"> <i class="icon-facetime-video"></i>
</a>
-->
<div class="modal hide fade" id="spof-$foreach.count" show="false" aria-labelledby="jsModalLabel-$foreach.count" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-header">
<h3 id="spofModalLabel-$foreach.count">
@ -189,6 +195,7 @@
</div>
<div class="modal-body">
#foreach ($spof in $results.getChild("g").getChild("spof").getChild("components").getChildren("item"))
<a href="$esc.html($spof.getValue())" target="_blank">$esc.html($spof.getValue())</a>
<br/>
#end
@ -234,7 +241,7 @@
</td>
<td>
<a href="http://www.webpagetest.org/?url=$esc.url($results.getChild("u").getValue())&video=1&runs=3" target="_blank" title="Check this page on webpagetest.org"> <i class="icon-time"></i>
<a href="http://www.webpagetest.org/?url=$esc.url($results.getChild("u").getValue())&runs=3" target="_blank" title="Check this page on webpagetest.org"> <i class="icon-time"></i>
</a>
</td>

View File

@ -124,17 +124,17 @@ do
sed 's/<?xml version="1.0" encoding="UTF-8"?>//g' "$REPORT_DATA_PAGES_DIR/$pagefilename.xml" >> "$REPORT_DATA_DIR/result.xml" || exit 1
java -Xmx256m -Xms256m -jar dependencies/xml-velocity-1.0-full.jar $REPORT_DATA_PAGES_DIR/$pagefilename.xml report/velocity/page.vm report/properties/page.properties $REPORT_PAGES_DIR/$pagefilename.html || exit 1
java -Xmx256m -Xms256m -jar dependencies/xml-velocity-1.1-full.jar $REPORT_DATA_PAGES_DIR/$pagefilename.xml report/velocity/page.vm report/properties/page.properties $REPORT_PAGES_DIR/$pagefilename.html || exit 1
pagefilename=$[$pagefilename+1]
done
echo '</document>'>> "$REPORT_DATA_DIR/result.xml"
echo 'Create the pages.html'
java -Xmx1024m -Xms1024m -jar dependencies/xml-velocity-1.0-full.jar $REPORT_DATA_DIR/result.xml report/velocity/pages.vm report/properties/pages.properties $REPORT_DIR/pages.html || exit 1
java -Xmx1024m -Xms1024m -jar dependencies/xml-velocity-1.1-full.jar $REPORT_DATA_DIR/result.xml report/velocity/pages.vm report/properties/pages.properties $REPORT_DIR/pages.html || exit 1
echo 'Create the summary index.html'
java -Xmx1024m -Xms1024m -jar dependencies/xml-velocity-1.0-full.jar $REPORT_DATA_DIR/result.xml report/velocity/summary.vm report/properties/summary.properties $REPORT_DIR/index.html || exit 1
java -Xmx1024m -Xms1024m -jar dependencies/xml-velocity-1.1-full.jar $REPORT_DATA_DIR/result.xml report/velocity/summary.vm report/properties/summary.properties $REPORT_DIR/index.html || exit 1
#copy the rest of the files
mkdir $REPORT_DIR/css