From 50d86c13771164ab18c0de426f434f55c9b0cdce Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Tue, 5 Aug 2008 05:03:55 +0000 Subject: Bring in new server load balancing code, this introduces: * The ability to create your own monitors (tcp, http, https, send/expect) * A new way of displaying 'standard tables' - MainTable class * monitor_type array type --- usr/local/www/load_balancer_virtual_server.php | 94 ++++++++++---------------- 1 file changed, 37 insertions(+), 57 deletions(-) (limited to 'usr/local/www/load_balancer_virtual_server.php') diff --git a/usr/local/www/load_balancer_virtual_server.php b/usr/local/www/load_balancer_virtual_server.php index 45ca5e9..4a4f98d 100755 --- a/usr/local/www/load_balancer_virtual_server.php +++ b/usr/local/www/load_balancer_virtual_server.php @@ -4,7 +4,7 @@ load_balancer_virtual_server.php part of pfSense (http://www.pfsense.com/) - Copyright (C) 2005 Bill Marquette . + Copyright (C) 2005-2008 Bill Marquette . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -72,6 +72,21 @@ if ($_GET['act'] == "del") { } } +/* Index lbpool array for easy hyperlinking */ +$poodex = array(); +for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) { + $poodex[$config['load_balancer']['lbpool'][$i]['name']] = $i; +} +for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) { + $a_vs[$i]['pool'] = "{$a_vs[$i]['pool']}"; + if ($a_vs[$i]['sitedown'] != '') { + $a_vs[$i]['sitedown'] = "{$a_vs[$i]['sitedown']}"; + } else { + $a_vs[$i]['sitedown'] = 'none'; + } +} + + $pgtitle = array("Services","Load Balancer","Virtual Servers"); include("head.inc"); @@ -91,69 +106,34 @@ include("head.inc"); $tab_array = array(); $tab_array[] = array("Pools", false, "load_balancer_pool.php"); $tab_array[] = array("Virtual Servers", true, "load_balancer_virtual_server.php"); + $tab_array[] = array("Monitors", false, "load_balancer_monitor.php"); display_top_tabs($tab_array); ?>
- - - - - - - - - - - - - - - - - - - - - - -
NameServer addressPortPoolDescription - - - - - -
-
- - - - - - - - -   - - - - - - -
-
- - - - - -
-
+edit_uri('load_balancer_virtual_server_edit.php'); + $t->my_uri('load_balancer_virtual_server.php'); + $t->add_column('Name','name',10); + $t->add_column('IP Address','ipaddr',15); + $t->add_column('Port','port',10); + $t->add_column('Pool','pool',15); + $t->add_column('Fall Back Pool','sitedown',15); + $t->add_column('Description','desc',30); + $t->add_button('edit'); + $t->add_button('dup'); + $t->add_button('del'); + $t->add_content_array($a_vs); + $t->display(); +?>
- - + + + + -- cgit v1.1