2016-01-21 22:04:20 +10:00
|
|
|
<?php
|
|
|
|
|
2016-08-21 08:07:14 -05:00
|
|
|
$component = new LibreNMS\Component();
|
2016-01-21 22:04:20 +10:00
|
|
|
$options = array();
|
|
|
|
$options['filter']['ignore'] = array('=',0);
|
|
|
|
$options['type'] = 'Cisco-OTV';
|
2016-08-18 20:28:22 -05:00
|
|
|
$components = $component->getComponents($device['device_id'], $options);
|
2016-01-28 07:04:12 +10:00
|
|
|
$components = $components[$device['device_id']];
|
2016-01-21 22:04:20 +10:00
|
|
|
|
|
|
|
global $config;
|
|
|
|
?>
|
|
|
|
<div class="panel panel-default" id="overlays">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">Overlay's & Adjacencies</h3>
|
|
|
|
</div>
|
|
|
|
<div class="panel list-group">
|
|
|
|
<?php
|
|
|
|
// Loop over each component, pulling out the Overlays.
|
2016-01-28 07:04:12 +10:00
|
|
|
foreach ($components as $oid => $overlay) {
|
|
|
|
if ($overlay['otvtype'] == 'overlay') {
|
2016-03-10 17:30:32 +10:00
|
|
|
if ($overlay['status'] == 0) {
|
2016-01-28 07:04:12 +10:00
|
|
|
$overlay_status = "<span class='green pull-right'>Normal</span>";
|
|
|
|
$gli = "";
|
2016-08-18 20:28:22 -05:00
|
|
|
} else {
|
2016-01-28 07:04:12 +10:00
|
|
|
$overlay_status = "<span class='pull-right'>".$overlay['error']." - <span class='red'>Alert</span></span>";
|
|
|
|
$gli = "list-group-item-danger";
|
2016-01-21 22:04:20 +10:00
|
|
|
}
|
|
|
|
?>
|
2016-05-02 18:43:06 +00:00
|
|
|
<a class="list-group-item <?php echo $gli?>" data-toggle="collapse" data-target="#<?php echo $overlay['index']?>" data-parent="#overlays"><?php echo $overlay['label']?> - <?php echo $overlay['transport']?> <?php echo $overlay_status?></a>
|
|
|
|
<div id="<?php echo $overlay['index']?>" class="sublinks collapse">
|
2016-01-21 22:04:20 +10:00
|
|
|
<?php
|
2016-08-18 20:28:22 -05:00
|
|
|
foreach ($components as $aid => $adjacency) {
|
|
|
|
if (($adjacency['otvtype'] == 'adjacency') && ($adjacency['index'] == $overlay['index'])) {
|
|
|
|
if ($adjacency['status'] == 0) {
|
|
|
|
$adj_status = "<span class='green pull-right'>Normal</span>";
|
|
|
|
$gli = "";
|
|
|
|
} else {
|
|
|
|
$adj_status = "<span class='pull-right'>".$adjacency['error']." - <span class='red'>Alert</span></span>";
|
|
|
|
$gli = "list-group-item-danger";
|
|
|
|
}
|
2016-01-21 22:04:20 +10:00
|
|
|
?>
|
2016-08-18 20:28:22 -05:00
|
|
|
<a class="list-group-item <?php echo $gli?> small"><span class="glyphicon glyphicon-chevron-right"></span> <?php echo $adjacency['label']?> - <?php echo $adjacency['endpoint']?> <?php echo $adj_status?></a>
|
2016-01-21 22:04:20 +10:00
|
|
|
<?php
|
2016-08-18 20:28:22 -05:00
|
|
|
}
|
|
|
|
}
|
2016-01-21 22:04:20 +10:00
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel panel-default" id="vlanperoverlay">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">AED Enabled VLAN's</h3>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$graph_array = array();
|
|
|
|
$graph_array['device'] = $device['device_id'];
|
|
|
|
$graph_array['height'] = '100';
|
|
|
|
$graph_array['width'] = '215';
|
|
|
|
$graph_array['to'] = $config['time']['now'];
|
|
|
|
$graph_array['type'] = 'device_cisco-otv-vlan';
|
|
|
|
require 'includes/print-graphrow.inc.php';
|
|
|
|
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel panel-default" id="macperendpoint">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">MAC Addresses</h3>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$graph_array = array();
|
|
|
|
$graph_array['device'] = $device['device_id'];
|
|
|
|
$graph_array['height'] = '100';
|
|
|
|
$graph_array['width'] = '215';
|
|
|
|
$graph_array['to'] = $config['time']['now'];
|
|
|
|
$graph_array['type'] = 'device_cisco-otv-mac';
|
|
|
|
require 'includes/print-graphrow.inc.php';
|
|
|
|
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|