diff --git a/src/usr/local/www/load_balancer_virtual_server.php b/src/usr/local/www/load_balancer_virtual_server.php
index c2296b4ccf..b85d189955 100644
--- a/src/usr/local/www/load_balancer_virtual_server.php
+++ b/src/usr/local/www/load_balancer_virtual_server.php
@@ -118,6 +118,26 @@ for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) {
}
}
+// Return the index of any alias matching the specified name and type
+function alias_idx($name, $type) {
+ global $config;
+
+ if (empty($config['aliases']['alias'])) {
+ return(-1);
+ }
+
+ $idx = 0;
+ foreach ($config['aliases']['alias'] as $alias) {
+ if (($alias['name'] == $name) && ($alias['type'] == $type)) {
+ return($idx);
+ }
+
+ $idx++;
+ }
+
+ return(-1);
+}
+
$pgtitle = array(gettext("Services"), gettext("Load Balancer"), gettext("Virtual Servers"));
$shortcut_section = "relayd-virtualservers";
@@ -166,11 +186,24 @@ display_top_tabs($tab_array);
if (!empty($a_vs)) {
$i = 0;
foreach ($a_vs as $a_v) {
+
?>
| =htmlspecialchars($a_v['name'])?> |
=htmlspecialchars($a_v['relay_protocol'])?> |
- =htmlspecialchars($a_v['ipaddr'])?> |
+= 0) {
+ print("\n");
+ print('');
+ print(htmlspecialchars($a_v['ipaddr']) . ' | ');
+ } else {
+ print('' . htmlspecialchars($a_v['ipaddr']) . ' | ');
+ }
+
+?>
=htmlspecialchars($a_v['port'])?> |
=$a_v['poolname']?> |
=$a_v['sitedown']?> |
diff --git a/src/usr/local/www/load_balancer_virtual_server_edit.php b/src/usr/local/www/load_balancer_virtual_server_edit.php
index 38373ad6cb..9e491549e4 100644
--- a/src/usr/local/www/load_balancer_virtual_server_edit.php
+++ b/src/usr/local/www/load_balancer_virtual_server_edit.php
@@ -219,10 +219,10 @@ $section->addInput(new Form_Input(
$pconfig['descr']
));
-
-$section->addInput(new Form_IpAddress(
+$section->addInput(new Form_Input(
'ipaddr',
'IP Address',
+ 'text',
$pconfig['ipaddr']
))->setHelp('This is normally the WAN IP address for the server to listen on. ' .
'All connections to this IP and port will be forwarded to the pool cluster. ' .