diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2009-03-13 21:12:21 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2009-03-13 21:13:58 +0100 |
commit | db7b006f39a507f2e4ceca17557b1db637f4611f (patch) | |
tree | 2440d70650ecb0ec66c525728945d1ffc450104c /usr/local/www/system_gateway_groups_edit.php | |
parent | 71c47cb67168985a1d0bda4d3f6f1c5a2ffbe5b8 (diff) | |
download | pfsense-db7b006f39a507f2e4ceca17557b1db637f4611f.zip pfsense-db7b006f39a507f2e4ceca17557b1db637f4611f.tar.gz |
* Make sure the trigger level on the gateway groups edit page loads it's settings from the config.
* Add the settings tab to the tabs
* Add a settings page that allows you to define the global trigger levels for all the gateways which are monitored
Diffstat (limited to 'usr/local/www/system_gateway_groups_edit.php')
-rwxr-xr-x | usr/local/www/system_gateway_groups_edit.php | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/usr/local/www/system_gateway_groups_edit.php b/usr/local/www/system_gateway_groups_edit.php index cad6867..1bbdeaa 100755 --- a/usr/local/www/system_gateway_groups_edit.php +++ b/usr/local/www/system_gateway_groups_edit.php @@ -45,6 +45,11 @@ if (!is_array($config['gateways']['gateway_group'])) $a_gateway_groups = &$config['gateways']['gateway_group']; $a_gateways = return_gateways_array(); +$categories = array('down' => 'Member Down', + 'downloss' => 'Packet Loss', + 'downlatency' => 'High Latency', + 'downlosslatency' => 'Packet Loss or High Latency'); + $id = $_GET['id']; if (isset($_POST['id'])) $id = $_POST['id']; @@ -57,6 +62,7 @@ if (isset($id) && $a_gateway_groups[$id]) { $pconfig['name'] = $a_gateway_groups[$id]['name']; $pconfig['item'] = &$a_gateway_groups[$id]['item']; $pconfig['descr'] = $a_gateway_groups[$id]['descr']; + $pconfig['trigger'] = $a_gateway_groups[$id]['trigger']; } if (isset($_GET['dup'])) @@ -169,9 +175,9 @@ include("head.inc"); echo "<option value='0' $selected[0] >Never</option>"; echo "<option value='1' $selected[1] >Tier 1</option>"; echo "<option value='2' $selected[2] >Tier 2</option>"; - echo "<option value='3' $selected[3]>Tier 3</option>"; - echo "<option value='4' $selected[4]>Tier 4</option>"; - echo "<option value='5' $selected[5]>Tier 5</option>"; + echo "<option value='3' $selected[3] >Tier 3</option>"; + echo "<option value='4' $selected[4] >Tier 4</option>"; + echo "<option value='5' $selected[5] >Tier 5</option>"; echo "</select> <strong>{$gateway['descr']}</strong><br/>"; } ?> @@ -189,10 +195,13 @@ include("head.inc"); <td width="22%" valign="top" class="vncellreq">Trigger Level</td> <td width="78%" class="vtable"> <select name='trigger' class='formfldselect' id='trigger'> - <option value='down'>Member Down</option> - <option value='downlatencyorloss'>Packet Loss or High Latency</option> - <option value='downlatency'>High Latency</option> - <option value='downloss'>Packet Loss</option> + <?php + foreach ($categories as $category => $categoryd) { + echo "<option value=\"$category\""; + if ($category == $pconfig['trigger']) echo " selected"; + echo ">" . htmlspecialchars($categoryd) . "</option>\n"; + } + ?> </select> <br> <span class="vexpl">When to trigger exclusion of a member</span></td> </tr> |