diff --git a/database-schema.sql b/database-schema.sql index 6bfb8ae52..f2f94178a 100644 --- a/database-schema.sql +++ b/database-schema.sql @@ -713,7 +713,7 @@ CREATE TABLE IF NOT EXISTS `ports` ( `ifName` varchar(64) DEFAULT NULL, `portName` varchar(128) DEFAULT NULL, `ifIndex` int(11) DEFAULT '0', - `ifSpeed` text, + `ifSpeed` bigint(20) DEFAULT NULL, `ifConnectorPresent` varchar(12) DEFAULT NULL, `ifPromiscuousMode` varchar(12) DEFAULT NULL, `ifHighSpeed` int(11) DEFAULT NULL, diff --git a/database-update.sql b/database-update.sql index b0bf92f1e..89820c344 100644 --- a/database-update.sql +++ b/database-update.sql @@ -7,3 +7,4 @@ ALTER TABLE `devices` CHANGE `port` `port` SMALLINT( 5 ) UNSIGNED NOT NULL DEF CREATE TABLE IF NOT EXISTS `ipsec_tunnels` ( `tunnel_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `peer_port` int(11) NOT NULL, `peer_addr` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `local_addr` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `local_port` int(11) NOT NULL, `tunnel_name` varchar(96) COLLATE utf8_unicode_ci NOT NULL, `tunnel_status` varchar(11) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`tunnel_id`), UNIQUE KEY `unique_index` (`device_id`,`peer_addr`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ALTER TABLE `syslog` ADD INDEX ( `program` ); ALTER TABLE `devices` ADD `sysObjectID` VARCHAR( 64 ) NULL DEFAULT NULL AFTER `bgpLocalAs`; +ALTER TABLE `ports` CHANGE `ifSpeed` `ifSpeed` BIGINT NULL DEFAULT NULL; diff --git a/html/pages/device/latency.inc.php b/html/pages/device/latency.inc.php index d2d93e12c..bc653b40f 100644 --- a/html/pages/device/latency.inc.php +++ b/html/pages/device/latency.inc.php @@ -1,17 +1,19 @@ Latency » "); -$menu_options = array('incoming' => 'Incoming', - 'outgoing' => 'Outgoing'); +if(count($smokeping_files['in'][$device['hostname']])) + $menu_options['incoming'] = 'Incoming'; + +if(count($smokeping_files['out'][$device['hostname']])) + $menu_options['outgoing'] = 'Outgoing'; $sep = ""; foreach ($menu_options as $option => $text) { + if(!$vars['view']) { $vars['view'] = $option; } echo($sep); if ($vars['view'] == $option) { @@ -29,6 +31,7 @@ unset($sep); print_optionbar_end(); + if($vars['view'] == "incoming") { @@ -42,7 +45,7 @@ if($vars['view'] == "incoming") } -} else { +} elseif ($vars['view'] == "outgoing") { if (count($smokeping_files['out'][$device['hostname']])) { @@ -52,6 +55,12 @@ if($vars['view'] == "incoming") include("includes/print-quadgraphs.inc.php"); + + foreach($smokeping_files['out'][$device['hostname']] AS $host) + { + print_r($); + } + } } diff --git a/html/pages/ports.inc.php b/html/pages/ports.inc.php index 86a544cef..62bc7b8fb 100644 --- a/html/pages/ports.inc.php +++ b/html/pages/ports.inc.php @@ -126,14 +126,28 @@ foreach ($ports as $data)