| 
									
										
										
										
											2020-04-10 10:21:02 -04:00
										 |  |  | {% extends 'base.html' %} | 
					
						
							| 
									
										
										
										
											2018-10-30 16:30:03 -04:00
										 |  |  | {% load helpers %} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {% block header %} | 
					
						
							|  |  |  |     <h1>{% block title %}Cable Trace for {{ obj }}{% endblock %}</h1> | 
					
						
							|  |  |  | {% endblock %} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {% block content %} | 
					
						
							|  |  |  |     <div class="row"> | 
					
						
							| 
									
										
										
										
											2020-10-07 16:39:15 -04:00
										 |  |  |         <div class="col-md-5 col-sm-12 text-center"> | 
					
						
							| 
									
										
										
										
											2020-10-05 16:03:30 -04:00
										 |  |  |             {% for near_end, cable, far_end in path.origin.trace %} | 
					
						
							| 
									
										
										
										
											2020-10-07 16:39:15 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  |                 {# Near end #} | 
					
						
							|  |  |  |                 {% if near_end.device %} | 
					
						
							|  |  |  |                     {% include 'dcim/trace/device.html' with device=near_end.device %} | 
					
						
							|  |  |  |                     {% include 'dcim/trace/termination.html' with termination=near_end %} | 
					
						
							|  |  |  |                 {% elif near_end.power_panel %} | 
					
						
							|  |  |  |                     {% include 'dcim/trace/powerfeed.html' with powerfeed=near_end %} | 
					
						
							|  |  |  |                 {% elif near_end.circuit %} | 
					
						
							|  |  |  |                     {% include 'dcim/trace/circuit.html' with circuit=near_end.circuit %} | 
					
						
							|  |  |  |                     {% include 'dcim/trace/termination.html' with termination=near_end %} | 
					
						
							|  |  |  |                 {% endif %} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 {# Cable #} | 
					
						
							| 
									
										
										
										
											2020-10-05 16:03:30 -04:00
										 |  |  |                 <div class="row"> | 
					
						
							| 
									
										
										
										
											2020-10-07 16:39:15 -04:00
										 |  |  |                     {% if cable %} | 
					
						
							|  |  |  |                         {% include 'dcim/trace/cable.html' %} | 
					
						
							|  |  |  |                     {% else %} | 
					
						
							|  |  |  |                         <h4>No cable</h4> | 
					
						
							|  |  |  |                     {% endif %} | 
					
						
							| 
									
										
										
										
											2020-10-05 16:03:30 -04:00
										 |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2020-10-07 16:39:15 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  |                 {# Far end #} | 
					
						
							|  |  |  |                 {% if far_end.device %} | 
					
						
							|  |  |  |                     {% include 'dcim/trace/termination.html' with termination=far_end %} | 
					
						
							|  |  |  |                     {% if forloop.last %} | 
					
						
							|  |  |  |                         {% include 'dcim/trace/device.html' with device=far_end.device %} | 
					
						
							|  |  |  |                     {% endif %} | 
					
						
							|  |  |  |                 {% elif far_end.power_panel %} | 
					
						
							|  |  |  |                     {% include 'dcim/trace/powerfeed.html' with powerfeed=far_end %} | 
					
						
							|  |  |  |                 {% elif far_end.circuit %} | 
					
						
							|  |  |  |                     {% include 'dcim/trace/termination.html' with termination=far_end %} | 
					
						
							|  |  |  |                     {% if forloop.last %} | 
					
						
							|  |  |  |                         {% include 'dcim/trace/circuit.html' with circuit=far_end.circuit %} | 
					
						
							|  |  |  |                     {% endif %} | 
					
						
							|  |  |  |                 {% endif %} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-05 16:03:30 -04:00
										 |  |  |             {% endfor %} | 
					
						
							|  |  |  |             <div class="row"> | 
					
						
							| 
									
										
										
										
											2020-10-07 16:39:15 -04:00
										 |  |  |                 <div class="text-center"> | 
					
						
							| 
									
										
										
										
											2020-10-05 16:03:30 -04:00
										 |  |  |                     <h3 class="text-success text-center">Trace completed!</h3> | 
					
						
							| 
									
										
										
										
											2020-10-07 16:39:15 -04:00
										 |  |  |                     {% if total_length %} | 
					
						
							|  |  |  |                         <h5>Total length: {{ total_length|floatformat:"-2" }} Meters<h5> | 
					
						
							|  |  |  |                     {% endif %} | 
					
						
							| 
									
										
										
										
											2020-10-05 16:03:30 -04:00
										 |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2018-10-30 16:30:03 -04:00
										 |  |  |             </div> | 
					
						
							| 
									
										
										
										
											2020-10-05 16:03:30 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-30 16:30:03 -04:00
										 |  |  |         </div> | 
					
						
							| 
									
										
										
										
											2020-10-07 16:39:15 -04:00
										 |  |  |         <div class="col-md-7 col-sm-12"> | 
					
						
							| 
									
										
										
										
											2020-10-05 16:03:30 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  |             <h4 class="text-center">Related Paths</h4> | 
					
						
							|  |  |  |             <ul class="nav nav-pills nav-stacked"> | 
					
						
							|  |  |  |                 {% for cablepath in related_paths %} | 
					
						
							|  |  |  |                     <li role="presentation"{% if cablepath.pk == path.pk %} class="active"{% endif %}> | 
					
						
							| 
									
										
										
										
											2020-10-07 16:39:15 -04:00
										 |  |  |                         <a href="?cablepath_id={{ cablepath.pk }}"> | 
					
						
							|  |  |  |                             From {{ cablepath.origin }} ({{ cablepath.origin.parent }}) | 
					
						
							|  |  |  |                             to {{ cablepath.destination }} ({{ cablepath.destination.parent }}) | 
					
						
							|  |  |  |                         </a> | 
					
						
							| 
									
										
										
										
											2020-10-05 16:03:30 -04:00
										 |  |  |                     </li> | 
					
						
							|  |  |  |                 {% endfor %} | 
					
						
							|  |  |  |             </ul> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-02 14:54:16 -04:00
										 |  |  |         </div> | 
					
						
							| 
									
										
										
										
											2020-04-15 17:09:04 -04:00
										 |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2018-10-30 16:30:03 -04:00
										 |  |  | {% endblock %} |