Merge branch 'maint/7.0'
[ninja.git] / application / widgets / netw_health / view.php
blobdef6617c97c41b2f8b4bce8927b99c46f6f5b5c7
1 <?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
2 <table summary="Network health" class="health" style="table-layout:fixed;">
3 <tr>
4 <?php foreach( $bars as $bar ):
5 if ($bar['value'] < $this->health_critical_percentage) {
6 $image = $this->widget_full_path.$this->crit_img;
7 } else if ($bar['value'] < $this->health_warning_percentage) {
8 $image = $this->widget_full_path.$this->warn_img;
9 } else {
10 $image = $this->widget_full_path.$this->ok_img;
13 <td style="text-align: center;">
14 <div style="<?php echo ($bar['value'] > 33) ? 'color: #ffffff;' : ''?>font-size: 140%; position: absolute; padding-top: 62px; padding-left: 10px;"><?php echo round($bar['value'],$visible_precision) ?> %</div>
15 <div style="<?php echo ($bar['value'] > 12) ? 'color: #ffffff;' : ''?>font-size: 90%; position: absolute; padding-top: 84px; padding-left: 10px;"><?php echo $bar['label'] ?></div>
16 <div class="border">
17 <?php echo html::image($image, array('style' => 'height:'.round($bar['value']).'px; width: 100%; padding-top: '.(100-round($bar['value'])).'px', 'alt' => $bar['label'])) ?>
18 </div>
19 </td>
20 <?php endforeach; ?>
21 </tr>
22 </table>