Beispiel #1
0
 /**
  * Caches the intermediate DataTables used in the getIndividualReportsSummary and
  * getIndividualMetricsSummary reports in the option table.
  */
 public function cacheDataByArchiveNameReports()
 {
     $api = Piwik_DBStats_API::getInstance();
     $api->getIndividualReportsSummary(true);
     $api->getIndividualMetricsSummary(true);
     $now = Piwik_Date::now()->getLocalized("%longYear%, %shortMonth% %day%");
     Piwik_SetOption(self::TIME_OF_LAST_TASK_RUN_OPTION, $now);
 }
Beispiel #2
0
 function index()
 {
     $view = Piwik_View::factory('DBStats');
     $view->tablesStatus = Piwik_DBStats_API::getInstance()->getAllTablesStatus();
     $this->setGeneralVariablesView($view);
     $view->menu = Piwik_GetAdminMenu();
     echo $view->render();
 }
	function index()
	{
		Piwik::checkUserIsSuperUser();
		$view = Piwik_View::factory('DBStats');
		$view->tablesStatus = Piwik_DBStats_API::getInstance()->getAllTablesStatus();
		$this->setBasicVariablesView($view);
		$view->menu = Piwik_GetAdminMenu();
		echo $view->render();		
	}
Beispiel #4
0
 /**
  * Returns the index for this plugin. Shows every other report defined by this plugin,
  * except the '...ByYear' reports. These can be loaded as related reports.
  * 
  * Also, the 'getIndividual...Summary' reports are loaded by AJAX, as they can take
  * a significant amount of time to load on setups w/ lots of websites.
  */
 public function index()
 {
     Piwik::checkUserIsSuperUser();
     $view = Piwik_View::factory('index');
     $this->setBasicVariablesView($view);
     $view->menu = Piwik_GetAdminMenu();
     $view->databaseUsageSummary = $this->getDatabaseUsageSummary(true);
     $view->trackerDataSummary = $this->getTrackerDataSummary(true);
     $view->metricDataSummary = $this->getMetricDataSummary(true);
     $view->reportDataSummary = $this->getReportDataSummary(true);
     $view->adminDataSummary = $this->getAdminDataSummary(true);
     list($siteCount, $userCount, $totalSpaceUsed) = Piwik_DBStats_API::getInstance()->getGeneralInformation();
     $view->siteCount = Piwik::getPrettyNumber($siteCount);
     $view->userCount = Piwik::getPrettyNumber($userCount);
     $view->totalSpaceUsed = Piwik::getPrettySizeFromBytes($totalSpaceUsed);
     echo $view->render();
 }