diff --git a/html/.htaccess b/html/.htaccess index 84cf5163c7..3dabb89df7 100644 --- a/html/.htaccess +++ b/html/.htaccess @@ -1,19 +1,6 @@ Options FollowSymlinks Multiviews -RewriteBase / RewriteEngine on -RewriteCond %{REQUEST_URI} !^(.*)\.php$ -RewriteCond %{REQUEST_URI} !^(.*)\.css$ -RewriteCond %{REQUEST_URI} !^(.*)\.jpg$ -RewriteCond %{REQUEST_URI} !^(.*)\.gif$ -RewriteCond %{REQUEST_URI} !^(.*)\.png$ - -RewriteRule ^([a-z|0-9]+)/(.+)/(.+)/(.+)/(.+)/(.+)/(.+)/(.+)/(.+)/$ ?page=$1&opta=$2&optb=$3&optc=$4&optd=$5&opte=$6&optf=$7&optg=$8&opth=$9 -RewriteRule ^([a-z|0-9]+)/(.+)/(.+)/(.+)/(.+)/(.+)/(.+)/(.+)/$ ?page=$1&opta=$2&optb=$3&optc=$4&optd=$5&opte=$6&optf=$7&optg=$8 -RewriteRule ^([a-z|0-9]+)/(.+)/(.+)/(.+)/(.+)/(.+)/(.+)/$ ?page=$1&opta=$2&optb=$3&optc=$4&optd=$5&opte=$6&optf=$7 -RewriteRule ^([a-z|0-9]+)/(.+)/(.+)/(.+)/(.+)/(.+)/$ ?page=$1&opta=$2&optb=$3&optc=$4&optd=$5&opte=$6 -RewriteRule ^([a-z|0-9]+)/(.+)/(.+)/(.+)/(.+)/$ ?page=$1&opta=$2&optb=$3&optc=$4&optd=$5 -RewriteRule ^([a-z|0-9]+)/(.+)/(.+)/(.+)/$ ?page=$1&opta=$2&optb=$3&optc=$4 -RewriteRule ^([a-z|0-9]+)/(.+)/(.+)/$ ?page=$1&opta=$2&optb=$3 -RewriteRule ^([a-z|0-9]+)/(.+)/$ ?page=$1&opta=$2 -RewriteRule ^([a-z|0-9]+)/$ ?page=$1 +RewriteBase / +RewriteCond %{REQUEST_URI} !\.(js|ico|txt|gif|jpg|png|css|php) +RewriteRule ^(.*)$ index.php/$1/ diff --git a/html/css/styles.css b/html/css/styles.css index 74a2165610..947f9a9de2 100644 --- a/html/css/styles.css +++ b/html/css/styles.css @@ -1195,3 +1195,16 @@ a.interface-upup:hover, a.interface-updown:hover, a.interface-admindown:hover { background-position: center left !important; text-decoration: none; } + + +/* Tooltip */ + +.bubbleInfo { + position: relative; +} + +.popup { + position: absolute; + display: none; /* keeps the popup hidden if no JS available */ +} + diff --git a/html/includes/functions.inc.php b/html/includes/functions.inc.php index c0c88c01ce..7bc606e8e1 100644 --- a/html/includes/functions.inc.php +++ b/html/includes/functions.inc.php @@ -1,5 +1,26 @@ $value) + { + if($value != "") + { + $url .= $var ."=".$value."/"; + } + } + + return($url); + +} + + function get_percentage_colours($percentage) { @@ -314,7 +335,7 @@ function generate_port_thumbnail($args) echo(generate_port_link($args, $args['content'])); } -function print_optionbar_start ($height = 20, $width = 0, $marginbottom = 5) +function print_optionbar_start ($height = 0, $width = 0, $marginbottom = 5) { echo("
diff --git a/html/includes/graphs/application/apache_scoreboard.inc.php b/html/includes/graphs/application/apache_scoreboard.inc.php index 2b9efbe11a..7d9d516503 100755 --- a/html/includes/graphs/application/apache_scoreboard.inc.php +++ b/html/includes/graphs/application/apache_scoreboard.inc.php @@ -21,7 +21,7 @@ $rrd_options .= 'DEF:g='.$rrd_filename.':sb_closing:AVERAGE '; $rrd_options .= 'DEF:h='.$rrd_filename.':sb_logging:AVERAGE '; $rrd_options .= 'DEF:i='.$rrd_filename.':sb_graceful:AVERAGE '; $rrd_options .= 'DEF:j='.$rrd_filename.':sb_idle:AVERAGE '; -$rrd_options .= 'COMMENT:"Scoreboard Current Average Maximum" '; +$rrd_options .= 'COMMENT:"Scoreboard Current Average Maximum\n" '; $rrd_options .= 'AREA:a#4444FFFF:"Waiting " '; $rrd_options .= 'GPRINT:a:LAST:"%6.2lf %s" '; $rrd_options .= 'GPRINT:a:AVERAGE:"%6.2lf %s" '; diff --git a/html/includes/graphs/common.inc.php b/html/includes/graphs/common.inc.php index b970567cf1..fd60e10b88 100644 --- a/html/includes/graphs/common.inc.php +++ b/html/includes/graphs/common.inc.php @@ -7,6 +7,10 @@ if ($_GET['height']) { $height = mres($_GET['height']); } if ($_GET['inverse']) { $in = 'out'; $out = 'in'; } else { $in = 'in'; $out = 'out'; } if ($_GET['legend'] == "no") { $rrd_options = " -g"; } +if ($_GET['title'] == "yes") { $rrd_options .= " --title='".$graph_title."' "; } +if (isset($_GET['graph_title'])) { $rrd_options .= " --title='".$_GET['graph_title']."' "; } + + if (!$scale_min && !$scale_max) { $rrd_options .= " --alt-autoscale-max"; } if (isset($scale_min)) { $rrd_options .= " -l $scale_min"; } @@ -26,4 +30,4 @@ else { $rrd_options .= " --font LEGEND:8:" . $config['mono_font' $rrd_options .= " --font-render-mode normal"; -?> \ No newline at end of file +?> diff --git a/html/includes/graphs/device/auth.inc.php b/html/includes/graphs/device/auth.inc.php index f176c97bf5..6ed30d2e55 100644 --- a/html/includes/graphs/device/auth.inc.php +++ b/html/includes/graphs/device/auth.inc.php @@ -4,6 +4,7 @@ if (is_numeric($id) && ($config['allow_unauth_graphs'] || device_permitted($id)) { $device = device_by_id_cache($id); $title = generate_device_link($device); + $graph_title = $device['hostname']; $auth = TRUE; } diff --git a/html/includes/graphs/device/bits.inc.php b/html/includes/graphs/device/bits.inc.php index 978e39f249..65398a1846 100644 --- a/html/includes/graphs/device/bits.inc.php +++ b/html/includes/graphs/device/bits.inc.php @@ -39,6 +39,8 @@ foreach (dbFetchRows("SELECT * FROM `ports` WHERE `device_id` = ?", array($id)) $rra_in = "INOCTETS"; $rra_out = "OUTOCTETS"; +$graph_title .= "::bits"; + $colour_line_in = "006600"; $colour_line_out = "000099"; $colour_area_in = "CDEB8B"; diff --git a/html/includes/graphs/port/auth.inc.php b/html/includes/graphs/port/auth.inc.php index 0a5ecdd305..a8b35d0035 100644 --- a/html/includes/graphs/port/auth.inc.php +++ b/html/includes/graphs/port/auth.inc.php @@ -6,9 +6,12 @@ if (is_numeric($id) && ($config['allow_unauth_graphs'] || port_permitted($id))) $device = device_by_id_cache($port['device_id']); $title = generate_device_link($device); $title .= " :: Port ".generate_port_link($port); + + $graph_title = $device['hostname'] . "::" . $port['ifDescr']; + $auth = TRUE; $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd"); } -?> \ No newline at end of file +?> diff --git a/html/includes/hostbox-basic.inc.php b/html/includes/hostbox-basic.inc.php new file mode 100644 index 0000000000..7ffa0137d7 --- /dev/null +++ b/html/includes/hostbox-basic.inc.php @@ -0,0 +1,44 @@ + + ' . generate_device_link($device) . '' + ); + +echo(' ' . $device['hardware'] . ' ' . $device['features'] . ''); +echo(' ' . $device['os_text'] . ' ' . $device['version'] . ''); +echo(' ' . formatUptime($device['uptime'], 'short') . '
'); + +if (get_dev_attrib($device,'override_sysLocation_bool')) { $device['location'] = get_dev_attrib($device,'override_sysLocation_string'); } +echo(' ' . truncate($device['location'],32, '') . ''); + +echo (' '); + +?> diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php index ed625d5210..22fe142d3f 100644 --- a/html/includes/print-menubar.php +++ b/html/includes/print-menubar.php @@ -217,7 +217,7 @@ if ($config['show_locations']) ' . $location . ' '); + echo('
  • ' . $location . '
  • '); } ?> diff --git a/html/index.php b/html/index.php index f16365eefb..5889a01e91 100755 --- a/html/index.php +++ b/html/index.php @@ -1,5 +1,9 @@ $get_var) { + if(strstr($key, "opt")) { + list($name, $value) = explode("|", $get_var); + if(!isset($value)) { $value = "yes"; } + $vars[$name] = $value; + } +} + +$segments = explode('/', trim($_SERVER['REQUEST_URI'], '/')); +foreach($segments as $pos => $segment) { + $segment = urldecode($segment); + if($pos == "0") + { + $vars['page'] = $segment; + } else { + if(TRUE) // do this to keep everything working whilst we fiddle + { + if ($pos == "1") + { + $_GET['opta'] = $segment; + } + if ($pos == "2") + { + $_GET['optb'] = $segment; + } + if ($pos == "3") + { + $_GET['optc'] = $segment; + } + if ($pos == "4") + { + $_GET['optd'] = $segment; + } + if ($pos == "5") + { + $_GET['opte'] = $segment; + } + if ($pos == "6") + { + $_GET['optf'] = $segment; + } + } + list($name, $value) = explode("=", $segment); + if($value == "" || !isset($value)) + { + $vars[$name] = yes; + } else { + $vars[$name] = $value; + } + } +} + +foreach($_POST as $name => $value) +{ +# if($value == "" || !isset($value)) +# { +# } else { + $vars[$name] = $value; +# } +} + +#print_r($vars); + if(strstr($_SERVER['REQUEST_URI'], 'widescreen=yes')) { $_SESSION['widescreen'] = 1; } if(strstr($_SERVER['REQUEST_URI'], 'widescreen=no')) { unset($_SESSION['widescreen']); } @@ -92,6 +159,68 @@ if ($config['page_refresh']) { echo(" + +