r2843 - renderIPv4Address(): don't invent a wheel, but use renderCell() and renderLB...
authorDenis Ovsienko <infrastation@yandex.ru>
Thu, 11 Jun 2009 14:16:08 +0000 (14:16 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Thu, 11 Jun 2009 14:16:08 +0000 (14:16 +0000)
 - buildVServiceName(): sayonara

inc/functions.php
inc/interface.php

index 43ad54d1d0343d2e079501e7e8be9e716febcb8d..ded50a4be6d98304646a1c8bb8a8894b9d96e2ef 100644 (file)
@@ -626,18 +626,6 @@ function parseWikiLink ($line, $which, $strip_optgroup = FALSE)
                return $o_value;
 }
 
-// FIXME: only renderIPv4Address() is using this function, consider
-// phasing it out.
-function buildVServiceName ($vsinfo = NULL)
-{
-       if ($vsinfo == NULL)
-       {
-               showError ('NULL argument', __FUNCTION__);
-               return NULL;
-       }
-       return $vsinfo['vip'] . ':' . $vsinfo['vport'] . '/' . $vsinfo['proto'];
-}
-
 // rackspace usage for a single rack
 // (T + W + U) / (height * 3 - A)
 function getRSUforRack ($data = NULL)
index 4aa5d79fab3cc49cb18597cedb36a0082af6834d..48f12920c8758e0ac5b7fd169a7ddc82ea09cb4b 100644 (file)
@@ -2484,7 +2484,7 @@ function renderIPv4NetworkProperties ($id)
 
 function renderIPv4Address ($dottedquad)
 {
-       global $aat;
+       global $aat, $nextorder;
        $address = getIPv4Address ($dottedquad);
        echo "<table border=0 class=objectview cellspacing=0 cellpadding=0>";
        echo "<tr><td colspan=2 align=center><h1>${dottedquad}</h1></td></tr>\n";
@@ -2534,12 +2534,16 @@ function renderIPv4Address ($dottedquad)
        {
                startPortlet ('Virtual services (' . count ($address['lblist']) . ')');
                echo "<table class='widetable' cellpadding=5 cellspacing=0 border=0 align='center' width='100%'>\n";
-               echo "<tr><th>VS</th><th>name</th></tr>\n";
+               echo "<tr><th>VS</th><th>LB</th></tr>\n";
+               $order = 'odd';
                foreach ($address['lblist'] as $vsinfo)
                {
-                       echo "<tr><td class=tdleft><a href='".makeHref(array('page'=>'ipv4vs', 'vs_id'=>$vsinfo['vs_id']))."'>";
-                       echo buildVServiceName ($vsinfo) . "</a></td><td class=tdleft>";
-                       echo $vsinfo['name'] . "</td></tr>\n";
+                       echo "<tr valign=top class=row_${order}><td class=tdleft>";
+                       renderCell (spotEntity ('ipv4vs', $vsinfo['vs_id']));
+                       echo "</td><td class=tdleft>";
+                       renderLBCell ($vsinfo['object_id']);
+                       echo "</td></tr>";
+                       $order = $nextorder[$order];
                }
                echo "</table><br><br>";
                finishPortlet();