update Piwik to version 2.16 (fixes #91)
This commit is contained in:
parent
296343bf3b
commit
d885a4baa9
5833 changed files with 418860 additions and 226988 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -46,7 +46,7 @@ class Controller extends \Piwik\Plugin\Controller
|
|||
$view = new View('@ExampleUI/evolutiongraph');
|
||||
|
||||
$this->setPeriodVariablesView($view);
|
||||
$view->evolutionGraph = $this->getEvolutionGraph(array('server1', 'server2'));
|
||||
$view->evolutionGraph = $this->getEvolutionGraph(array(), array('server1', 'server2'));
|
||||
|
||||
return $view->render();
|
||||
}
|
||||
|
|
@ -78,16 +78,23 @@ class Controller extends \Piwik\Plugin\Controller
|
|||
return $view->render();
|
||||
}
|
||||
|
||||
public function getEvolutionGraph(array $columns = array())
|
||||
public function getEvolutionGraph(array $columns = array(), array $defaultColumns = array())
|
||||
{
|
||||
if (empty($columns)) {
|
||||
$columns = Common::getRequestVar('columns');
|
||||
$columns = Piwik::getArrayFromApiParameter($columns);
|
||||
$columns = Common::getRequestVar('columns', false);
|
||||
if (false !== $columns) {
|
||||
$columns = Piwik::getArrayFromApiParameter($columns);
|
||||
}
|
||||
}
|
||||
|
||||
$view = $this->getLastUnitGraphAcrossPlugins($this->pluginName, __FUNCTION__, $columns,
|
||||
$selectableColumns = array('server1', 'server2'), 'My documentation', 'ExampleUI.getTemperaturesEvolution');
|
||||
$view->requestConfig->filter_sort_column = 'label';
|
||||
$view->requestConfig->filter_sort_order = 'asc';
|
||||
|
||||
if (empty($view->config->columns_to_display) && !empty($defaultColumns)) {
|
||||
$view->config->columns_to_display = $defaultColumns;
|
||||
}
|
||||
|
||||
return $this->renderView($view);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue