Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cba359f
commit 862f3b6
Showing
7 changed files
with
124 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,130 +1,135 @@ | ||
<?php $widgets = $_['widgets']; ?> | ||
<?php if($widgets) { ?> | ||
<?php foreach ($widgets as $widget) { ?> | ||
<div id="column-<?php p($widget->getType()); ?>-<?php p($widget->getDeviceId()); ?>" class="column"> | ||
<div id="dashboard-widget-<?php p($widget->getType()); ?>-<?php p($widget->getDeviceId()); ?>" | ||
<?php if ($widgets) { ?> | ||
<?php foreach ($widgets as $widget) { ?> | ||
<div id="column-<?php p($widget->getType()); ?>-<?php p($widget->getDeviceId()); ?>" class="column"> | ||
<div id="dashboard-widget-<?php p($widget->getType()); ?>-<?php p($widget->getDeviceId()); ?>" | ||
class="widget dashboard-widget dragbox" | ||
data-id="<?php p($widget->getDeviceId()); ?>" | ||
data-widget-type="<?php p($widget->getType()); ?>"> | ||
<h2 class="widget-header ui-widget-header"> | ||
<h2 class="widget-header ui-widget-header"> | ||
<?php p($widget->getName()); ?> - | ||
<small><?php p($l->t('Widget '.$widget->getDisplayName())); ?></small> | ||
<?php if($widget->getType() === 'chart') { ?> | ||
<a href="#" id="zoom_reset" title="<?php p($l->t('Reset Chart')); ?>" class="reset opIcons"> | ||
<span class="icon icon-reset-white"></span> | ||
</a> | ||
<?php } ?> | ||
<a href="#" class="widget-delete opIcons" title="<?php p($l->t('Delete Widget')); ?>"> | ||
<small><?php p($l->t('Widget ' . $widget->getDisplayName())); ?></small> | ||
<?php if ($widget->getType() === 'chart') { ?> | ||
<a href="#" id="zoom_reset" title="<?php p($l->t('Reset Chart')); ?>" class="reset opIcons"> | ||
<span class="icon icon-reset-white"></span> | ||
</a> | ||
<?php } ?> | ||
<a href="#" class="widget-delete opIcons" title="<?php p($l->t('Delete Widget')); ?>"> | ||
<span class="icon icon-delete-white" | ||
data-id="widget-<?php p($widget->getType()); ?>-<?php p($widget->getDeviceId()); ?>"> | ||
data-id="widget-<?php p($widget->getType()); ?>-<?php p($widget->getDeviceId()); ?>"> | ||
</span> | ||
</a> | ||
</h2> | ||
</a> | ||
</h2> | ||
|
||
<div class="section <?php p($widget->getType()); ?>"> | ||
<div class="section <?php p($widget->getType()); ?>"> | ||
|
||
<?php if($widget->getType() === 'last') { ?> | ||
<?php if($widget->getLog()) { ?> | ||
<?php if(is_array($widget->getLog()->getData()) && !empty($widget->getLog()->getData())) { ?> | ||
<?php foreach ($widget->getLog()->getData() as $dataLog) { ?> | ||
<h3><?php p($dataLog->getValue()); ?> <?php p($dataLog->getShort()); ?></h3> | ||
<small><?php p($dataLog->getDescription()); ?></small> | ||
<?php } ?> | ||
<?php } else { ?> | ||
<h3><?php p($widget->getLog()->getTemperature()); ?>°C</h3> | ||
<h3><?php p($widget->getLog()->getHumidity()); ?>% r.F.</h3> | ||
<?php } ?> | ||
<h3><?php p($widget->getLog()->getCreatedAt()); ?> UTC</h3> | ||
<?php } else { ?> | ||
<div class="center"> | ||
<div class="icon-info"></div> | ||
<span class="center">No data</span> | ||
<p>Read | ||
<a href="https://github.com/alexstocker/sensorlogger/wiki" | ||
title="SensorLogger Wiki" target="_blank">SensorLogger Wiki</a> | ||
</p> | ||
</div> | ||
<?php } ?> | ||
<?php } else if ($widget->getType() === 'list') { ?> | ||
<?php if($widget->getLog()) { ?> | ||
<table style="width: 100%;"> | ||
<?php foreach ($widget->getLog() as $dataLog) { ?> | ||
<tr ><td colspan="3" class="right"><small><?php p($dataLog->getCreatedAt()); ?></small></td></tr> | ||
<?php if ($widget->getType() === 'last') { ?> | ||
<?php if ($widget->getLog()) { ?> | ||
<?php if (is_array($widget->getLog()->getData()) && !empty($widget->getLog()->getData())) { ?> | ||
<?php foreach ($widget->getLog()->getData() as $dataLog) { ?> | ||
<h3><?php p($dataLog->getValue()); ?><?php p($dataLog->getShort()); ?></h3> | ||
<small><?php p($dataLog->getDescription()); ?></small> | ||
<?php } ?> | ||
<?php } else { ?> | ||
<h3><?php p($widget->getLog()->getTemperature()); ?>°C</h3> | ||
<h3><?php p($widget->getLog()->getHumidity()); ?>% r.F.</h3> | ||
<?php } ?> | ||
<h3><?php p($widget->getLog()->getCreatedAt()); ?> UTC</h3> | ||
<?php } else { ?> | ||
<div class="center"> | ||
<div class="icon-info"></div> | ||
<span class="center">No data</span> | ||
<p>Read | ||
<a href="https://github.com/alexstocker/sensorlogger/wiki" | ||
title="SensorLogger Wiki" target="_blank">SensorLogger Wiki</a> | ||
</p> | ||
</div> | ||
<?php } ?> | ||
<?php } else if ($widget->getType() === 'list') { ?> | ||
<?php if ($widget->getLog()) { ?> | ||
<table style="width: 100%;"> | ||
<?php foreach ($widget->getLog() as $dataLog) { ?> | ||
<tr> | ||
<td colspan="3" class="right"> | ||
<small><?php p($dataLog->getCreatedAt()); ?></small></td> | ||
</tr> | ||
|
||
<?php if (empty($dataLog->getData())) { ?> | ||
<?php if (empty($dataLog->getData())) { ?> | ||
|
||
<tr> | ||
<td>Temperature</td> | ||
<td class="right"><?php p($dataLog->getTemperature()); ?></td> | ||
<td class="center">°C</td> | ||
</tr> | ||
<tr> | ||
<td>Humidity</td> | ||
<td class="right"><?php p($dataLog->getHumidity()); ?></td> | ||
<td class="center">% r.F.</td> | ||
</tr> | ||
<tr> | ||
<td>Temperature</td> | ||
<td class="right"><?php p($dataLog->getTemperature()); ?></td> | ||
<td class="center">°C</td> | ||
</tr> | ||
<tr> | ||
<td>Humidity</td> | ||
<td class="right"><?php p($dataLog->getHumidity()); ?></td> | ||
<td class="center">% r.F.</td> | ||
</tr> | ||
|
||
<?php } else { ?> | ||
<?php } else { ?> | ||
|
||
<?php foreach ($dataLog->getData() as $log) { ?> | ||
<tr> | ||
<td><?php p($log->getType()); ?></td> | ||
<td class="right"><?php p($log->getValue()); ?></td> | ||
<td class="center"> <?php p($log->getShort()); ?></td> | ||
</tr> | ||
<?php } ?> | ||
<?php foreach ($dataLog->getData() as $log) { ?> | ||
<tr> | ||
<td><?php p($log->getType()); ?></td> | ||
<td class="right"><?php p($log->getValue()); ?></td> | ||
<td class="center"> <?php p($log->getShort()); ?></td> | ||
</tr> | ||
<?php } ?> | ||
|
||
<?php } ?> | ||
<?php } ?> | ||
|
||
<tr><td colspan="3" >--</td></tr> | ||
<?php } ?> | ||
</table> | ||
<?php } else { ?> | ||
<div class="center"> | ||
<div class="icon-info"></div> | ||
<span class="center">No data</span> | ||
<p>Read | ||
<a href="https://github.com/alexstocker/sensorlogger/wiki" | ||
title="SensorLogger Wiki" target="_blank">SensorLogger Wiki</a> | ||
</p> | ||
</div> | ||
<?php } ?> | ||
<?php ?> | ||
<?php } else if($widget->getType() === 'chart') { ?> | ||
<tr> | ||
<td colspan="3">--</td> | ||
</tr> | ||
<?php } ?> | ||
</table> | ||
<?php } else { ?> | ||
<div class="center"> | ||
<div class="icon-info"></div> | ||
<span class="center">No data</span> | ||
<p>Read | ||
<a href="https://github.com/alexstocker/sensorlogger/wiki" | ||
title="SensorLogger Wiki" target="_blank">SensorLogger Wiki</a> | ||
</p> | ||
</div> | ||
<?php } ?> | ||
<?php ?> | ||
<?php } else if ($widget->getType() === 'chart') { ?> | ||
|
||
<?php //var_dump($widget); ?> | ||
<div class="widget widget-<?php p($widget->getType()); ?>-<?php p($widget->getDeviceId()); ?>"> | ||
<?php //var_dump($widget)//$device = $_['device'] ?> | ||
<div id="widget-plotArea-<?php p($widget->getType()); ?>-<?php p($widget->getDeviceId()); ?>" class="chartcontainer" data-id="<?php p($widget->getDeviceId()); ?>"></div> | ||
</div> | ||
<div> | ||
<?php //var_dump($widget); ?> | ||
<div class="widget widget-<?php p($widget->getType()); ?>-<?php p($widget->getDeviceId()); ?>"> | ||
<?php //var_dump($widget)//$device = $_['device'] ?> | ||
<div id="widget-plotArea-<?php p($widget->getType()); ?>-<?php p($widget->getDeviceId()); ?>" | ||
class="chartcontainer" data-id="<?php p($widget->getDeviceId()); ?>"></div> | ||
</div> | ||
<div> | ||
|
||
</div> | ||
<?php } else if($widget->getType() === 'realTimeChart') { ?> | ||
</div> | ||
<?php } else if ($widget->getType() === 'realTimeChart') { ?> | ||
|
||
<?php //var_dump($widget); ?> | ||
<div class="widget widget-<?php p($widget->getType()); ?>-<?php p($widget->getDeviceId()); ?>"> | ||
<?php //var_dump($widget)//$device = $_['device'] ?> | ||
<div id="widget-realTimePlotArea-<?php p($widget->getType()); ?>-<?php p($widget->getDeviceId()); ?>" class="chartcontainer" data-id="<?php p($widget->getDeviceId()); ?>"></div> | ||
<div id="widget-realTimePlotArea-<?php p($widget->getType()); ?>-<?php p($widget->getDeviceId()); ?>" | ||
class="chartcontainer" data-id="<?php p($widget->getDeviceId()); ?>"></div> | ||
</div> | ||
<div> | ||
|
||
</div> | ||
<?php } else { ?> | ||
<?php print_unescaped($this->inc('widgets/'.$widget->widgetTemplateName(), array('widget' => $widget))); ?> | ||
<?php } ?> | ||
</div> | ||
</div> | ||
</div> | ||
<?php } ?> | ||
</div> | ||
</div> | ||
</div> | ||
<?php } ?> | ||
<?php } else { ?> | ||
<div class="widget dashboard-widget"> | ||
<div class="widget-header"></div> | ||
<div id="emptycontent" class=""> | ||
<div class="icon-info"></div> | ||
<h2>No dashboard widget configured</h2> | ||
<p>Read <a href="https://github.com/alexstocker/sensorlogger/wiki/Users#widgets" | ||
title="SensorLogger Wiki Dashboard Widgets" target="_blank">SensorLogger Wiki Dashboard Widgets</a></p> | ||
</div> | ||
</div> | ||
<div class="widget dashboard-widget"> | ||
<div class="widget-header"></div> | ||
<div id="emptycontent" class=""> | ||
<div class="icon-info"></div> | ||
<h2>No dashboard widget configured</h2> | ||
<p>Read <a href="https://github.com/alexstocker/sensorlogger/wiki/Users#widgets" | ||
title="SensorLogger Wiki Dashboard Widgets" target="_blank">SensorLogger Wiki Dashboard | ||
Widgets</a></p> | ||
</div> | ||
</div> | ||
<?php } ?> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters