PHP_SMART_HOME_V3/app/templates/part/deviceDetail.phtml

86 lines
2.2 KiB
PHTML
Raw Permalink Normal View History

2019-08-23 11:39:42 +00:00
<!-- Detail -->
<div class="modal-container modal-container-hiden" id="modal-detail-<?php echo $SUBDEVICEID;?>">
<div class="modal">
<div class="close">
<i class="fa fa-times"></i>
</div>
<h4 class="mb-4"><?php echo $DEVICE['name']; ?></h4>
<h5 class="mb-4"><?php echo $SUBDEVICE['lastRecort']['value'] . $SUBDEVICE['unit']?></h5>
2019-10-11 12:12:05 +00:00
<p><?php $LANGMNG->echo('l_lastSeen'); echo ' ' . $SUBDEVICE['lastRecort']['niceTime']; ?></p>
2019-08-23 11:39:42 +00:00
<div class="">
<canvas id="canvas-<?php echo $SUBDEVICEID;?>"></canvas>
</div>
2019-10-30 14:18:29 +00:00
<input
type="submit"
class="button col-2 graph-period"
data-period="year"
2019-08-23 11:39:42 +00:00
data-group="month"
data-sub-device-id="<?php echo $SUBDEVICEID;?>"
2019-10-11 12:12:05 +00:00
value="<?php $LANGMNG->echo('b_year');?>"
2019-10-30 14:18:29 +00:00
/>
<input
type="submit"
class="button col-2 graph-period"
data-period="month"
2019-08-23 11:39:42 +00:00
data-group="day"
2019-10-30 14:18:29 +00:00
data-sub-device-id="<?php echo $SUBDEVICEID;?>"
2019-10-11 12:12:05 +00:00
value="<?php $LANGMNG->echo('b_month');?>"
2019-10-30 14:18:29 +00:00
/>
<input
type="submit"
class="button col-2 graph-period"
data-period="week"
2019-08-23 11:39:42 +00:00
data-group="day"
data-sub-device-id="<?php echo $SUBDEVICEID;?>"
2019-10-11 12:12:05 +00:00
value="<?php $LANGMNG->echo('b_week');?>"
2019-08-23 11:39:42 +00:00
/>
2019-10-30 14:18:29 +00:00
<input
type="submit"
class="button col-2 graph-period"
data-period="day"
2019-08-23 11:39:42 +00:00
data-group="hour"
data-sub-device-id="<?php echo $SUBDEVICEID;?>"
2019-10-11 12:12:05 +00:00
value="<?php $LANGMNG->echo('b_day');?>"
2019-08-23 11:39:42 +00:00
/>
2019-10-30 14:18:29 +00:00
<input
type="submit"
class="button col-2 graph-period"
data-period="hour"
2019-08-23 11:39:42 +00:00
data-group="minute"
data-sub-device-id="<?php echo $SUBDEVICEID;?>"
2019-10-11 12:12:05 +00:00
value="<?php $LANGMNG->echo('b_hour');?>"
2019-08-23 11:39:42 +00:00
/>
2019-10-30 14:18:29 +00:00
2019-08-23 11:39:42 +00:00
<div>
<table class="table is-fluid">
<thead>
<tr>
2019-10-11 12:12:05 +00:00
<th><?php $LANGMNG->echo('t_time');?></th>
<th><?php $LANGMNG->echo('t_state');?></th>
2019-08-23 11:39:42 +00:00
</tr>
</thead>
<tbody>
<?php foreach ($SUBDEVICE['events'] as $key => $value) { ?>
<tr>
2019-10-30 14:18:29 +00:00
<td><?php echo (new DateTime($value['time']))->format(DATEFORMAT); ?></td>
2020-01-16 13:33:11 +00:00
<td title="test"><?php
echo $value['value'] . $SUBDEVICE['unit'];
if (DEBUGMOD) {
echo ' (' . $SUBDEVICE['eventsRaw'][$key]['value'] . ')';
}
?></td>
2019-08-23 11:39:42 +00:00
<?php //TODO: P5IDAT TOOLTIP PRO RAW VALUE?>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
2019-10-30 14:18:29 +00:00
</div>