diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2012-03-21 02:47:59 +0400 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2012-03-21 02:47:59 +0400 |
commit | 3220c522432e2850e5647f3570983979df3a9e2f (patch) | |
tree | 858056f91b51efaa9cc7d66bd231486ef58b6de1 /plugins/Live/templates | |
parent | abbebacf46f5b986fa5dcb12079b8a6122a5bc28 (diff) |
Fixes #2989
* Capping pages displayed to 100 and displaying a message if there were some pages truncated
* Note: it would have been maybe better to change the API and add a new parameter to limit pages per visitor, but because we still want to display all pages in the Visitor Log, this hack is fine
git-svn-id: http://dev.piwik.org/svn/trunk@6079 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/Live/templates')
-rw-r--r-- | plugins/Live/templates/lastVisits.tpl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/Live/templates/lastVisits.tpl b/plugins/Live/templates/lastVisits.tpl index 230a6f52f6..338f3be28e 100644 --- a/plugins/Live/templates/lastVisits.tpl +++ b/plugins/Live/templates/lastVisits.tpl @@ -1,3 +1,6 @@ +{* some users view thousands of pages which can crash the browser viewing Live! *} +{assign var=maxPagesDisplayedByVisitor value=100} + <ul id='visitsLive'> {foreach from=$visitors item=visitor} <li id="{$visitor.idVisit}" class="visit"> @@ -33,7 +36,8 @@ <div id="{$visitor.idVisit}_actions" class="settings"> <span class="pagesTitle">{'Actions_SubmenuPages'|translate}:</span> {php} $col = 0; {/php} - {foreach from=$visitor.actionDetails item=action} + {foreach from=$visitor.actionDetails item=action name=visitorPages} + {if $smarty.foreach.visitorPages.iteration <= $maxPagesDisplayedByVisitor} {if $action.type == 'ecommerceOrder' || $action.type == 'ecommerceAbandonedCart'} <span title=" {if $action.type == 'ecommerceOrder'}{'Goals_EcommerceOrder'|translate}{else}{'Goals_AbandonedCart'|translate}{/if} @@ -57,7 +61,11 @@ {/if} </a> {/if} + {/if} {/foreach} + {if $smarty.foreach.visitorPages.iteration > $maxPagesDisplayedByVisitor} + <i>({'Live_MorePagesNotDisplayed'|translate})</i> + {/if} </div> </li> {/foreach} |