summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_rrd_graph_settings.php
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-12-31 03:13:45 -0700
committerErik Fonnesbeck <efonnes@gmail.com>2010-12-31 03:18:41 -0700
commit97acf64675592e2e623eb22b3d1adcc63c109b2a (patch)
treefcde6dde6122d3450bbdad9080c08bb092dd8b71 /usr/local/www/status_rrd_graph_settings.php
parent29640ceef3b1ee281dae21ab41cd2ff5703f43c8 (diff)
downloadpfsense-97acf64675592e2e623eb22b3d1adcc63c109b2a.zip
pfsense-97acf64675592e2e623eb22b3d1adcc63c109b2a.tar.gz
Add new default option that makes RRD graphs with the old type of behavior for time periods, configurable on settings tab.
Diffstat (limited to 'usr/local/www/status_rrd_graph_settings.php')
-rwxr-xr-xusr/local/www/status_rrd_graph_settings.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/usr/local/www/status_rrd_graph_settings.php b/usr/local/www/status_rrd_graph_settings.php
index 6fb943a..7accd25 100755
--- a/usr/local/www/status_rrd_graph_settings.php
+++ b/usr/local/www/status_rrd_graph_settings.php
@@ -47,6 +47,7 @@ require_once("rrd.inc");
$pconfig['enable'] = isset($config['rrd']['enable']);
$pconfig['category'] = $config['rrd']['category'];
$pconfig['style'] = $config['rrd']['style'];
+$pconfig['period'] = $config['rrd']['period'];
$curcat = "settings";
$categories = array('system' => gettext("System"),
@@ -56,6 +57,9 @@ $categories = array('system' => gettext("System"),
'queues' => gettext("Queues"));
$styles = array('inverse' => gettext("Inverse"),
'absolute' => gettext("Absolute"));
+$periods = array("absolute" => gettext("Absolute Timespans"),
+ "current" => gettext("Current Period"),
+ "previous" => gettext("Previous Period"));
if ($_POST) {
@@ -69,6 +73,7 @@ if ($_POST) {
$config['rrd']['enable'] = $_POST['enable'] ? true : false;
$config['rrd']['category'] = $_POST['category'];
$config['rrd']['style'] = $_POST['style'];
+ $config['rrd']['period'] = $_POST['period'];
write_config();
$retval = 0;
@@ -189,6 +194,21 @@ include("head.inc");
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vtable"><?=gettext("Default period");?></td>
+ <td width="78%" class="vtable">
+ <select name="period" class="formselect" style="z-index: -10;" >
+ <?php
+ foreach ($periods as $period => $periodd) {
+ echo "<option value=\"$period\"";
+ if ($period == $pconfig['period']) echo " selected";
+ echo ">" . htmlspecialchars($periodd) . "</option>\n";
+ }
+ ?>
+ </select>
+ <b><?=gettext("This selects the default period.");?></b>
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change(true)">
OpenPOWER on IntegriCloud