Skip to content
Extraits de code Groupes Projets
Valider 906e5a60 rédigé par mattpiwik's avatar mattpiwik
Parcourir les fichiers

Fixes #2324

git-svn-id: http://dev.piwik.org/svn/trunk@4489 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent 7b275d67
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -204,6 +204,10 @@ datatable_archiving_maximum_rows_subtable_actions = 100 ...@@ -204,6 +204,10 @@ datatable_archiving_maximum_rows_subtable_actions = 100
; maximum number of rows for other tables (Providers, User settings configurations) ; maximum number of rows for other tables (Providers, User settings configurations)
datatable_archiving_maximum_rows_standard = 500 datatable_archiving_maximum_rows_standard = 500
; by default, the real time Live! widget will update every 5 seconds and refresh with new visits/actions/etc.
; you can change the timeout so the widget refreshes more often, or not as frequently
live_widget_refresh_after_seconds = 5
; by default, Piwik uses self-hosted AJAX libraries. ; by default, Piwik uses self-hosted AJAX libraries.
; If set to 1, Piwik uses a Content Distribution Network ; If set to 1, Piwik uses a Content Distribution Network
use_ajax_cdn = 0 use_ajax_cdn = 0
......
...@@ -25,6 +25,7 @@ class Piwik_Live_Controller extends Piwik_Controller ...@@ -25,6 +25,7 @@ class Piwik_Live_Controller extends Piwik_Controller
$view = Piwik_View::factory('index'); $view = Piwik_View::factory('index');
$view->idSite = $this->idSite; $view->idSite = $this->idSite;
$view = $this->setCounters($view); $view = $this->setCounters($view);
$view->liveRefreshAfterMs = (int)Zend_Registry::get('config')->General->live_widget_refresh_after_seconds * 1000;
$view->visitors = $this->getLastVisitsStart($fetchPlease = true); $view->visitors = $this->getLastVisitsStart($fetchPlease = true);
$view->liveTokenAuth = Piwik::getCurrentUserTokenAuth(); $view->liveTokenAuth = Piwik::getCurrentUserTokenAuth();
return $this->render($view, $fetch); return $this->render($view, $fetch);
......
...@@ -14,7 +14,7 @@ function initSpy() ...@@ -14,7 +14,7 @@ function initSpy()
ajax: 'index.php?module=Live&idSite={/literal}{$idSite}{if !empty($liveTokenAuth)}&token_auth={$liveTokenAuth}{/if}{literal}&action=getLastVisitsStart', ajax: 'index.php?module=Live&idSite={/literal}{$idSite}{if !empty($liveTokenAuth)}&token_auth={$liveTokenAuth}{/if}{literal}&action=getLastVisitsStart',
fadeLast: 2, fadeLast: 2,
isDupe: check_for_dupe, isDupe: check_for_dupe,
timeout: 5000, timeout: {/literal}{$liveRefreshAfterMs}{literal},
customParameterName: 'minTimestamp', customParameterName: 'minTimestamp',
customParameterValueCallback: lastMaxTimestamp, customParameterValueCallback: lastMaxTimestamp,
fadeInSpeed: 600, fadeInSpeed: 600,
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter