Commit version 24.12.13800

This commit is contained in:
2025-01-06 17:35:06 -05:00
parent b7f6a79c2c
commit 55d9218816
6133 changed files with 4239740 additions and 1374287 deletions

View File

@ -4,58 +4,63 @@
* Observium Network Management and Monitoring System
* Copyright (C) 2006-2015, Adam Armstrong - http://www.observium.org
*
* @package observium
* @subpackage webui
* @author Adam Armstrong <adama@observium.org>
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
* @package observium
* @subpackage webui
* @author Adam Armstrong <adama@observium.org>
* @copyright (C) Adam Armstrong
*
*/
register_html_title("Routing");
if ($_GET['optb'] == "graphs" || $_GET['optc'] == "graphs") { $graphs = "graphs"; } else { $graphs = "nographs"; }
if ($_GET['optb'] == "graphs" || $_GET['optc'] == "graphs") {
$graphs = "graphs";
} else {
$graphs = "nographs";
}
// $routing is populated by cache-data.inc.php
$navbar['brand'] = "Routing";
$navbar['class'] = "navbar-narrow";
foreach ($cache['routing'] as $type => $value)
{
if ($value['count'] > 0)
{
if (!$vars['protocol']) { $vars['protocol'] = $type; }
if ($vars['protocol'] == $type) { $navbar['options'][$type]['class'] = "active"; }
foreach ($cache['routing'] as $type => $value) {
if ($value['count'] > 0) {
if (!$vars['protocol']) {
$vars['protocol'] = $type;
}
if ($vars['protocol'] == $type) {
$navbar['options'][$type]['class'] = "active";
}
$navbar['options'][$type]['url'] = generate_url(array('page' => 'routing', 'protocol' => $type));
$navbar['options'][$type]['text'] = nicecase($type).' ('.$value['count'].')';
}
$navbar['options'][$type]['url'] = generate_url(['page' => 'routing', 'protocol' => $type]);
$navbar['options'][$type]['text'] = nicecase($type) . ' (' . $value['count'] . ')';
}
}
if(isset($vars['protocol']) && $vars['protocol'] == "ospf") {
if (isset($vars['protocol']) && $vars['protocol'] == "ospf") {
$navbar['options_right']['show_disabled']['text'] = 'Show Disabled';
if(isset($vars['show_disabled']) && ($vars['show_disabled'])) {
$navbar['options_right']['show_disabled']['url'] = generate_url($vars, ['show_disabled' => NULL]);
} else {
$navbar['options_right']['show_disabled']['url'] = generate_url($vars, ['show_disabled' => 1]);
}
if (isset($vars['show_disabled']) && ($vars['show_disabled'])) {
$navbar['options_right']['show_disabled']['url'] = generate_url($vars, ['show_disabled' => NULL]);
} else {
$navbar['options_right']['show_disabled']['url'] = generate_url($vars, ['show_disabled' => 1]);
}
}
print_navbar($navbar);
unset($navbar);
switch ($vars['protocol'])
{
case 'bgp':
case 'vrf':
case 'cef':
case 'eigrp':
case 'ospf':
include($config['html_dir'].'/pages/routing/'.$vars['protocol'].'.inc.php');
break;
default:
bug();
break;
switch ($vars['protocol']) {
case 'bgp':
case 'vrf':
case 'cef':
case 'eigrp':
case 'ospf':
include($config['html_dir'] . '/pages/routing/' . $vars['protocol'] . '.inc.php');
break;
default:
bug();
break;
}
// EOF