r1473 + initial revision of renderVSRSPoolForm()
authorDenis Ovsienko <infrastation@yandex.ru>
Wed, 9 Jan 2008 16:33:31 +0000 (16:33 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Wed, 9 Jan 2008 16:33:31 +0000 (16:33 +0000)
inc/interface.php
inc/navigation.php

index 4cd7c3836ada5d197ef8ad26d7e381c7c13c3af8..45c1ec9dc68a007f1c3ee47c46dc98e30754b060 100644 (file)
@@ -3676,4 +3676,42 @@ function renderProgressBar ($percentage = 0)
        echo "</tr></table>";
 }
 
+function renderVSRSPoolForm ($vsid = 0)
+{
+       global $root, $pageno, $tabno;
+       if ($vsid <= 0)
+       {
+               showError ('Invalid vsid', __FUNCTION__);
+               return;
+       }
+       $vsinfo = getVServiceInfo ($vsid);
+       echo '<pre>';
+       print_r ($vsinfo);
+       echo '</pre>';
+
+       echo "<center><h2>Add New</h2></center>\n";
+       echo "<table cellspacing=0 cellpadding=5 align=center class=widetable>\n";
+       echo "<tr><th>Address</th><th>Port</th><th>&nbsp;</th></tr>\n";
+       echo "<form action='${root}process.php'>";
+       echo "<input type=hidden name=page value='${pageno}'>\n";
+       echo "<input type=hidden name=tab value='${tabno}'>\n";
+       echo "<input type=hidden name=op value=addRealServer>";
+       echo "<input type=hidden name=vsid value='${vsid}'>";
+       echo "<tr><td><input type=text name=vsip tabindex=1></td>";
+       echo "<td><input type=text name=vsport tabindex=2></td>";
+       echo "<td><input type=submit value='OK' tabindex=3></tr>\n";
+       echo "</table>\n";
+
+       echo "<center><h2>Manage Existing</h2></center>\n";
+       echo "<table cellspacing=0 cellpadding=5 align=center class=widetable>\n";
+       echo "<tr><th>&nbsp;</th><th>Address</th><th>Port</th><th>[Allocation]</th></tr>\n";
+       foreach ($vsinfo['rslist'] as $rs)
+       {
+               echo "<tr><td><a href='${root}process.php?op=delRealServer&page=${pageno}&tab=${tabno}&rsid=${rs['rsid']}'>";
+               printImageHREF ('delete', 'Delete this real server');
+               echo "</td><td>${rs['rsip']}</td><td>${rs['rsport']}</td><td>&nbsp;</td></tr>\n";
+       }
+       echo "</table>\n";
+}
+
 ?>
index 5b15b87096ebe3fcec869ae96dc9bf8bd09fea9a..96a36d811842cdaa173b3a942e3b3ac6aa8b3ee9 100644 (file)
@@ -157,8 +157,9 @@ $page['vservice']['bypass'] = 'id';
 $page['vservice']['bypass_type'] = 'uint';
 $tab['vservice']['default'] = 'View';
 $tab['vservice']['configs'] = '[Configuration]';
-$tab['vservice']['rspool'] = '[Real servers]';
+$tab['vservice']['rspool'] = 'Real servers';
 $tabhandler['vservice']['default'] = 'renderVirtualService';
+$tabhandler['vservice']['rspool'] = 'renderVSRSPoolForm';
 
 $page['search']['title_handler'] = 'dynamic_title_search';
 $page['search']['handler'] = 'handler_search';