diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-11-10 10:25:30 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-11-10 10:25:30 -0500 |
commit | af9fd483747d1070400f475d79a8d13b9dd5de69 (patch) | |
tree | d86e746e6c6b8e7f4becffbefd7adb6df3b24a75 /src/usr/local/www/status_rrd_graph.php | |
parent | f1551428c4fe708232fc80239ec207640b058a28 (diff) | |
parent | 588a6068e476c2867948735ece7a5e8c886abd5a (diff) | |
download | pfsense-af9fd483747d1070400f475d79a8d13b9dd5de69.zip pfsense-af9fd483747d1070400f475d79a8d13b9dd5de69.tar.gz |
Merge pull request #2036 from heper/patch-1
Diffstat (limited to 'src/usr/local/www/status_rrd_graph.php')
-rw-r--r-- | src/usr/local/www/status_rrd_graph.php | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/usr/local/www/status_rrd_graph.php b/src/usr/local/www/status_rrd_graph.php index cebdc75..ab4de9d 100644 --- a/src/usr/local/www/status_rrd_graph.php +++ b/src/usr/local/www/status_rrd_graph.php @@ -70,7 +70,6 @@ require("shaper.inc"); require_once("rrd.inc"); unset($input_errors); - /* if the rrd graphs are not enabled redirect to settings page */ if (!isset($config['rrd']['enable'])) { header("Location: status_rrd_graph_settings.php"); @@ -170,6 +169,15 @@ if ($_POST['option']) { continue 2; } } + case "dhcpd": + foreach ($databases as $database) { + if (preg_match("/[-]dhcpd\.rrd/i", $database)) { + /* pick off the 1st database we find that matches the dhcpd graph */ + $name = explode("-", $database); + $curoption = "$name[0]"; + continue 2; + } + } case "captiveportal": $curoption = "allgraphs"; break; @@ -270,6 +278,10 @@ foreach ($databases as $database) { if (stristr($database, "ntpd") && isset($config['ntpd']['statsgraph'])) { $ntpd = true; } + if (stristr($database, "-dhcpd") && is_array($config['dhcpd'])) { + $dhcpd = true; + } + } /* append the existing array to the header */ $ui_databases = array_merge($dbheader, $databases); @@ -412,13 +424,14 @@ function get_dates($curperiod, $graph) { } function make_tabs() { - global $curcat; + global $curcat, $queues,$wireless,$cellular,$vpnusers, $captiveportal,$dhcpd; $tab_array = array(); $tab_array[] = array(gettext("System"), ($curcat == "system"), "status_rrd_graph.php?cat=system"); $tab_array[] = array(gettext("Traffic"), ($curcat == "traffic"), "status_rrd_graph.php?cat=traffic"); $tab_array[] = array(gettext("Packets"), ($curcat == "packets"), "status_rrd_graph.php?cat=packets"); $tab_array[] = array(gettext("Quality"), ($curcat == "quality"), "status_rrd_graph.php?cat=quality"); + if($queues) { $tab_array[] = array(gettext("Queues"), ($curcat == "queues"), "status_rrd_graph.php?cat=queues"); @@ -444,6 +457,11 @@ function make_tabs() { if(isset($config['ntpd']['statsgraph'])) { $tab_array[] = array("NTP", ($curcat == "ntpd"), "status_rrd_graph.php?cat=ntpd"); } + + if($dhcpd) { + $tab_array[] = array(gettext("Dhcp Server"), ($curcat == "dhcpd"), "status_rrd_graph.php?cat=dhcpd"); + } + $tab_array[] = array(gettext("Custom"), ($curcat == "custom"), "status_rrd_graph.php?cat=custom"); $tab_array[] = array(gettext("Settings"), ($curcat == "settings"), "status_rrd_graph_settings.php"); |