Beispiel #1
0
	.smallbox > .alert {font: arial 13px bold;  color: white; background-color: red; padding: 3px;}
	.graph_data { width: 110px; float: left; font-size: 10; margin-top: 100px; text-align: right;}
</style>
</head>
<body>
<h1>Dashboard</h1>
<p>The dashboard shows all of the events your a logging, plotted over time</p>
<p>Users can generate their own custom stats in the 'stats' folder. See this
    <a href="<?= BASE_URL?>public/custom-page.php">Example Page</a></p></p>
<?php 

$stats = SonarStatManager::getStatList();

foreach($stats as $stat):
	$graph = new SonarStat($stat['event']); 
    $hourlyValues = $graph->getStatValues('hourly', 12);
	$weight = $graph->getWeight();
?>

	<div class="smallbox">
        <div style="float: left">
	    <?= $graph->renderGraph('daily', 60, 'medium') ?>
	    </div>

        <div class="graph_data">
    	<p><strong>Past 12 hours: </strong><br />
        	<? foreach($hourlyValues as $date=>$value): ?>
        		<br /><?= date('g a', strtotime($date)) ?>:  <strong><?= $value ?></strong>
        	<? endforeach; ?></p>
            
            <br />