mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
957ecc2441
* Better handling of errors Mapquest seems to return the center of the US on error....... * Editable locations WIP * Change to bootgrid ajax table WIP * Graphs working, using handlebars update js libs add current location button * remove sql query, change icon * Add the map to the device view, only when gps is expanded. Allow edit on device page, share js code * fix chevron rotation, improve click area * extra warning * fix overview layout (remove containers) * fix style * fix html divs, change collapse ui a bit move css, update css/js versions * start zoomed out on new locations * don't double load scripts, zoom to 17 * fix php-md errors, remove unused use statement * improve non-admin experience * Move locations page to Laravel More functions in Url and Html util classes reduce code duplication * translation buttons too * fix whitespace * move formatters to the frontend * small changes * disable traffic for locations with no devices * change down 0 to green from gray * missing " * Fix paginate all * working fix for paginate all * allow sort by counts * fix down sort * a little safety * Don't call the function twice * btn-xs
48 lines
1.4 KiB
PHP
48 lines
1.4 KiB
PHP
<?php
|
|
|
|
$component = new LibreNMS\Component();
|
|
$components = $component->getComponents($device['device_id'], array('type'=>'Cisco-CIMC'));
|
|
|
|
// We only care about our device id.
|
|
$components = $components[$device['device_id']];
|
|
|
|
if (count($components) > 0) {
|
|
?>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="panel panel-default panel-condensed">
|
|
<div class="panel-heading">
|
|
<i class="fa fa-cogs fa-lg icon-theme" aria-hidden="true"></i> <strong>Hardware Components</strong>
|
|
</div>
|
|
<table class="table table-hover table-condensed table-striped">
|
|
<?php
|
|
foreach ($components as $component => $array) {
|
|
if ($array['status'] == 2) {
|
|
$class = "danger";
|
|
$message = "Alert";
|
|
} else {
|
|
$class = "";
|
|
$message = "Ok";
|
|
}
|
|
?>
|
|
<tr class="<?php echo $class ?>">
|
|
<td><?php echo $array['string']?></td>
|
|
</tr>
|
|
<?php
|
|
// Display an additional row to show the error
|
|
if ($array['status'] == 2) {
|
|
?>
|
|
<tr class="<?php echo $class ?>">
|
|
<td>Error: <?php echo nl2br($array['error'])?></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
}
|
|
?>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
}
|