From 694870530ce003cc7ed5dd102cf7c0e2f4681dd2 Mon Sep 17 00:00:00 2001 From: Seth Mos Date: Sat, 21 Jul 2007 21:47:37 +0000 Subject: Add rrd graph settings page. Bump config out of line with 1.2 Add rrd config upgrade code. --- usr/local/www/status_rrd_graph_settings.php | 165 ++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100755 usr/local/www/status_rrd_graph_settings.php (limited to 'usr/local/www/status_rrd_graph_settings.php') diff --git a/usr/local/www/status_rrd_graph_settings.php b/usr/local/www/status_rrd_graph_settings.php new file mode 100755 index 0000000..6a386ad --- /dev/null +++ b/usr/local/www/status_rrd_graph_settings.php @@ -0,0 +1,165 @@ + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +require("guiconfig.inc"); + +$pconfig['enable'] = isset($config['rrd']['enable']); +$pconfig['category'] = isset($config['rrd']['category']); +$pconfig['style'] = isset($config['rrd']['style']); + +$curcat = "settings"; +$categories = array('system' => 'System', + 'traffic' => 'Traffic', + 'packets' => 'Packets', + 'quality' => 'Quality', + 'queues' => 'Queues'); +$styles = array('inverse' => 'Inverse', + 'absolute' => 'Absolute'); + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + /* none */ + + if (!$input_errors) { + $config['rrd']['enable'] = $_POST['enable'] ? true : false; + $config['rrd']['category'] = $_POST['category']; + $config['rrd']['style'] = $_POST['style']; + write_config(); + + $retval = 0; + config_lock(); + $retval = enable_rrd_graphing(); + config_unlock(); + + $savemsg = get_std_save_message($retval); + } +} + +$pgtitle = gettext("Status: RRD Graphs"); +include("head.inc"); + +?> + + + + +

+ + +
+ + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
RRD Graphs + onClick="enable_change(false)"> + +
Default category + + +
Default style + + +
  + +
 Note:
+ +
+
+
+ +
+ + + -- cgit v1.1