/** * getChartRenderData * * Function which gets the raw chart data from the module * * @param array @chart settings of the chart * @param array @functionSettings settings of the chart * @param string @module module to look up * */ public function getChartRenderData($logfile) { // find out main function from module args that generates chart data // in this module its getUsageData above //$caller = $chart->function; $logfileStatus = false; $chartData = false; if (!empty($logfile)) { $logfileStatus = true; $chartData = $this->getUsageData($logfile); } //if there is no logfile or error from the caller (stuff is false) //then we just return a empty chart if (!isset($chartData) || $chartData == false) { $chartData['chart'] = LoadUtility::getEmptyChart(); } //echo '<pre>'; var_dump ($chartData); echo '</pre>'; return $chartData; }
/** * getChartRenderData * * Function which gets the raw chart data from the module * * @param array @chart settings of the chart * @param array @functionSettings settings of the chart * @param string @module module to look up * */ public function getChartRenderData($chart, $functionSettings, $module) { // find out main function from module args that generates chart data // in this module its getUsageData above $caller = $chart->function; $logfileStatus = false; $chartData = false; if (!empty($this->logfile)) { $logfileStatus = true; //call modules main function and pass over functionSettings if ($functionSettings) { $chartData = $this->{$caller}($functionSettings); } else { $chartData = $this->{$caller}(); } } //if there is no logfile or error from the caller (stuff is false) //then we just return a empty chart if (!isset($chartData) || $chartData == false || $logfileStatus == false) { $moduleSettings = LoadModules::$_settings->{$module}; $chartData = $this->parseInfo($moduleSettings['info']['line'], null, $module); $chartData['chart'] = LoadUtility::getEmptyChart(); } return $chartData; }