| 
									
										
										
										
											2018-11-20 21:28:19 -05:00
										 |  |  | {% load helpers %} | 
					
						
							| 
									
										
										
										
											2020-01-27 22:44:38 +00:00
										 |  |  | <tr class="rearport{% if rearport.cable %} {{ rearport.cable.get_status_class }}{% endif %}"> | 
					
						
							| 
									
										
										
										
											2018-10-26 11:29:03 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-29 12:56:17 -04:00
										 |  |  |     {# Checkbox #} | 
					
						
							|  |  |  |     {% if perms.dcim.change_rearport or perms.dcim.delete_rearport %} | 
					
						
							|  |  |  |         <td class="pk"> | 
					
						
							|  |  |  |             <input name="pk" type="checkbox" value="{{ rearport.pk }}" /> | 
					
						
							| 
									
										
										
										
											2018-10-25 12:08:13 -04:00
										 |  |  |         </td> | 
					
						
							| 
									
										
										
										
											2018-10-29 12:56:17 -04:00
										 |  |  |     {% endif %} | 
					
						
							| 
									
										
										
										
											2018-10-26 11:29:03 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-29 12:56:17 -04:00
										 |  |  |     {# Name #} | 
					
						
							|  |  |  |     <td> | 
					
						
							| 
									
										
										
										
											2018-10-29 13:09:23 -04:00
										 |  |  |         <i class="fa fa-fw fa-square{% if not rearport.cable %}-o{% endif %}"></i> {{ rearport }} | 
					
						
							| 
									
										
										
										
											2018-10-29 12:56:17 -04:00
										 |  |  |     </td> | 
					
						
							| 
									
										
										
										
											2018-10-26 11:29:03 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-29 12:56:17 -04:00
										 |  |  |     {# Type #} | 
					
						
							|  |  |  |     <td>{{ rearport.get_type_display }}</td> | 
					
						
							| 
									
										
										
										
											2018-10-26 11:29:03 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-29 12:56:17 -04:00
										 |  |  |     {# Positions #} | 
					
						
							|  |  |  |     <td>{{ rearport.positions }}</td> | 
					
						
							| 
									
										
										
										
											2018-10-26 11:29:03 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-20 21:28:19 -05:00
										 |  |  |     {# Description #} | 
					
						
							|  |  |  |     <td>{{ rearport.description|placeholder }}</td> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-31 12:21:43 -05:00
										 |  |  |     {# Cable/connection #} | 
					
						
							|  |  |  |     {% if rearport.cable %} | 
					
						
							|  |  |  |         <td> | 
					
						
							| 
									
										
										
										
											2018-10-29 12:56:17 -04:00
										 |  |  |             <a href="{{ rearport.cable.get_absolute_url }}">{{ rearport.cable }}</a> | 
					
						
							| 
									
										
										
										
											2019-02-13 17:05:02 -05:00
										 |  |  |             <a href="{% url 'dcim:rearport_trace' pk=rearport.pk %}" class="btn btn-primary btn-xs" title="Trace"> | 
					
						
							|  |  |  |                 <i class="fa fa-share-alt" aria-hidden="true"></i> | 
					
						
							|  |  |  |             </a> | 
					
						
							| 
									
										
										
										
											2019-01-31 12:21:43 -05:00
										 |  |  |         </td> | 
					
						
							|  |  |  |         {% with far_end=rearport.get_cable_peer %} | 
					
						
							| 
									
										
										
										
											2019-02-13 10:26:54 -05:00
										 |  |  |             <td> | 
					
						
							|  |  |  |                 {% if far_end.parent.provider %} | 
					
						
							|  |  |  |                     <i class="fa fa-fw fa-globe" title="Circuit"></i> | 
					
						
							|  |  |  |                     <a href="{{ far_end.parent.get_absolute_url }}"> | 
					
						
							|  |  |  |                         {{ far_end.parent.provider }} | 
					
						
							|  |  |  |                         {{ far_end.parent }} | 
					
						
							|  |  |  |                     </a> | 
					
						
							|  |  |  |                 {% else %} | 
					
						
							|  |  |  |                     <a href="{{ far_end.parent.get_absolute_url }}"> | 
					
						
							|  |  |  |                         {{ far_end.parent }} | 
					
						
							|  |  |  |                     </a> | 
					
						
							|  |  |  |                 {% endif %} | 
					
						
							|  |  |  |             </td> | 
					
						
							| 
									
										
										
										
											2019-01-31 12:21:43 -05:00
										 |  |  |             <td>{{ far_end }}</td> | 
					
						
							|  |  |  |         {% endwith %} | 
					
						
							|  |  |  |     {% else %} | 
					
						
							|  |  |  |         <td colspan="3"> | 
					
						
							| 
									
										
										
										
											2018-10-29 12:56:17 -04:00
										 |  |  |             <span class="text-muted">Not connected</span> | 
					
						
							| 
									
										
										
										
											2019-01-31 12:21:43 -05:00
										 |  |  |         </td> | 
					
						
							|  |  |  |     {% endif %} | 
					
						
							| 
									
										
										
										
											2018-10-29 12:56:17 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  |     {# Actions #} | 
					
						
							| 
									
										
										
										
											2019-03-05 15:42:47 -06:00
										 |  |  |     <td class="text-right noprint"> | 
					
						
							| 
									
										
										
										
											2018-11-15 14:23:23 -05:00
										 |  |  |         {% if rearport.cable %} | 
					
						
							|  |  |  |             {% include 'dcim/inc/cable_toggle_buttons.html' with cable=rearport.cable %} | 
					
						
							|  |  |  |         {% elif perms.dcim.add_cable %} | 
					
						
							| 
									
										
										
										
											2019-04-09 16:49:04 -04:00
										 |  |  |             <span class="dropdown"> | 
					
						
							|  |  |  |                 <button type="button" class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | 
					
						
							|  |  |  |                     <span class="glyphicon glyphicon-resize-small" aria-hidden="true"></span> | 
					
						
							|  |  |  |                 </button> | 
					
						
							|  |  |  |                 <ul class="dropdown-menu dropdown-menu-right"> | 
					
						
							|  |  |  |                     <li><a href="{% url 'dcim:rearport_connect' termination_a_id=rearport.pk termination_b_type='interface' %}?return_url={{ device.get_absolute_url }}">Interface</a></li> | 
					
						
							|  |  |  |                     <li><a href="{% url 'dcim:rearport_connect' termination_a_id=rearport.pk termination_b_type='front-port' %}?return_url={{ device.get_absolute_url }}">Front Port</a></li> | 
					
						
							|  |  |  |                     <li><a href="{% url 'dcim:rearport_connect' termination_a_id=rearport.pk termination_b_type='rear-port' %}?return_url={{ device.get_absolute_url }}">Rear Port</a></li> | 
					
						
							|  |  |  |                     <li><a href="{% url 'dcim:rearport_connect' termination_a_id=rearport.pk termination_b_type='circuit-termination' %}?return_url={{ device.get_absolute_url }}">Circuit Termination</a></li> | 
					
						
							|  |  |  |                 </ul> | 
					
						
							|  |  |  |             </span> | 
					
						
							| 
									
										
										
										
											2018-11-06 12:04:46 -05:00
										 |  |  |         {% endif %} | 
					
						
							| 
									
										
										
										
											2018-10-29 12:56:17 -04:00
										 |  |  |         {% if perms.dcim.change_rearport %} | 
					
						
							|  |  |  |             <a href="{% url 'dcim:rearport_edit' pk=rearport.pk %}?return_url={{ device.get_absolute_url }}" title="Edit port" class="btn btn-info btn-xs"> | 
					
						
							|  |  |  |                 <i class="glyphicon glyphicon-pencil" aria-hidden="true"></i> | 
					
						
							|  |  |  |             </a> | 
					
						
							|  |  |  |         {% endif %} | 
					
						
							|  |  |  |         {% if perms.dcim.delete_rearport %} | 
					
						
							|  |  |  |             <a href="{% url 'dcim:rearport_delete' pk=rearport.pk %}?return_url={{ device.get_absolute_url }}" title="Delete port" class="btn btn-danger btn-xs"> | 
					
						
							|  |  |  |                 <i class="glyphicon glyphicon-trash" aria-hidden="true"></i> | 
					
						
							|  |  |  |             </a> | 
					
						
							|  |  |  |         {% endif %} | 
					
						
							|  |  |  |     </td> | 
					
						
							|  |  |  | </tr> |