mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
webui: split apart max and min sensor limits, allows sorting (#6592)
This commit is contained in:
committed by
Neil Lathwood
parent
ef3a163db8
commit
9d0b35187e
@@ -95,12 +95,13 @@ foreach (dbFetchRows($sql, $param) as $sensor) {
|
||||
$sensor['sensor_descr'] = substr($sensor['sensor_descr'], 0, 48);
|
||||
|
||||
$response[] = array(
|
||||
'hostname' => generate_device_link($sensor),
|
||||
'sensor_descr' => overlib_link($link, $sensor['sensor_descr'], $overlib_content, null),
|
||||
'graph' => overlib_link($link_graph, $sensor_minigraph, $overlib_content, null),
|
||||
'alert' => $alert,
|
||||
'sensor_current' => $sensor['sensor_current'].$unit,
|
||||
'sensor_range' => round($sensor['sensor_limit_low'], 2).$unit.' - '.round($sensor['sensor_limit'], 2).$unit,
|
||||
'hostname' => generate_device_link($sensor),
|
||||
'sensor_descr' => overlib_link($link, $sensor['sensor_descr'], $overlib_content, null),
|
||||
'graph' => overlib_link($link_graph, $sensor_minigraph, $overlib_content, null),
|
||||
'alert' => $alert,
|
||||
'sensor_current' => $sensor['sensor_current'].$unit,
|
||||
'sensor_limit_low' => is_null($sensor['sensor_limit_low']) ? '-' : round($sensor['sensor_limit_low'], 2).$unit,
|
||||
'sensor_limit' => is_null($sensor['sensor_limit']) ? '-' : round($sensor['sensor_limit'], 2).$unit,
|
||||
);
|
||||
|
||||
if ($_POST['view'] == 'graphs') {
|
||||
|
@@ -7,7 +7,8 @@
|
||||
<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_range" data-sortable="false" data-searchable="false">Range limit</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>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
@@ -24,7 +25,7 @@
|
||||
view: '<?php echo $vars['view']; ?>',
|
||||
graph_type: '<?php echo $graph_type; ?>',
|
||||
unit: '<?php echo $unit; ?>',
|
||||
class: '<?php echo $class; ?>',
|
||||
class: '<?php echo $class; ?>'
|
||||
};
|
||||
},
|
||||
url: "ajax_table.php"
|
||||
|
@@ -7,7 +7,8 @@
|
||||
<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_range" data-sortable="false" data-searchable="false">Range limit</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>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
@@ -24,7 +25,7 @@
|
||||
view: '<?php echo $vars['view']; ?>',
|
||||
graph_type: '<?php echo $graph_type; ?>',
|
||||
unit: '<?php echo $unit; ?>',
|
||||
class: '<?php echo $class; ?>',
|
||||
class: '<?php echo $class; ?>'
|
||||
};
|
||||
},
|
||||
url: "ajax_table.php"
|
||||
|
Reference in New Issue
Block a user