Merge branch 'master' into config_diff

This commit is contained in:
Tony Murray
2016-02-12 10:36:18 -06:00
23 changed files with 1160 additions and 314 deletions

View File

@@ -20,6 +20,7 @@ $type_text['bgp'] = 'BGP';
$type_text['cef'] = 'CEF';
$type_text['ospf'] = 'OSPF';
$type_text['vrf'] = 'VRFs';
$type_text['cisco-otv'] = 'OTV';
print_optionbar_start();

View File

@@ -0,0 +1,94 @@
<?php
require_once "../includes/component.php";
$component = new component();
$options = array();
$options['filter']['ignore'] = array('=',0);
$options['type'] = 'Cisco-OTV';
$components = $component->getComponents($device['device_id'],$options);
$components = $components[$device['device_id']];
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.
foreach ($components as $oid => $overlay) {
if ($overlay['otvtype'] == 'overlay') {
if ($overlay['status'] == 1) {
$overlay_status = "<span class='green pull-right'>Normal</span>";
$gli = "";
}
else {
$overlay_status = "<span class='pull-right'>".$overlay['error']." - <span class='red'>Alert</span></span>";
$gli = "list-group-item-danger";
}
?>
<a class="list-group-item <?=$gli?>" data-toggle="collapse" data-target="#<?=$overlay['index']?>" data-parent="#overlays"><?=$overlay['label']?> - <?=$overlay['transport']?> <?=$overlay_status?></a>
<div id="<?=$overlay['index']?>" class="sublinks collapse">
<?php
foreach ($components as $aid => $adjacency) {
if (($adjacency['otvtype'] == 'adjacency') && ($adjacency['index'] == $overlay['index'])) {
if ($adjacency['status'] == 1) {
$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";
}
?>
<a class="list-group-item <?=$gli?> small"><span class="glyphicon glyphicon-chevron-right"></span> <?=$adjacency['label']?> - <?=$adjacency['endpoint']?> <?=$adj_status?></a>
<?php
}
}
?>
</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>

View File

@@ -241,7 +241,10 @@ if (is_admin()) {
// $geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS);
$geshi->set_overall_style('color: black;');
// $geshi->set_line_style('color: #999999');
echo '<div class="config">';
echo '<input id="linenumbers" class="btn btn-primary" type="submit" value="Hide line numbers"/>';
echo $geshi->parse_code();
echo '</div>';
}
}//end if