View Issue Details

IDProjectCategoryView StatusLast Update
328RackTablesdefaultpublic2010-11-20 17:50
Reporterinfrastation Assigned Toinfrastation  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version0.17.8 
Target Version0.19.0Fixed in Version0.19.0 
Summary328: patch: commented Link records
DescriptionHello!

One thing that is missing on racktables, IMHO, is cable management. I changed some pieces of code to add a Cable ID on Link record.

Now I have all information about object links... which port is connected with which port with this cable identified with this Cable ID.

The Cable ID is a optional information, which is informed at popup.php, with remote_object port.

I created a patch (version 0.17.8) file with the changes and a column have to be created in Link table: cable varchar(255)

I hope that these changes be usefull to you folks.

Regards,

Giovani Zamboni
TagsNo tags attached.

Activities

2010-04-22 04:43

 

cable.patch (8,025 bytes)   
diff -rupN RackTables-0.17.8/inc/database.php /var/www/html/racktables/inc/database.php
--- RackTables-0.17.8/inc/database.php  2009-11-23 03:48:44.000000000 -0200
+++ /var/www/html/racktables/inc/database.php   2010-01-18 17:20:53.000000000 -0200
@@ -550,14 +550,16 @@ function getObjectPortsAndLinks ($object
        {
                $portid = $ret[$tmpkey]['id'];
                $remote_id = NULL;
-               $query = "select porta, portb from Link where porta = {$portid} or portb = ${portid}";
+               $query = "select porta, portb, cable from Link where porta = {$portid} or portb = ${portid}";
                $result = useSelectBlade ($query, __FUNCTION__);
+               $cable = "CableID n/a";
                if ($row = $result->fetch (PDO::FETCH_ASSOC))
                {
                        if ($portid != $row['porta'])
                                $remote_id = $row['porta'];
                        elseif ($portid != $row['portb'])
                                $remote_id = $row['portb'];
+                       $cable = $row['cable'];
                }
                unset ($result);
                if ($remote_id) // there's a remote end here
@@ -568,6 +570,7 @@ function getObjectPortsAndLinks ($object
                        {
                                $ret[$tmpkey]['remote_name'] = $row['name'];
                                $ret[$tmpkey]['remote_object_id'] = $row['object_id'];
+                               $ret[$tmpkey]['cableid'] = $cable;
                        }
                        $ret[$tmpkey]['remote_id'] = $remote_id;
                        unset ($result);
@@ -1089,7 +1092,7 @@ function getAllIPv4Allocations ()
        return $ret;
 }

-function linkPorts ($porta, $portb)
+function linkPorts ($porta, $portb, $cable="")
 {
        if ($porta == $portb)
                return "Ports can't be the same";
@@ -1100,7 +1103,7 @@ function linkPorts ($porta, $portb)
                $portb = $tmp;
        }
        global $dbxlink;
-       $query1 = "insert into Link set porta='${porta}', portb='{$portb}'";
+       $query1 = "insert into Link set porta='${porta}', portb='{$portb}', cable='{$cable}'";
        $query2 = "update Port set reservation_comment = NULL where id = ${porta} or id = ${portb} limit 2";
        // FIXME: who cares about the return value?
        $result = $dbxlink->exec ($query1);
diff -rupN RackTables-0.17.8/inc/interface.php /var/www/html/racktables/inc/interface.php
--- RackTables-0.17.8/inc/interface.php 2009-12-07 09:34:36.000000000 -0200
+++ /var/www/html/racktables/inc/interface.php  2010-01-18 17:30:32.000000000 -0200
@@ -860,7 +860,8 @@ function renderRackObject ($object_id)
                echo "<table cellspacing=0 cellpadding='5' align='center' class='widetable'>";
                echo '<tr><th class=tdleft>Local name</th><th class=tdleft>Visible label</th>';
                echo '<th class=tdleft>Interface</th><th class=tdleft>L2 address</th>';
-               echo '<th class=tdcenter colspan=2>Remote object and port</th></tr>';
+               echo '<th class=tdcenter colspan=2>Remote object and port</th>';
+               echo '<th class=tdleft>Cable ID</th></tr>';
                foreach ($info['ports'] as $port)
                {
                        echo '<tr';
@@ -875,6 +876,7 @@ function renderRackObject ($object_id)
                                $remote_object = spotEntity ('object', $port['remote_object_id']);
                                echo "<td class=tdleft><a href='".makeHref(array('page'=>'object', 'object_id'=>$port['remote_object_id'], 'hl_port_id'=>$port['remote_id']))."'>${remote_object['dname']}</a></td>";
                                echo "<td class=tdleft>${port['remote_name']}</td>";
+                               echo "<td class=tdleft>${port['cableid']}</td>";
                        }
                        elseif (strlen ($port['reservation_comment']))
                        {
@@ -1109,7 +1111,7 @@ function renderPortsForObject ($object_i
        amplifyCell ($object);
        echo "<table cellspacing=0 cellpadding='5' align='center' class='widetable'>\n";
        echo "<tr><th>&nbsp;</th><th class=tdleft>Local name</th><th class=tdleft>Visible label</th><th class=tdleft>Interface</th><th class=tdleft>L2 address</th>";
-       echo "<th class=tdcenter colspan=2>Remote object and port</th><th class=tdcenter>(Un)link or (un)reserve</th><th>&nbsp;</th></tr>\n";
+       echo "<th class=tdcenter colspan=2>Cable, Remote object and port</th><th class=tdcenter>(Un)link or (un)reserve</th><th>&nbsp;</th></tr>\n";
        if (getConfigVar ('ADDNEW_AT_TOP') == 'yes')
                printNewItemTR ($prefs);
        foreach ($object['ports'] as $port)
@@ -1143,7 +1145,7 @@ function renderPortsForObject ($object_i
                if ($port['remote_object_id'])
                {
                        $remote_object = spotEntity ('object', $port['remote_object_id']);
-                       echo "<td><a href='".makeHref(array('page'=>'object', 'object_id'=>$port['remote_object_id']))."'>${remote_object['dname']}</a></td>";
+                       echo "<td>${port['cableid']}&nbsp;<a href='".makeHref(array('page'=>'object', 'object_id'=>$port['remote_object_id']))."'>${remote_object['dname']}</a></td>";
                        echo "<td>${port['remote_name']}</td>";
                        echo "<td class=tdcenter><a href='".
                                makeHrefProcess(array(
diff -rupN RackTables-0.17.8/inc/ophandlers.php /var/www/html/racktables/inc/ophandlers.php
--- RackTables-0.17.8/inc/ophandlers.php        2009-11-23 03:48:44.000000000 -0200
+++ /var/www/html/racktables/inc/ophandlers.php 2010-01-18 17:49:36.000000000 -0200
@@ -192,9 +192,11 @@ function linkPortForObject ()
 {
        assertUIntArg ('port_id', __FUNCTION__);
        assertUIntArg ('remote_port_id', __FUNCTION__);
+       assertStringArg ('cable', __FUNCTION__, TRUE);
+

        // FIXME: ensure, that at least one of these ports belongs to the current object
-       $error = linkPorts ($_REQUEST['port_id'], $_REQUEST['remote_port_id']);
+       $error = linkPorts ($_REQUEST['port_id'], $_REQUEST['remote_port_id'], $_REQUEST['cable']);
        if ($error != '')
                return buildRedirectURL (__FUNCTION__, 'ERR', array ($error));
        $local_port_info = getPortInfo ($_REQUEST['port_id']);
@@ -2006,3 +2008,4 @@ function delPortOIFCompat ()
 }

 ?>
+
diff -rupN RackTables-0.17.8/popup.php /var/www/html/racktables/popup.php
--- RackTables-0.17.8/popup.php 2009-11-09 06:59:26.000000000 -0200
+++ /var/www/html/racktables/popup.php  2010-01-18 17:34:34.000000000 -0200
@@ -92,10 +92,12 @@ function findSparePorts ($port_id, $only
                        }
                        $spare_ports = findSparePorts ($port_id, $only_racks);
                        printSelect ($spare_ports, array ('name' => 'ports', 'id' => 'ports', 'size' => getConfigVar ('MAXSELSIZE')));
-                       echo '<br><br>';
+                       echo '<br>';
+                       echo "Cable ID: <input type=text id=cable>";
+                       echo '<br>';
                        echo "<input type='submit' value='Link' onclick='".
                        "if (getElementById(\"ports\").value != \"\") {".
-                       "       opener.location=\"process.php?page=object&tab=ports&op=linkPort&object_id=${port_info['object_id']}&port_id=$port_id&remote_port_id=\"+getElementById(\"ports\").value; ".
+                       "       opener.location=\"process.php?page=object&tab=ports&op=linkPort&object_id=${port_info['object_id']}&port_id=$port_id&remote_port_id=\"+getElementById(\"ports\").value+\"&cable=\"+getElementById(\"cable\").value; ".
                        "       window.close();}'>";
                        echo '</form></div>';
                        break;
cable.patch (8,025 bytes)   

user143

2010-04-26 15:11

  ~0000053

Just tried this patch (we need some cable management too) - works fine. Please integrate this patch into RackTables :)

user144

2010-04-30 19:48

  ~0000055

Cable management is one of my biggest needs. Please implement this soon.

user144

2010-05-03 13:42

  ~0000058

Patch failed to apply on my system, running 0.17.9. Anyone knowing how to make the necessary corrections to make this run under 0.17.9? Any assistance would be much appreciated.

user145

2010-05-09 23:55

  ~0000069

i am going to check this out.

user145

2010-05-10 00:14

  ~0000070

so what is the purpose of this? Can you give me an example of how it would be used? Is this a way to link Patch panels together?
infrastation

infrastation

2010-05-10 10:10

administrator   ~0000073

This user-contributed patch after some necessary cleanup adds code to update and display extra column in Link table (which yet has to be ALTERed in upgrade procedure).

user143

2010-06-30 16:34

  ~0000106

I've attached a patch for the current version..

gwyden: we use this patch to document e.g. the color of a cable

2010-06-30 16:35

 

cable-0.17.11.patch (7,220 bytes)   
diff -rupN /tmp/RackTables-0.17.11/inc/database.php ./inc/database.php
--- /tmp/RackTables-0.17.11/inc/database.php	2010-05-09 21:16:42.000000000 +0200
+++ ./inc/database.php	2010-06-30 18:22:59.000000000 +0200
@@ -547,14 +547,16 @@ function getObjectPortsAndLinks ($object
 	{
 		$portid = $ret[$tmpkey]['id'];
 		$remote_id = NULL;
-		$query = "select porta, portb from Link where porta = {$portid} or portb = ${portid}";
+		$query = "select porta, portb, cable from Link where porta = {$portid} or portb = ${portid}";
 		$result = useSelectBlade ($query, __FUNCTION__);
+		$cable = "CableID n/a";
 		if ($row = $result->fetch (PDO::FETCH_ASSOC))
 		{
 			if ($portid != $row['porta'])
 				$remote_id = $row['porta'];
 			elseif ($portid != $row['portb'])
 				$remote_id = $row['portb'];
+			$cable = $row['cable'];
 		}
 		unset ($result);
 		if ($remote_id) // there's a remote end here
@@ -565,6 +567,7 @@ function getObjectPortsAndLinks ($object
 			{
 				$ret[$tmpkey]['remote_name'] = $row['name'];
 				$ret[$tmpkey]['remote_object_id'] = $row['object_id'];
+				$ret[$tmpkey]['cableid'] = $cable;
 			}
 			$ret[$tmpkey]['remote_id'] = $remote_id;
 			unset ($result);
@@ -1086,7 +1089,7 @@ function getAllIPv4Allocations ()
 	return $ret;
 }
 
-function linkPorts ($porta, $portb)
+function linkPorts ($porta, $portb, $cable="")
 {
 	if ($porta == $portb)
 		return "Ports can't be the same";
@@ -1097,7 +1100,7 @@ function linkPorts ($porta, $portb)
 		$portb = $tmp;
 	}
 	global $dbxlink;
-	$query1 = "insert into Link set porta='${porta}', portb='{$portb}'";
+	$query1 = "insert into Link set porta='${porta}', portb='{$portb}', cable='{$cable}'";
 	$query2 = "update Port set reservation_comment = NULL where id = ${porta} or id = ${portb} limit 2";
 	// FIXME: who cares about the return value?
 	$result = $dbxlink->exec ($query1);
diff -rupN /tmp/RackTables-0.17.11/inc/interface.php ./inc/interface.php
--- /tmp/RackTables-0.17.11/inc/interface.php	2010-05-14 03:27:47.000000000 +0200
+++ ./inc/interface.php	2010-06-30 18:25:54.000000000 +0200
@@ -871,7 +871,8 @@ function renderRackObject ($object_id)
 		echo "<table cellspacing=0 cellpadding='5' align='center' class='widetable'>";
 		echo '<tr><th class=tdleft>Local name</th><th class=tdleft>Visible label</th>';
 		echo '<th class=tdleft>Interface</th><th class=tdleft>L2 address</th>';
-		echo '<th class=tdcenter colspan=2>Remote object and port</th>';
+                echo '<th class=tdcenter colspan=2>Remote object and port</th>';
+                echo '<th class=tdleft>Cable ID</th></tr>';
 		if (isset ($page['object']['ports']['header']))
 			echo $page['object']['ports']['header'] ();
 		echo '</tr>';
@@ -891,6 +892,7 @@ function renderRackObject ($object_id)
 				$remote_object = spotEntity ('object', $port['remote_object_id']);
 				echo "<td class=tdleft><a href='".makeHref(array('page'=>'object', 'object_id'=>$port['remote_object_id'], 'hl_port_id'=>$port['remote_id']))."'>${remote_object['dname']}</a></td>";
 				echo "<td class=tdleft>${port['remote_name']}</td>";
+				echo "<td class=tdleft>${port['cableid']}</td>";
 			}
 			elseif (strlen ($port['reservation_comment']))
 			{
@@ -1145,7 +1147,7 @@ function renderPortsForObject ($object_i
 	
 	echo "<table cellspacing=0 cellpadding='5' align='center' class='widetable'>\n";
 	echo "<tr><th>&nbsp;</th><th class=tdleft>Local name</th><th class=tdleft>Visible label</th><th class=tdleft>Interface</th><th class=tdleft>L2 address</th>";
-	echo "<th class=tdcenter colspan=2>Remote object and port</th><th class=tdcenter>(Un)link or (un)reserve</th><th>&nbsp;</th></tr>\n";
+	echo "<th class=tdcenter colspan=2>Cable, Remote object and port</th><th class=tdcenter>(Un)link or (un)reserve</th><th>&nbsp;</th></tr>\n";
 	if (getConfigVar ('ADDNEW_AT_TOP') == 'yes')
 		printNewItemTR ($prefs);
 	foreach ($object['ports'] as $port)
@@ -1179,7 +1181,7 @@ function renderPortsForObject ($object_i
 		if ($port['remote_object_id'])
 		{
 			$remote_object = spotEntity ('object', $port['remote_object_id']);
-			echo "<td><a href='".makeHref(array('page'=>'object', 'object_id'=>$port['remote_object_id']))."'>${remote_object['dname']}</a></td>";
+			echo "<td>${port['cableid']}&nbsp;<a href='".makeHref(array('page'=>'object', 'object_id'=>$port['remote_object_id']))."'>${remote_object['dname']}</a></td>";
 			echo "<td>${port['remote_name']}</td>";
 			echo "<td class=tdcenter><a href='".
 				makeHrefProcess(array(
@@ -2221,7 +2223,14 @@ function renderIPv4SpaceEditor ()
 			}
 			else // only render clickable image for empty networks
 			{
-				if (count ($netinfo['addrlist']))
+				//if (count ($netinfo['addrlist']))
+                                $reservedCount = 0;
+                                foreach($netinfo['addrlist'] as $ipinfo)
+                                {
+                                        if( $ipinfo['reserved'] == 'yes')
+                                                $reservedCount++;
+                                }
+                               if (count ($netinfo['addrlist']) - $reservedCount)
 					printImageHREF ('nodestroy', 'There are ' . count ($netinfo['addrlist']) . ' allocations inside');
 				else
 				{
diff -rupN /tmp/RackTables-0.17.11/inc/ophandlers.php ./inc/ophandlers.php
--- /tmp/RackTables-0.17.11/inc/ophandlers.php	2010-05-30 11:21:41.000000000 +0200
+++ ./inc/ophandlers.php	2010-06-30 18:27:38.000000000 +0200
@@ -192,9 +192,10 @@ function linkPortForObject ()
 {
 	assertUIntArg ('port_id', __FUNCTION__);
 	assertUIntArg ('remote_port_id', __FUNCTION__);
+	assertStringArg ('cable', __FUNCTION__, TRUE);
 
 	// FIXME: ensure, that at least one of these ports belongs to the current object
-	$error = linkPorts ($_REQUEST['port_id'], $_REQUEST['remote_port_id']);
+	$error = linkPorts ($_REQUEST['port_id'], $_REQUEST['remote_port_id'], $_REQUEST['cable']);
 	if ($error != '')
 		return buildRedirectURL (__FUNCTION__, 'ERR', array ($error));
 	$local_port_info = getPortInfo ($_REQUEST['port_id']);
diff -rupN /tmp/RackTables-0.17.11/popup.php ./popup.php
--- /tmp/RackTables-0.17.11/popup.php	2010-05-19 17:57:39.000000000 +0200
+++ ./popup.php	2010-06-30 18:29:33.000000000 +0200
@@ -92,11 +92,13 @@ header ('Content-Type: text/html; charse
 			}
 			$spare_ports = findSparePorts ($port_id, $only_racks);
 			printSelect ($spare_ports, array ('name' => 'ports', 'id' => 'ports', 'size' => getConfigVar ('MAXSELSIZE')));
-			echo '<br><br>';
+			echo '<br>';
+			echo "Cable ID: <input type=text id=cable>";
+			echo '<br>';
 			echo "<input type='submit' value='Link' onclick='".
 			"if (getElementById(\"ports\").value != \"\") {".
-			"	opener.location=\"process.php?page=object&tab=ports&op=linkPort&object_id=${port_info['object_id']}&port_id=$port_id&remote_port_id=\"+getElementById(\"ports\").value; ".
-			"	window.close();}'>";
+			"       opener.location=\"process.php?page=object&tab=ports&op=linkPort&object_id=${port_info['object_id']}&port_id=$port_id&remote_port_id=\"+getElementById(\"ports\").value+\"&cable=\"+getElementById(\"cable\").value; ".
+                        "       window.close();}'>";
 			echo '</form></div>';
 			break;
 		case 'inet4list':
cable-0.17.11.patch (7,220 bytes)   

2010-08-27 12:32

 

RackTables_cable.patch_0.18.4.patch (6,288 bytes)   
diff -rupN RackTables/inc/database.php RackTables.cable/inc/database.php
--- RackTables/inc/database.php	2010-07-09 17:01:54.000000000 +0200
+++ RackTables.cable/inc/database.php	2010-08-27 13:28:48.000000000 +0200
@@ -518,14 +518,16 @@ function getObjectPortsAndLinks ($object
 	{
 		$portid = $ret[$tmpkey]['id'];
 		$remote_id = NULL;
-		$query = "select porta, portb from Link where porta = ? or portb = ?";
+		$query = "select porta, portb, cable from Link where porta = ? or portb = ?";
 		$result = usePreparedSelectBlade ($query, array ($portid, $portid));
+		$cable = "CableID n/a";
 		if ($row = $result->fetch (PDO::FETCH_ASSOC))
 		{
 			if ($portid != $row['porta'])
 				$remote_id = $row['porta'];
 			elseif ($portid != $row['portb'])
 				$remote_id = $row['portb'];
+			$cable = $row['cable'];
 		}
 		unset ($result);
 		if ($remote_id) // there's a remote end here
@@ -536,6 +538,7 @@ function getObjectPortsAndLinks ($object
 			{
 				$ret[$tmpkey]['remote_name'] = $row['name'];
 				$ret[$tmpkey]['remote_object_id'] = $row['object_id'];
+				$ret[$tmpkey]['cableid'] = $cable;
 			}
 			$ret[$tmpkey]['remote_id'] = $remote_id;
 			unset ($result);
@@ -945,7 +948,7 @@ function getAllIPv4Allocations ()
 	return $ret;
 }
 
-function linkPorts ($porta, $portb)
+function linkPorts ($porta, $portb, $cable="")
 {
 	if ($porta == $portb)
 		throw new InvalidArgException ('porta/portb', $porta, "Ports can't be the same");
@@ -955,7 +958,7 @@ function linkPorts ($porta, $portb)
 		$porta = $portb;
 		$portb = $tmp;
 	}
-	$ret = FALSE !== usePreparedInsertBlade ('Link', array ('porta' => $porta, 'portb' => $portb));
+	$ret = FALSE !== usePreparedInsertBlade ('Link', array ('porta' => $porta, 'portb' => $portb, 'cable' => $cable));
 	$ret = $ret and FALSE !== usePreparedExecuteBlade
 	(
 		'UPDATE Port SET reservation_comment=NULL WHERE id IN(?, ?)',
diff -rupN RackTables/inc/interface.php RackTables.cable/inc/interface.php
--- RackTables/inc/interface.php	2010-07-09 17:07:24.000000000 +0200
+++ RackTables.cable/inc/interface.php	2010-08-27 13:34:49.000000000 +0200
@@ -951,7 +951,8 @@ function renderRackObject ($object_id)
 		echo "<table cellspacing=0 cellpadding='5' align='center' class='widetable'>";
 		echo '<tr><th class=tdleft>Local name</th><th class=tdleft>Visible label</th>';
 		echo '<th class=tdleft>Interface</th><th class=tdleft>L2 address</th>';
-		echo '<th class=tdcenter colspan=2>Remote object and port</th></tr>';
+		echo '<th class=tdcenter colspan=2>Remote object and port</th>';
+		echo '<th class=tdleft>Cable ID</th></tr>';
 		foreach ($info['ports'] as $port)
 		{
 			echo '<tr';
@@ -964,6 +965,7 @@ function renderRackObject ($object_id)
 				$remote_object = spotEntity ('object', $port['remote_object_id']);
 				echo "<td class=tdleft><a href='".makeHref(array('page'=>'object', 'object_id'=>$port['remote_object_id'], 'hl_port_id'=>$port['remote_id']))."'>${remote_object['dname']}</a></td>";
 				echo "<td class=tdleft>${port['remote_name']}</td>";
+				echo "<td class=tdleft>${port['cableid']}</td>";
 			}
 			elseif (strlen ($port['reservation_comment']))
 			{
@@ -1216,7 +1218,7 @@ function renderPortsForObject ($object_i
 	
 	echo "<table cellspacing=0 cellpadding='5' align='center' class='widetable'>\n";
 	echo "<tr><th>&nbsp;</th><th class=tdleft>Local name</th><th class=tdleft>Visible label</th><th class=tdleft>Interface</th><th class=tdleft>L2 address</th>";
-	echo "<th class=tdcenter colspan=2>Remote object and port</th><th class=tdcenter>(Un)link or (un)reserve</th><th>&nbsp;</th></tr>\n";
+	echo "<th class=tdcenter colspan=2>Cable, Remote object and port</th><th class=tdcenter>(Un)link or (un)reserve</th><th>&nbsp;</th></tr>\n";
 	if (getConfigVar ('ADDNEW_AT_TOP') == 'yes')
 		printNewItemTR ($prefs);
 	foreach ($object['ports'] as $port)
@@ -1248,7 +1250,7 @@ function renderPortsForObject ($object_i
 		if ($port['remote_object_id'])
 		{
 			$remote_object = spotEntity ('object', $port['remote_object_id']);
-			echo "<td><a href='".makeHref(array('page'=>'object', 'object_id'=>$port['remote_object_id']))."'>${remote_object['dname']}</a></td>";
+			echo "<td>${port['cableid']}&nbsp;<a href='".makeHref(array('page'=>'object', 'object_id'=>$port['remote_object_id']))."'>${remote_object['dname']}</a></td>";
 			echo "<td>${port['remote_name']}<input type=hidden name=reservation_comment value=''></td>";
 			echo "<td class=tdcenter><a href='".
 				makeHrefProcess(array(
diff -rupN RackTables/inc/ophandlers.php RackTables.cable/inc/ophandlers.php
--- RackTables/inc/ophandlers.php	2010-07-05 19:07:09.000000000 +0200
+++ RackTables.cable/inc/ophandlers.php	2010-08-27 13:35:52.000000000 +0200
@@ -190,9 +190,10 @@ function linkPortForObject ()
 {
 	assertUIntArg ('port_id');
 	assertUIntArg ('remote_port_id');
+	assertStringArg ('cable');
 
 	// FIXME: ensure, that at least one of these ports belongs to the current object
-	$error = linkPorts ($_REQUEST['port_id'], $_REQUEST['remote_port_id']);
+	$error = linkPorts ($_REQUEST['port_id'], $_REQUEST['remote_port_id'], $_REQUEST['cable']);
 	if ($error != '')
 		return buildRedirectURL (__FUNCTION__, 'ERR', array ($error));
 	global $sic;
diff -rupN RackTables/popup.php RackTables.cable/popup.php
--- RackTables/popup.php	2010-06-25 12:54:06.000000000 +0200
+++ RackTables.cable/popup.php	2010-08-27 13:37:22.000000000 +0200
@@ -117,10 +117,12 @@ header ('Content-Type: text/html; charse
 			$spare_ports = findSparePorts ($port_id, $only_racks);
 
 			printSelect ($spare_ports, array ('name' => 'ports', 'size' => getConfigVar ('MAXSELSIZE')));
-			echo '<br><br>';
+			echo '<br>';
+			echo "Cable ID: <input type=text id=cable>";
+			echo '<br>';
 			echo "<input type='submit' value='Link' onclick='".
 			"if (getElementById(\"ports\").value != \"\") {".
-			"	opener.location=\"process.php?page=object&tab=ports&op=linkPort&object_id=${port_info['object_id']}&port_id=$port_id&remote_port_id=\"+getElementById(\"ports\").value; ".
+			"	opener.location=\"process.php?page=object&tab=ports&op=linkPort&object_id=${port_info['object_id']}&port_id=$port_id&remote_port_id=\"+getElementById(\"ports\").value+\"&cable=\"+getElementById(\"cable\").value; ".
 			"	window.close();}'>";
 			echo '</form></div>';
 			break;

user143

2010-08-27 12:32

  ~0000126

I've attached a patch for the current version..
infrastation

infrastation

2010-08-27 14:12

administrator   ~0000127

Ryan?

user143

2010-11-07 12:01

  ~0000169

Info: Patch-0.18.4 still works with 0.18.5
infrastation

infrastation

2010-11-20 17:50

administrator   ~0000177

Committed and will be seen in 0.19.0. Thank you!

Issue History

Date Modified Username Field Change
2010-04-22 04:43 infrastation New Issue
2010-04-22 04:43 infrastation File Added: cable.patch
2010-04-26 15:11 user143 Note Added: 0000053
2010-04-30 19:48 user144 Note Added: 0000055
2010-05-03 13:42 user144 Note Added: 0000058
2010-05-09 23:54 user145 Status new => assigned
2010-05-09 23:54 user145 Assigned To => user145
2010-05-09 23:55 user145 Note Added: 0000069
2010-05-10 00:14 user145 Note Added: 0000070
2010-05-10 10:10 infrastation Note Added: 0000073
2010-06-30 16:34 user143 Note Added: 0000106
2010-06-30 16:35 user143 File Added: cable-0.17.11.patch
2010-08-27 12:32 user143 File Added: RackTables_cable.patch_0.18.4.patch
2010-08-27 12:32 user143 Note Added: 0000126
2010-08-27 14:12 infrastation Note Added: 0000127
2010-11-07 12:01 user143 Note Added: 0000169
2010-11-07 18:33 infrastation Assigned To user145 => infrastation
2010-11-07 18:33 infrastation Priority low => normal
2010-11-07 18:33 infrastation Status assigned => confirmed
2010-11-07 18:33 infrastation Additional Information Updated
2010-11-20 16:58 infrastation Status confirmed => assigned
2010-11-20 16:58 infrastation Target Version => 0.19.0
2010-11-20 16:58 infrastation Additional Information Updated
2010-11-20 17:50 infrastation Note Added: 0000177
2010-11-20 17:50 infrastation Status assigned => closed
2010-11-20 17:50 infrastation Resolution open => fixed
2010-11-20 17:50 infrastation Projection none => tweak
2010-11-20 17:50 infrastation Fixed in Version => 0.19.0