コード例 #1
0
ファイル: logchurn.php プロジェクト: gggeek/ggsysinfo
                  if ( count( $data ) == 1 )
                  {
                      $data[$date + $scale] = 0;
                  }*/
                /*$last = end( array_keys( $data ) );
                  $data[$last + $scale] = 0;*/
                $graphname = sysInfoTools::ezpI18ntr('SysInfo', 'messages per ' . $scalenames[$scale]);
                $graph = ezLogsGrapher::graph($data, $graphname, $scale);
                if ($graph != false) {
                    $clusterfile->fileStoreContents($cachefile, $graph);
                    $cachefiles[$logname] = $cachefile;
                } else {
                    $errormsg = ezLogsGrapher::lastError();
                }
            } else {
                eZDebug::writedebug("No valid date labels in log {$logfile}", __METHOD__);
            }
        }
    }
}
if ($Params['viewmode'] == 'json') {
    $response_type = $Params['viewmode'];
    $response_data = $cachefiles;
    return;
}
// *** output ***
$tpl->setVariable('graphsources', $cachefiles);
$tpl->setVariable('errormsg', $errormsg);
$Result = array();
$Result['content'] = $tpl->fetch("design:sysinfo/logchurn.tpl");
//var_dump($cacheFilesList);