View Issue Details

IDProjectCategoryView StatusLast Update
1275RackTablesdefaultpublic2015-01-09 21:41
Reporterinfrared Assigned Toandriyanov  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionwon't fix 
Product Version0.20.8 
Summary1275: Display row and rack number on object Ports And Links table
DescriptionHello. I'm trying to convince my department to abandon our current cable management strategy, in favor of unique cable IDs and racktable tracking. The Main Page >> Object >> View tab is a wonderful page for the network technician to print out, because it displays the remote object and remote port for every local port.

However, one thing that would be really great is if, next to the "Remote object and port" field, it also displayed the remote object's row name and rack number. If that info was included directly in the table, we could simply print out the page, and it would have all the information on it that our old cable labeling had.

Our operation is small enough that would don't need the object "Location" field (i.e., building name) but I imagine bigger operations might want that included as well.

If this feature suggestion ends up being rejected, could somebody post a patch to the PHP code which I could use to apply this to my own installation?
TagsNo tags attached.

Activities

infrared

infrared

2014-07-12 00:21

reporter   ~0002425

Not having time to wait, I patched the interface.php file to get what I wanted. I'm guessing this isn't the most efficient way to do it, but I didn't want to get into messing with any of those database.php functions.
infrared

infrared

2014-07-12 00:21

reporter  

row-rack.patch (1,552 bytes)   
diff --git a/interface.php b/interface.php
index 5dc63ba..e2cd1c8 100644
--- a/interface.php
+++ b/interface.php
@@ -1362,6 +1362,9 @@ function renderObjectPortRow ($port, $is_highlighted)
 			formatPortLink ($port['remote_object_id'], $port['remote_object_name'], $port['remote_id'], NULL) .
 			"</td>";
 		echo "<td class=tdleft>" . formatLoggedSpan ($port['last_log'], $port['remote_name'], 'underline') . "</td>";
+                $remote_object_info = spotEntity ('object', $port['remote_object_id']);
+                $remote_rack_info = spotEntity ('rack', $remote_object_info['rack_id']);
+                echo "<td class=tdleft>${remote_rack_info['row_name']}:${remote_rack_info['name']}</td>";
 		$editable = permitted ('object', 'ports', 'editPort')
 			? 'editable'
 			: '';
@@ -1481,7 +1484,7 @@ function renderObject ($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=3>Remote object, port, row:rack</th>';
 		echo '<th class=tdleft>Cable ID</th></tr>';
 		foreach ($info['ports'] as $port)
 			callHook ('renderObjectPortRow', $port, ($hl_port_id == $port['id']));
row-rack.patch (1,552 bytes)   
andriyanov

andriyanov

2015-01-09 21:40

reporter   ~0002629

This info would definitely be excessive on the object's view page.

This could be easily done in a plugin generating the cable crossing table with all the fields you need, possibly formatted for printing.

The developers are quite busy to write custom plugins, so please ask on the mailing list.

Issue History

Date Modified Username Field Change
2014-07-10 02:58 infrared New Issue
2014-07-12 00:21 infrared Note Added: 0002425
2014-07-12 00:21 infrared File Added: row-rack.patch
2015-01-09 21:40 andriyanov Note Added: 0002629
2015-01-09 21:40 andriyanov Status new => closed
2015-01-09 21:40 andriyanov Assigned To => andriyanov
2015-01-09 21:40 andriyanov Resolution open => fixed
2015-01-09 21:41 andriyanov Resolution fixed => won't fix