update: new DB table indexes speeding up IP tree operations
update: tolerate user-visible newlines in secret.php and local.php
update: ability to delete a file entity from the Edit tab of the File page
+ update: 802.1q: links to swithports allowing the vlan added in page Vlan info
0.19.1 2011-02-22
update: UI: rack lists are now reduced by common tags with object on Rackspace tab (FILTER_RACKLIST_BY_TAGS config var)
update: 802.1q: If switch has IP interface in some VLAN linked to IP subnet, this VLAN is not pruned from switch's uplink
return $configCache[$varname]['varvalue'];
}
+// return portinfo array if object has a port with such name, or NULL
+function getPortinfoByName (&$object, $portname)
+{
+ if (! isset ($object['ports']))
+ amplifyCell ($object);
+ foreach ($object['ports'] as $portinfo)
+ if ($portinfo['name'] == $portname)
+ return $portinfo;
+ return NULL;
+}
+
?>
{
usort_portlist ($portlist);
echo "<tr class=row_${order} valign=top><td>";
- renderCell (spotEntity ('object', $switch_id));
+ $object = spotEntity ('object', $switch_id);
+ renderCell ($object);
echo '</td><td class=tdleft><ul>';
foreach ($portlist as $port_name)
- echo "<li>${port_name}</li>";
+ {
+ echo '<li>';
+ if ($portinfo = getPortinfoByName ($object, $port_name))
+ echo formatPortLink ($object['id'], NULL, $portinfo['id'], $portinfo['name']);
+ else
+ echo $port_name;
+ echo '</li>';
+ }
echo '</ul></td></tr>';
$order = $nextorder[$order];
}