117 lines
3.4 KiB
PHP
Raw Normal View History

<?php
/*
* LibreNMS
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*
* @package LibreNMS
* @subpackage webui
* @link https://www.librenms.org
* @copyright 2017 LibreNMS
* @author LibreNMS Contributors
*/
switch ($class) {
case 'charge':
2020-09-21 15:59:34 +02:00
$pagetitle[] = 'Health :: Charge';
break;
case 'cooling':
2020-09-21 15:59:34 +02:00
$pagetitle[] = 'Health :: Cooling';
break;
case 'current':
2020-09-21 15:59:34 +02:00
$pagetitle[] = 'Health :: Current';
break;
case 'dbm':
2020-09-21 15:59:34 +02:00
$pagetitle[] = 'Health :: dBm';
break;
case 'fanspeed':
2020-09-21 15:59:34 +02:00
$pagetitle[] = 'Health :: Fanspeed';
break;
case 'frequency':
2020-09-21 15:59:34 +02:00
$pagetitle[] = 'Health :: Frequency';
break;
case 'humidity':
2020-09-21 15:59:34 +02:00
$pagetitle[] = 'Health :: Humidity';
break;
case 'load':
2020-09-21 15:59:34 +02:00
$pagetitle[] = 'Health :: Load';
break;
case 'power':
2020-09-21 15:59:34 +02:00
$pagetitle[] = 'Health :: Power';
break;
case 'pressure':
2020-09-21 15:59:34 +02:00
$pagetitle[] = 'Health :: Pressure';
break;
case 'runtime':
2020-09-21 15:59:34 +02:00
$pagetitle[] = 'Health :: Runtime';
break;
case 'signal':
2020-09-21 15:59:34 +02:00
$pagetitle[] = 'Health :: Signal';
break;
case 'snr':
2020-09-21 15:59:34 +02:00
$pagetitle[] = 'Health :: SNR';
break;
case 'state':
2020-09-21 15:59:34 +02:00
$pagetitle[] = 'Health :: State';
break;
2019-01-20 13:37:08 -06:00
case 'count':
2020-09-21 15:59:34 +02:00
$pagetitle[] = 'Health :: Count';
2019-01-20 13:37:08 -06:00
break;
case 'temperature':
2020-09-21 15:59:34 +02:00
$pagetitle[] = 'Health :: Temperature';
break;
case 'voltage':
2020-09-21 15:59:34 +02:00
$pagetitle[] = 'Health :: Voltage';
break;
}
?>
<div class="panel panel-default panel-condensed">
<div class="panel-heading">
<div class="row" style="padding:0px 10px 0px 10px;">
<div class="pull-left">
<?php echo $navbar; ?>
</div>
<div class="pull-right">
<?php echo $displayoptions; ?>
</div>
</div>
</div>
<div class="table-responsive">
<table id="sensors" class="table table-hover table-condensed storage">
<thead>
2015-12-02 01:13:31 +00:00
<tr>
<th data-column-id="hostname">Device</th>
<th data-column-id="sensor_descr">Sensor</th>
<th data-column-id="graph" data-sortable="false" data-searchable="false"></th>
<th data-column-id="alert" data-sortable="false" data-searchable="false"></th>
<th data-column-id="sensor_current">Current</th>
<th data-column-id="sensor_limit_low" data-searchable="false">Low Limit</th>
<th data-column-id="sensor_limit" data-searchable="false">High Limit</th>
2015-12-02 01:13:31 +00:00
</tr>
</thead>
</table>
</div>
2015-12-02 01:13:31 +00:00
</div>
<script>
var grid = $("#sensors").bootgrid({
ajax: true,
rowCount: [50, 100, 250, -1],
post: function () {
2015-12-02 01:13:31 +00:00
return {
id: 'sensors',
view: '<?php echo $vars['view']; ?>',
2015-12-02 01:13:31 +00:00
graph_type: '<?php echo $graph_type; ?>',
unit: '<?php echo $unit; ?>',
class: '<?php echo $class; ?>'
2015-12-02 01:13:31 +00:00
};
},
url: "ajax_table.php"
});
</script>