2019-12-19 01:17:21 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$row = 1;
|
|
|
|
|
2020-09-21 15:40:17 +02:00
|
|
|
foreach (dbFetchRows('SELECT * FROM `customoids` WHERE `device_id` = ? ORDER BY `customoid_descr`', [$device['device_id']]) as $customoid) {
|
|
|
|
if (! is_integer($row / 2)) {
|
2020-09-21 15:59:34 +02:00
|
|
|
$row_colour = Config::get('list_colour.even');
|
2019-12-19 01:17:21 +01:00
|
|
|
} else {
|
2020-09-21 15:59:34 +02:00
|
|
|
$row_colour = Config::get('list_colour.odd');
|
2019-12-19 01:17:21 +01:00
|
|
|
}
|
2020-09-21 15:40:17 +02:00
|
|
|
$customoid_descr = $customoid['customoid_descr'];
|
|
|
|
$customoid_unit = $customoid['customoid_unit'];
|
|
|
|
$customoid_current = format_si($customoid['customoid_current']) . $customoid_unit;
|
|
|
|
$customoid_limit = format_si($customoid['customoid_limit']) . $customoid_unit;
|
|
|
|
$customoid_limit_low = format_si($customoid['$customoid_limit_low']) . $customoid_unit;
|
2019-12-19 01:17:21 +01:00
|
|
|
echo "<div class='panel panel-default'>
|
|
|
|
<div class='panel-heading'>
|
|
|
|
<h3 class='panel-title'>$customoid_descr <div class='pull-right'>$customoid_current | $customoid_limit_low <> $customoid_limit</div></h3>
|
|
|
|
</div>";
|
|
|
|
echo "<div class='panel-body'>";
|
|
|
|
|
2020-09-21 15:40:17 +02:00
|
|
|
$graph_array['id'] = $customoid['customoid_id'];
|
2019-12-19 01:17:21 +01:00
|
|
|
$graph_array['title'] = $customoid['customoid_descr'];
|
2020-09-21 15:40:17 +02:00
|
|
|
$graph_array['type'] = 'customoid';
|
2019-12-19 01:17:21 +01:00
|
|
|
|
|
|
|
include 'includes/html/print-graphrow.inc.php';
|
|
|
|
|
|
|
|
echo '</div></div>';
|
|
|
|
|
|
|
|
$row++;
|
|
|
|
}
|