示例#1
0
            <tr>
            <th>Service</th><th>Count</th>
            </tr>
        </thead>
        <tbody> 
        <?php 
echo renderTopNTableBody($year_top_service_agg, 10, 'service');
?>
        </tbody>
        </table>
        <?php 
if (count($year_top_waking_service) > 1) {
    ?>
        <p>The top 5 services that woke people up were:
            <?php 
    echo renderTopNPrettyLine($year_top_waking_service);
    ?>
        </p>
        <?php 
}
?>



        <h3>Notification Time Map</h3>
        <p>This illustrates alerts received over the last year, in a heat map fashion. Hovering over the times
           gives you more detail about the number of alerts received. </p>
        <div id="cal-heatmap-year"></div>
        <script type="text/javascript">
        var year_time_data = <?php 
echo json_encode($year_time_counts);
示例#2
0
 public function testrenderTopNPrettyLine()
 {
     $res = renderTopNPrettyLine([1, 4, 3, 2, 5, 9, 7, 8, 6]);
     $expected = '<strong>0</strong> (9 times), <strong>1</strong> (8 times), <strong>2</strong> (7 times), <strong>3</strong> (6 times)';
     $this->assertEquals($expected, $res);
 }