r2096 + distinguish router allocations in object and network views
authorDenis Ovsienko <infrastation@yandex.ru>
Thu, 31 Jul 2008 16:25:40 +0000 (16:25 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Thu, 31 Jul 2008 16:25:40 +0000 (16:25 +0000)
inc/interface.php
inc/navigation.php

index ba8f5cea7804784b566477eed53cbd17537cf6c8..4618c6dde48e6485ca61fc2938602ed90d441b92 100644 (file)
@@ -17,7 +17,7 @@ $aat = array
        'shared' => 'Shared',
        'router' => 'Router',
 );
-// address allocation code
+// address allocation code, IPv4 addresses and objects view
 $aac = array
 (
        'regular' => '',
@@ -25,6 +25,13 @@ $aac = array
        'shared' => '<strong>S</strong>',
        'router' => '<strong>R</strong>',
 );
+// address allocation code, IPv4 networks view
+$aac2 = array
+(
+       'regular' => '',
+       'virtual' => '<strong>L:</strong>',
+       'router' => '<strong>R:</strong>',
+);
 
 // Main menu.
 function renderIndex ()
@@ -2137,9 +2144,9 @@ function renderAddNewRange ()
        finishPortlet();
 }
 
-function renderIPRange ($id)
+function renderIPv4Network ($id)
 {
-       global $root, $pageno, $tabno;
+       global $root, $pageno, $tabno, $aac2;
        $netmaskbylen = array
        (
                32 => '255.255.255.255',
@@ -2264,7 +2271,7 @@ function renderIPRange ($id)
        }
        echo "</center>";
 
-       echo "<table class='widetable' border=0 cellspacing=0 cellpadding=5 align='center'>\n";
+       echo "<table class='widetable' border=0 cellspacing=0 cellpadding=5 align='center' width='100%'>\n";
        echo "<tr><th>Address</th><th>Name</th><th>Allocation</th></tr>\n";
 
 
@@ -2293,7 +2300,8 @@ function renderIPRange ($id)
                }
                foreach ($range['addrlist'][$ip]['allocs'] as $ref)
                {
-                       echo "${delim}<a href='${root}?page=object&object_id=${ref['object_id']}";
+                       echo $delim . $aac2[$ref['type']];
+                       echo "<a href='${root}?page=object&object_id=${ref['object_id']}";
                        echo "&hl_ipv4_addr=${addr['ip']}'>";
                        echo $ref['name'] . (empty ($ref['name']) ? '' : '@');
                        echo "${ref['object_name']}</a>";
index 45db99f417c096db2db440d7668adb16d484f5f7..98fa35313a142d9060b625683f434c4d59bc3468 100644 (file)
@@ -216,7 +216,7 @@ $tab['iprange']['default'] = 'Browse';
 $tab['iprange']['properties'] = 'Properties';
 $tab['iprange']['liveptr'] = 'Live PTR';
 $tab['iprange']['tags'] = 'Tags';
-$tabhandler['iprange']['default'] = 'renderIPRange';
+$tabhandler['iprange']['default'] = 'renderIPv4Network';
 $tabhandler['iprange']['properties'] = 'renderIPv4NetworkProperties';
 $tabhandler['iprange']['liveptr'] = 'renderLivePTR';
 $tabhandler['iprange']['tags'] = 'renderIPv4PrefixTags';