r1489 + stick with more or less consistent SLB navigation
authorDenis Ovsienko <infrastation@yandex.ru>
Fri, 11 Jan 2008 16:31:59 +0000 (16:31 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Fri, 11 Jan 2008 16:31:59 +0000 (16:31 +0000)
inc/interface.php
inc/navigation.php

index 5e515d89511e2d0b1d1fef1fda9b60ae5e700bb2..e915c29ad913e3df25ca6c0bf733c22128e1f661 100644 (file)
@@ -1615,7 +1615,7 @@ function renderRackspaceHistory ()
 
 function renderAddressspace ()
 {
-       global $root;
+       global $root, $page;
        echo '<table border=0 class=objectview cellspacing=0 cellpadding=0><tr><td class=pcleft>';
 
        startPortlet ('Subnets');
@@ -1636,7 +1636,14 @@ function renderAddressspace ()
 
        echo "</td>\n<td class=pcright>";
 
-       startPortlet ('SLB summary');
+       startPortlet ('SLB details');
+       echo "<table border=0 width='100%'><tr>";
+       foreach (array ('vservices', 'rspools', 'rservers', 'lbs') as $pno)
+               echo "<td><h3>[<a href='${root}?page=${pno}'>" . $page[$pno]['title'] . "</a>]</h3></td>";
+       echo '</tr></table>';
+       finishPortlet();
+
+       startPortlet ('current SLB setup');
        $summary = getSLBSummary();
 #echo '<pre>';
 #print_r ($summary);
@@ -1664,9 +1671,9 @@ function renderAddressspace ()
                echo "</tr>\n";
                foreach ($summary as $vsid => $vsdata)
                {
-                       echo "<tr><td class=tdleft><a href='$root?page=vservice&tab=default&id=${vsid}'>[";
+                       echo "<tr><td class=tdleft><a href='$root?page=vservice&tab=default&id=${vsid}'>";
                        echo buildVServiceName ($vsdata);
-                       echo "]</td><td>${vsdata['name']}</td>";
+                       echo "</td><td>${vsdata['name']}</td>";
                        foreach ($lblist as $lb_object_id)
                        {
                                echo '<td>';
@@ -3617,7 +3624,7 @@ function renderLVSConfig ($object_id = 0)
 
 function renderVirtualService ($vsid = 0)
 {
-       global $root;
+       global $root, $nextorder;
        if ($vsid <= 0)
        {
                showError ('Invalid vsid', __FUNCTION__);
@@ -3653,11 +3660,12 @@ function renderVirtualService ($vsid = 0)
 
        echo '<td class=pcright>';
        startPortlet ('Backend');
-       echo "<table cellspacing=0 cellpadding=5 align=center border=1>\n";
+       echo "<table cellspacing=0 cellpadding=5 align=center border=0>\n";
        echo "<tr><th>real server pool</th><th>load balancers</th></tr>\n";
+       $order = 'odd';
        foreach ($vsinfo['rspool'] as $pool_id => $poolInfo)
        {
-               echo '<tr><td class=tdleft>';
+               echo "<tr class=row_${order}><td class=tdleft>";
                // Pool info
                echo '<table width=100%>';
                echo "<tr><td colspan=2><a href='${root}?page=rspool&id=${pool_id}'>";
index 4f101e26d1fd0fa65aa6b4f24f7032efa6bc19a0..b5674f5ad717de8ee25839ae725e938e2c428c62 100644 (file)
@@ -113,9 +113,6 @@ $page['ipv4space']['title'] = 'IPv4 space';
 $page['ipv4space']['parent'] = 'index';
 $tab['ipv4space']['default'] = 'Browse';
 $tab['ipv4space']['newrange'] = 'Subnets';
-$tab['ipv4space']['editrstab'] = '[SLB RSs]';
-$tab['ipv4space']['editlbconf'] = '[SLB LBs]';
-$tab['ipv4space']['editvstab'] = '[SLB VSs]';
 $helptab['ipv4space']['default'] = 'nets';
 $helptab['ipv4space']['newrange'] = 'nets';
 $tabhandler['ipv4space']['default'] = 'renderAddressspace';
@@ -151,17 +148,22 @@ $ophandler['ipaddress']['assignment']['delIpAssignment'] = 'delIpAssignment';
 $ophandler['ipaddress']['assignment']['editBondForAddress'] = 'editIpAssignment';
 $ophandler['ipaddress']['assignment']['bindObjectToIp'] = 'addIpAssignment';
 
+$page['vservices']['title'] = 'Virtual services';
+$page['vservices']['parent'] = 'ipv4space';
+
 $page['vservice']['title_handler'] = 'dynamic_title_vservice';
-$page['vservice']['parent'] = 'ipv4space';
+$page['vservice']['parent'] = 'vservices';
 $page['vservice']['bypass'] = 'id';
 $page['vservice']['bypass_type'] = 'uint';
 $tab['vservice']['default'] = 'View';
-$tab['vservice']['configs'] = '[VS Configuration]';
-$tab['vservice']['rspools'] = '[RS pools]';
+$tab['vservice']['configs'] = '[Configuration]';
 $tabhandler['vservice']['default'] = 'renderVirtualService';
 
+$page['rspools']['title'] = 'RS pools';
+$page['rspools']['parent'] = 'ipv4space';
+
 $page['rspool']['title_handler'] = 'dynamic_title_rspool';
-$page['rspool']['parent'] = 'ipv4space';
+$page['rspool']['parent'] = 'rspools';
 $page['rspool']['bypass'] = 'id';
 $page['rspool']['bypass_type'] = 'uint';
 $tab['rspool']['default'] = 'View';
@@ -173,6 +175,12 @@ $ophandler['rspool']['editrslist']['addRS'] = 'addRealServer';
 $ophandler['rspool']['editrslist']['delRS'] = 'deleteRealServer';
 $ophandler['rspool']['editrslist']['updRS'] = 'updateRealServer';
 
+$page['rservers']['title'] = 'Real servers';
+$page['rservers']['parent'] = 'ipv4space';
+
+$page['lbs']['title'] = 'Load balancers';
+$page['lbs']['parent'] = 'ipv4space';
+
 $page['search']['title_handler'] = 'dynamic_title_search';
 $page['search']['handler'] = 'handler_search';
 $page['search']['parent'] = 'index';