mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* init * Add adjacency polling support * Format messages * Fix prints * Apply fixes from StyleCI * Fix schema * Schema fix * Alert rule example * Remove display format * Change option order * Add test data * Add test data * Test data * Review fixes * Remove duplicate MIB-file * Add cleanup * Fix * Print fix * Remove extra cleanup * Revert "Remove duplicate MIB-file" This reverts commit 4b3cf8127c2473e9919a56a051d4044e2e0f31aa. * Remove unneeded MIB-files * Add check for empty array * Apply fixes from StyleCI * Review fixes * StyleCI * StyleCI * Apply fixes from StyleCI * typo * Update function calls on pages * Linting fixes * Apply fixes from StyleCI * Discovery module * Add discovery module * Apply fixes from StyleCI * Update example alert rule Co-authored-by: ottorei <ottorei@users.noreply.github.com> Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
71 lines
1.6 KiB
PHP
71 lines
1.6 KiB
PHP
<?php
|
|
|
|
$pagetitle[] = 'Routing';
|
|
|
|
if ($_GET['optb'] == 'graphs' || $_GET['optc'] == 'graphs') {
|
|
$graphs = 'graphs';
|
|
} else {
|
|
$graphs = 'nographs';
|
|
}
|
|
|
|
$user = Auth::user();
|
|
$routing_count = \LibreNMS\Util\ObjectCache::routing();
|
|
// $datas[] = 'overview';
|
|
// $routing_count is populated by print-menubar.inc.php
|
|
// $type_text['overview'] = "Overview";
|
|
$type_text['bgp'] = 'BGP';
|
|
$type_text['cef'] = 'CEF';
|
|
$type_text['mpls'] = 'MPLS';
|
|
$type_text['ospf'] = 'OSPF';
|
|
$type_text['isis'] = 'ISIS';
|
|
$type_text['vrf'] = 'VRFs';
|
|
$type_text['cisco-otv'] = 'OTV';
|
|
|
|
print_optionbar_start();
|
|
|
|
// if (!$vars['protocol']) { $vars['protocol'] = "overview"; }
|
|
echo "<span style='font-weight: bold;'>Routing</span> » ";
|
|
|
|
$vars['protocol'] = basename($vars['protocol']);
|
|
$sep = '';
|
|
foreach ($routing_count as $type => $value) {
|
|
if (! $vars['protocol']) {
|
|
$vars['protocol'] = $type;
|
|
}
|
|
|
|
echo $sep;
|
|
unset($sep);
|
|
|
|
if ($vars['protocol'] == $type) {
|
|
echo '<span class="pagemenu-selected">';
|
|
}
|
|
|
|
if ($routing_count[$type]) {
|
|
echo generate_link($type_text[$type] . ' (' . $routing_count[$type] . ')', ['page' => 'routing', 'protocol' => $type]);
|
|
$sep = ' | ';
|
|
}
|
|
|
|
if ($vars['protocol'] == $type) {
|
|
echo '</span>';
|
|
}
|
|
}//end foreach
|
|
|
|
print_optionbar_end();
|
|
|
|
switch ($vars['protocol']) {
|
|
case 'overview':
|
|
case 'bgp':
|
|
case 'vrf':
|
|
case 'cef':
|
|
case 'mpls':
|
|
case 'ospf':
|
|
case 'isis':
|
|
case 'cisco-otv':
|
|
include 'includes/html/pages/routing/' . $vars['protocol'] . '.inc.php';
|
|
break;
|
|
|
|
default:
|
|
echo report_this('Unknown protocol ' . $vars['protocol']);
|
|
break;
|
|
}
|