| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  | {% extends '_base.html' %} | 
					
						
							| 
									
										
										
										
											2019-12-06 16:13:52 -05:00
										 |  |  | {% load buttons %} | 
					
						
							| 
									
										
										
										
											2018-11-02 14:42:15 -04:00
										 |  |  | {% load static %} | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  | {% load helpers %} | 
					
						
							| 
									
										
										
										
											2019-04-15 17:12:41 -04:00
										 |  |  | {% load custom_links %} | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-06-14 16:15:14 -04:00
										 |  |  | {% block title %}{{ device }}{% endblock %} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  | {% block header %} | 
					
						
							| 
									
										
										
										
											2019-03-05 15:42:47 -06:00
										 |  |  |     <div class="row noprint"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |         <div class="col-sm-8 col-md-9"> | 
					
						
							|  |  |  |         <ol class="breadcrumb"> | 
					
						
							|  |  |  |             <li><a href="{% url 'dcim:site' slug=device.site.slug %}">{{ device.site }}</a></li> | 
					
						
							|  |  |  |             {% if device.rack %} | 
					
						
							|  |  |  |                 <li><a href="{% url 'dcim:rack_list' %}?site={{ device.site.slug }}">Racks</a></li> | 
					
						
							|  |  |  |                 <li><a href="{% url 'dcim:rack' pk=device.rack.pk %}">{{ device.rack }}</a></li> | 
					
						
							|  |  |  |             {% endif %} | 
					
						
							|  |  |  |             {% if device.parent_bay %} | 
					
						
							|  |  |  |                 <li><a href="{% url 'dcim:device' pk=device.parent_bay.device.pk %}">{{ device.parent_bay.device }}</a></li> | 
					
						
							|  |  |  |                 <li>{{ device.parent_bay }}</li> | 
					
						
							|  |  |  |             {% endif %} | 
					
						
							|  |  |  |             <li>{{ device }}</li> | 
					
						
							|  |  |  |         </ol> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |         <div class="col-sm-4 col-md-3"> | 
					
						
							|  |  |  |             <form action="{% url 'dcim:device_list' %}" method="get"> | 
					
						
							|  |  |  |                 <div class="input-group"> | 
					
						
							|  |  |  |                     <input type="text" name="q" class="form-control" placeholder="Search devices" /> | 
					
						
							|  |  |  |                     <span class="input-group-btn"> | 
					
						
							|  |  |  |                         <button type="submit" class="btn btn-primary"> | 
					
						
							|  |  |  |                             <span class="fa fa-search" aria-hidden="true"></span> | 
					
						
							|  |  |  |                         </button> | 
					
						
							|  |  |  |                     </span> | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |             </form> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2019-03-05 15:42:47 -06:00
										 |  |  |     <div class="pull-right noprint"> | 
					
						
							| 
									
										
										
										
											2019-09-18 15:59:52 -04:00
										 |  |  |         {% if show_graphs %} | 
					
						
							|  |  |  |             <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#graphs_modal" data-obj="{{ device.name }}" data-url="{% url 'dcim-api:device-graphs' pk=device.pk %}" title="Show graphs"> | 
					
						
							|  |  |  |                 <i class="fa fa-signal" aria-hidden="true"></i> | 
					
						
							|  |  |  |                 Graphs | 
					
						
							|  |  |  |             </button> | 
					
						
							|  |  |  |         {% endif %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |         {% if perms.dcim.change_device %} | 
					
						
							| 
									
										
										
										
											2018-10-26 14:48:22 -04:00
										 |  |  |             <div class="btn-group"> | 
					
						
							| 
									
										
										
										
											2018-11-12 12:04:04 -05:00
										 |  |  |                 <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | 
					
						
							| 
									
										
										
										
											2018-10-26 14:48:22 -04:00
										 |  |  |                     <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add Components <span class="caret"></span> | 
					
						
							|  |  |  |                 </button> | 
					
						
							|  |  |  |                 <ul class="dropdown-menu"> | 
					
						
							| 
									
										
										
										
											2020-02-05 12:36:38 -05:00
										 |  |  |                     {% if perms.dcim.add_consoleport %} | 
					
						
							|  |  |  |                         <li><a href="{% url 'dcim:consoleport_add' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}">Console Ports</a></li> | 
					
						
							|  |  |  |                     {% endif %} | 
					
						
							|  |  |  |                     {% if perms.dcim.add_consoleserverport %} | 
					
						
							|  |  |  |                         <li><a href="{% url 'dcim:consoleserverport_add' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}">Console Server Ports</a></li> | 
					
						
							|  |  |  |                     {% endif %} | 
					
						
							|  |  |  |                     {% if perms.dcim.add_powerport %} | 
					
						
							|  |  |  |                         <li><a href="{% url 'dcim:powerport_add' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}">Power Ports</a></li> | 
					
						
							|  |  |  |                     {% endif %} | 
					
						
							|  |  |  |                     {% if perms.dcim.add_poweroutlet %} | 
					
						
							|  |  |  |                         <li><a href="{% url 'dcim:poweroutlet_add' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}">Power Outlets</a></li> | 
					
						
							|  |  |  |                     {% endif %} | 
					
						
							|  |  |  |                     {% if perms.dcim.add_interface %} | 
					
						
							|  |  |  |                         <li><a href="{% url 'dcim:interface_add' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}">Interfaces</a></li> | 
					
						
							|  |  |  |                     {% endif %} | 
					
						
							|  |  |  |                     {% if perms.dcim.add_frontport %} | 
					
						
							|  |  |  |                         <li><a href="{% url 'dcim:frontport_add' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}">Front Ports</a></li> | 
					
						
							|  |  |  |                     {% endif %} | 
					
						
							|  |  |  |                     {% if perms.dcim.add_rearport %} | 
					
						
							|  |  |  |                         <li><a href="{% url 'dcim:rearport_add' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}">Rear Ports</a></li> | 
					
						
							|  |  |  |                     {% endif %} | 
					
						
							|  |  |  |                     {% if perms.dcim.add_devicebay %} | 
					
						
							|  |  |  |                         <li><a href="{% url 'dcim:devicebay_add' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}">Device Bays</a></li> | 
					
						
							|  |  |  |                     {% endif %} | 
					
						
							| 
									
										
										
										
											2018-10-26 14:48:22 -04:00
										 |  |  |                 </ul> | 
					
						
							|  |  |  |             </div> | 
					
						
							| 
									
										
										
										
											2019-12-06 16:13:52 -05:00
										 |  |  |         {% endif %} | 
					
						
							|  |  |  |         {% if perms.dcim.add_device %} | 
					
						
							| 
									
										
										
										
											2019-12-13 15:29:55 -05:00
										 |  |  |             {% clone_button device %} | 
					
						
							| 
									
										
										
										
											2019-12-06 16:13:52 -05:00
										 |  |  |         {% endif %} | 
					
						
							|  |  |  |         {% if perms.dcim.change_device %} | 
					
						
							| 
									
										
										
										
											2019-12-13 15:29:55 -05:00
										 |  |  |             {% edit_button device %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |         {% endif %} | 
					
						
							|  |  |  |         {% if perms.dcim.delete_device %} | 
					
						
							| 
									
										
										
										
											2019-12-13 15:29:55 -05:00
										 |  |  |             {% delete_button device %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |         {% endif %} | 
					
						
							|  |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2018-06-14 16:15:14 -04:00
										 |  |  |     <h1>{{ device }}</h1> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |     {% include 'inc/created_updated.html' with obj=device %} | 
					
						
							| 
									
										
										
										
											2019-04-15 17:12:41 -04:00
										 |  |  |     <div class="pull-right noprint"> | 
					
						
							|  |  |  |         {% custom_links device %} | 
					
						
							|  |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2018-06-14 16:15:14 -04:00
										 |  |  |     <ul class="nav nav-tabs"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |         <li role="presentation"{% if not active_tab %} class="active"{% endif %}> | 
					
						
							| 
									
										
										
										
											2018-06-14 16:15:14 -04:00
										 |  |  |             <a href="{% url 'dcim:device' pk=device.pk %}">Device</a> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |         </li> | 
					
						
							|  |  |  |         <li role="presentation"{% if active_tab == 'inventory' %} class="active"{% endif %}> | 
					
						
							| 
									
										
										
										
											2018-08-16 10:20:22 -04:00
										 |  |  |             <a href="{% url 'dcim:device_inventory' pk=device.pk %}"> | 
					
						
							|  |  |  |                 Inventory <span class="badge">{{ device.inventory_items.count }}</span> | 
					
						
							|  |  |  |             </a> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |         </li> | 
					
						
							|  |  |  |         {% if perms.dcim.napalm_read %} | 
					
						
							| 
									
										
										
										
											2020-01-21 00:30:47 -05:00
										 |  |  |             {% if device.status != 'active' %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                 {% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='Device must be in active status' %} | 
					
						
							|  |  |  |             {% elif not device.platform %} | 
					
						
							|  |  |  |                 {% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='No platform assigned to this device' %} | 
					
						
							|  |  |  |             {% elif not device.platform.napalm_driver %} | 
					
						
							|  |  |  |                 {% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='No NAPALM driver assigned for this platform' %} | 
					
						
							|  |  |  |             {% elif not device.primary_ip %} | 
					
						
							|  |  |  |                 {% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='No primary IP address assigned to this device' %} | 
					
						
							|  |  |  |             {% else %} | 
					
						
							|  |  |  |                 {% include 'dcim/inc/device_napalm_tabs.html' %} | 
					
						
							|  |  |  |             {% endif %} | 
					
						
							|  |  |  |         {% endif %} | 
					
						
							| 
									
										
										
										
											2019-04-12 09:29:36 -04:00
										 |  |  |         {% if perms.extras.view_configcontext %} | 
					
						
							|  |  |  |             <li role="presentation"{% if active_tab == 'config-context' %} class="active"{% endif %}> | 
					
						
							|  |  |  |                 <a href="{% url 'dcim:device_configcontext' pk=device.pk %}">Config Context</a> | 
					
						
							|  |  |  |             </li> | 
					
						
							|  |  |  |         {% endif %} | 
					
						
							|  |  |  |         {% if perms.extras.view_objectchange %} | 
					
						
							|  |  |  |             <li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}> | 
					
						
							| 
									
										
										
										
											2020-02-19 12:45:52 -05:00
										 |  |  |                 <a href="{% url 'dcim:device_changelog' pk=device.pk %}">Change Log</a> | 
					
						
							| 
									
										
										
										
											2019-04-12 09:29:36 -04:00
										 |  |  |             </li> | 
					
						
							|  |  |  |         {% endif %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |     </ul> | 
					
						
							|  |  |  | {% endblock %} | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | {% block content %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |     <div class="row"> | 
					
						
							|  |  |  |         <div class="col-md-6"> | 
					
						
							|  |  |  |             <div class="panel panel-default"> | 
					
						
							|  |  |  |                 <div class="panel-heading"> | 
					
						
							|  |  |  |                     <strong>Device</strong> | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |                 <table class="table table-hover panel-body attr-table"> | 
					
						
							|  |  |  |                     <tr> | 
					
						
							|  |  |  |                         <td>Site</td> | 
					
						
							|  |  |  |                         <td> | 
					
						
							|  |  |  |                             {% if device.site.region %} | 
					
						
							|  |  |  |                                 <a href="{{ device.site.region.get_absolute_url }}">{{ device.site.region }}</a> | 
					
						
							| 
									
										
										
										
											2017-02-28 12:11:43 -05:00
										 |  |  |                                 <i class="fa fa-angle-right"></i> | 
					
						
							|  |  |  |                             {% endif %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                             <a href="{% url 'dcim:site' slug=device.site.slug %}">{{ device.site }}</a> | 
					
						
							|  |  |  |                         </td> | 
					
						
							|  |  |  |                     </tr> | 
					
						
							|  |  |  |                     <tr> | 
					
						
							|  |  |  |                         <td>Rack</td> | 
					
						
							|  |  |  |                         <td> | 
					
						
							|  |  |  |                             {% if device.rack %} | 
					
						
							|  |  |  |                                 {% if device.rack.group %} | 
					
						
							|  |  |  |                                     <a href="{{ device.rack.group.get_absolute_url }}">{{ device.rack.group }}</a> | 
					
						
							|  |  |  |                                     <i class="fa fa-angle-right"></i> | 
					
						
							| 
									
										
										
										
											2017-03-13 11:25:06 -04:00
										 |  |  |                                 {% endif %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 <a href="{% url 'dcim:rack' pk=device.rack.pk %}">{{ device.rack }}</a> | 
					
						
							|  |  |  |                             {% else %} | 
					
						
							|  |  |  |                                 <span class="text-muted">None</span> | 
					
						
							| 
									
										
										
										
											2017-02-28 12:11:43 -05:00
										 |  |  |                             {% endif %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                         </td> | 
					
						
							|  |  |  |                     </tr> | 
					
						
							|  |  |  |                     <tr> | 
					
						
							|  |  |  |                         <td>Position</td> | 
					
						
							|  |  |  |                         <td> | 
					
						
							|  |  |  |                             {% if device.parent_bay %} | 
					
						
							|  |  |  |                                 {% with device.parent_bay.device as parent %} | 
					
						
							|  |  |  |                                     <a href="{{ parent.get_absolute_url }}">{{ parent }}</a> <i class="fa fa-angle-right"></i> {{ device.parent_bay }} | 
					
						
							|  |  |  |                                     {% if parent.position %} | 
					
						
							|  |  |  |                                         (U{{ parent.position }} / {{ parent.get_face_display }}) | 
					
						
							|  |  |  |                                     {% endif %} | 
					
						
							|  |  |  |                                 {% endwith %} | 
					
						
							|  |  |  |                             {% elif device.rack and device.position %} | 
					
						
							|  |  |  |                                 <span>U{{ device.position }} / {{ device.get_face_display }}</span> | 
					
						
							|  |  |  |                             {% elif device.rack and device.device_type.u_height %} | 
					
						
							|  |  |  |                                 <span class="label label-warning">Not racked</span> | 
					
						
							|  |  |  |                             {% else %} | 
					
						
							| 
									
										
										
										
											2018-11-05 13:00:46 -05:00
										 |  |  |                                 <span class="text-muted">—</span> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                             {% endif %} | 
					
						
							|  |  |  |                         </td> | 
					
						
							|  |  |  |                     </tr> | 
					
						
							|  |  |  |                     <tr> | 
					
						
							|  |  |  |                         <td>Tenant</td> | 
					
						
							|  |  |  |                         <td> | 
					
						
							|  |  |  |                             {% if device.tenant %} | 
					
						
							|  |  |  |                                 {% if device.tenant.group %} | 
					
						
							|  |  |  |                                     <a href="{{ device.tenant.group.get_absolute_url }}">{{ device.tenant.group }}</a> | 
					
						
							|  |  |  |                                     <i class="fa fa-angle-right"></i> | 
					
						
							|  |  |  |                                 {% endif %} | 
					
						
							|  |  |  |                                 <a href="{{ device.tenant.get_absolute_url }}">{{ device.tenant }}</a> | 
					
						
							|  |  |  |                             {% else %} | 
					
						
							|  |  |  |                                 <span class="text-muted">None</span> | 
					
						
							|  |  |  |                             {% endif %} | 
					
						
							|  |  |  |                         </td> | 
					
						
							|  |  |  |                     </tr> | 
					
						
							|  |  |  |                     <tr> | 
					
						
							|  |  |  |                         <td>Device Type</td> | 
					
						
							|  |  |  |                         <td> | 
					
						
							| 
									
										
										
										
											2019-02-06 10:23:30 -05:00
										 |  |  |                             <span><a href="{% url 'dcim:devicetype' pk=device.device_type.pk %}">{{ device.device_type.display_name }}</a> ({{ device.device_type.u_height }}U)</span> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                         </td> | 
					
						
							|  |  |  |                     </tr> | 
					
						
							|  |  |  |                     <tr> | 
					
						
							|  |  |  |                         <td>Serial Number</td> | 
					
						
							| 
									
										
										
										
											2018-11-05 13:00:46 -05:00
										 |  |  |                         <td><span>{{ device.serial|placeholder }}</span></td> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                     </tr> | 
					
						
							|  |  |  |                     <tr> | 
					
						
							|  |  |  |                         <td>Asset Tag</td> | 
					
						
							| 
									
										
										
										
											2018-11-05 13:00:46 -05:00
										 |  |  |                         <td><span>{{ device.asset_tag|placeholder }}</span></td> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                     </tr> | 
					
						
							|  |  |  |                 </table> | 
					
						
							|  |  |  |             </div> | 
					
						
							|  |  |  |             {% if vc_members %} | 
					
						
							|  |  |  |                 <div class="panel panel-default"> | 
					
						
							|  |  |  |                     <div class="panel-heading"> | 
					
						
							|  |  |  |                         <strong>Virtual Chassis</strong> | 
					
						
							|  |  |  |                     </div> | 
					
						
							|  |  |  |                     <table class="table table-hover panel-body attr-table"> | 
					
						
							|  |  |  |                         <tr> | 
					
						
							|  |  |  |                             <th>Device</th> | 
					
						
							|  |  |  |                             <th>Position</th> | 
					
						
							|  |  |  |                             <th>Master</th> | 
					
						
							|  |  |  |                             <th>Priority</th> | 
					
						
							|  |  |  |                         </tr> | 
					
						
							|  |  |  |                         {% for vc_member in vc_members %} | 
					
						
							|  |  |  |                             <tr{% if vc_member == device %} class="info"{% endif %}> | 
					
						
							|  |  |  |                                 <td> | 
					
						
							|  |  |  |                                     <a href="{{ vc_member.get_absolute_url }}">{{ vc_member }}</a> | 
					
						
							|  |  |  |                                 </td> | 
					
						
							|  |  |  |                                 <td><span class="badge badge-default">{{ vc_member.vc_position }}</span></td> | 
					
						
							|  |  |  |                                 <td>{% if device.virtual_chassis.master == vc_member %}<i class="fa fa-check"></i>{% endif %}</td> | 
					
						
							|  |  |  |                                 <td>{{ vc_member.vc_priority|default:"" }}</td> | 
					
						
							|  |  |  |                             </tr> | 
					
						
							|  |  |  |                         {% endfor %} | 
					
						
							|  |  |  |                     </table> | 
					
						
							| 
									
										
										
										
											2019-03-05 15:42:47 -06:00
										 |  |  |                     <div class="panel-footer text-right noprint"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                         {% if perms.dcim.change_virtualchassis %} | 
					
						
							|  |  |  |                             <a href="{% url 'dcim:virtualchassis_add_member' pk=device.virtual_chassis.pk %}?site={{ device.site.pk }}&rack={{ device.rack.pk }}&return_url={{ device.get_absolute_url }}" class="btn btn-primary btn-xs"> | 
					
						
							|  |  |  |                                 <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add Member | 
					
						
							|  |  |  |                             </a> | 
					
						
							|  |  |  |                             <a href="{% url 'dcim:virtualchassis_edit' pk=device.virtual_chassis.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-warning btn-xs"> | 
					
						
							|  |  |  |                                 <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit Virtual Chassis | 
					
						
							|  |  |  |                             </a> | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |                         {% endif %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                         {% if perms.dcim.delete_virtualchassis %} | 
					
						
							|  |  |  |                             <a href="{% url 'dcim:virtualchassis_delete' pk=device.virtual_chassis.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs"> | 
					
						
							|  |  |  |                                 <span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete Virtual Chassis | 
					
						
							|  |  |  |                             </a> | 
					
						
							| 
									
										
										
										
											2016-08-11 11:58:21 -04:00
										 |  |  |                         {% endif %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                     </div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |             {% endif %} | 
					
						
							| 
									
										
										
										
											2017-11-29 12:58:36 -05:00
										 |  |  |             <div class="panel panel-default"> | 
					
						
							|  |  |  |                 <div class="panel-heading"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                     <strong>Management</strong> | 
					
						
							| 
									
										
										
										
											2017-11-29 12:58:36 -05:00
										 |  |  |                 </div> | 
					
						
							|  |  |  |                 <table class="table table-hover panel-body attr-table"> | 
					
						
							|  |  |  |                     <tr> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                         <td>Role</td> | 
					
						
							|  |  |  |                         <td> | 
					
						
							| 
									
										
										
										
											2018-07-18 17:51:57 -04:00
										 |  |  |                             <a href="{% url 'dcim:device_list' %}?role={{ device.device_role.slug }}">{{ device.device_role }}</a> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                         </td> | 
					
						
							| 
									
										
										
										
											2017-11-29 12:58:36 -05:00
										 |  |  |                     </tr> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                     <tr> | 
					
						
							|  |  |  |                         <td>Platform</td> | 
					
						
							|  |  |  |                         <td> | 
					
						
							|  |  |  |                             {% if device.platform %} | 
					
						
							| 
									
										
										
										
											2019-08-19 09:50:41 -04:00
										 |  |  |                                <a href="{{ device.platform.get_absolute_url }}">{{ device.platform }}</a> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                             {% else %} | 
					
						
							|  |  |  |                                 <span class="text-muted">None</span> | 
					
						
							| 
									
										
										
										
											2016-07-11 16:24:46 -04:00
										 |  |  |                             {% endif %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                         </td> | 
					
						
							|  |  |  |                     </tr> | 
					
						
							|  |  |  |                     <tr> | 
					
						
							|  |  |  |                         <td>Status</td> | 
					
						
							|  |  |  |                         <td> | 
					
						
							|  |  |  |                             <span class="label label-{{ device.get_status_class }}">{{ device.get_status_display }}</span> | 
					
						
							|  |  |  |                         </td> | 
					
						
							|  |  |  |                     </tr> | 
					
						
							|  |  |  |                     <tr> | 
					
						
							|  |  |  |                         <td>Primary IPv4</td> | 
					
						
							|  |  |  |                         <td> | 
					
						
							|  |  |  |                             {% if device.primary_ip4 %} | 
					
						
							|  |  |  |                                 <a href="{% url 'ipam:ipaddress' pk=device.primary_ip4.pk %}">{{ device.primary_ip4.address.ip }}</a> | 
					
						
							|  |  |  |                                 {% if device.primary_ip4.nat_inside %} | 
					
						
							|  |  |  |                                     <span>(NAT for {{ device.primary_ip4.nat_inside.address.ip }})</span> | 
					
						
							|  |  |  |                                 {% elif device.primary_ip4.nat_outside %} | 
					
						
							|  |  |  |                                     <span>(NAT: {{ device.primary_ip4.nat_outside.address.ip }})</span> | 
					
						
							|  |  |  |                                 {% endif %} | 
					
						
							|  |  |  |                             {% else %} | 
					
						
							| 
									
										
										
										
											2018-11-05 13:00:46 -05:00
										 |  |  |                                 <span class="text-muted">—</span> | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |                             {% endif %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                         </td> | 
					
						
							|  |  |  |                     </tr> | 
					
						
							| 
									
										
										
										
											2017-09-28 10:21:41 -04:00
										 |  |  |                     <tr> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                         <td>Primary IPv6</td> | 
					
						
							| 
									
										
										
										
											2017-09-28 10:21:41 -04:00
										 |  |  |                         <td> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                             {% if device.primary_ip6 %} | 
					
						
							|  |  |  |                                 <a href="{% url 'ipam:ipaddress' pk=device.primary_ip6.pk %}">{{ device.primary_ip6.address.ip }}</a> | 
					
						
							|  |  |  |                                 {% if device.primary_ip6.nat_inside %} | 
					
						
							|  |  |  |                                     <span>(NAT for {{ device.primary_ip6.nat_inside.address.ip }})</span> | 
					
						
							|  |  |  |                                 {% elif device.primary_ip6.nat_outside %} | 
					
						
							|  |  |  |                                     <span>(NAT: {{ device.primary_ip6.nat_outside.address.ip }})</span> | 
					
						
							|  |  |  |                                 {% endif %} | 
					
						
							|  |  |  |                             {% else %} | 
					
						
							| 
									
										
										
										
											2018-11-05 13:00:46 -05:00
										 |  |  |                                 <span class="text-muted">—</span> | 
					
						
							| 
									
										
										
										
											2017-09-28 10:21:41 -04:00
										 |  |  |                             {% endif %} | 
					
						
							|  |  |  |                         </td> | 
					
						
							|  |  |  |                     </tr> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                     {% if device.cluster %} | 
					
						
							| 
									
										
										
										
											2017-02-17 15:10:08 -05:00
										 |  |  |                         <tr> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                             <td>Cluster</td> | 
					
						
							|  |  |  |                             <td> | 
					
						
							|  |  |  |                                 {% if device.cluster.group %} | 
					
						
							|  |  |  |                                     <a href="{{ device.cluster.group.get_absolute_url }}">{{ device.cluster.group }}</a> | 
					
						
							|  |  |  |                                     <i class="fa fa-angle-right"></i> | 
					
						
							| 
									
										
										
										
											2017-02-17 15:10:08 -05:00
										 |  |  |                                 {% endif %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 <a href="{{ device.cluster.get_absolute_url }}">{{ device.cluster }}</a> | 
					
						
							| 
									
										
										
										
											2017-02-17 15:10:08 -05:00
										 |  |  |                             </td> | 
					
						
							|  |  |  |                         </tr> | 
					
						
							|  |  |  |                     {% endif %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                 </table> | 
					
						
							|  |  |  |             </div> | 
					
						
							| 
									
										
										
										
											2018-07-20 19:56:04 -04:00
										 |  |  |             {% include 'inc/custom_fields_panel.html' with obj=device %} | 
					
						
							| 
									
										
										
										
											2018-07-10 10:48:33 -04:00
										 |  |  |             {% include 'extras/inc/tags_panel.html' with tags=device.tags.all url='dcim:device_list' %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |             <div class="panel panel-default"> | 
					
						
							|  |  |  |                 <div class="panel-heading"> | 
					
						
							|  |  |  |                     <strong>Comments</strong> | 
					
						
							|  |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2018-11-13 11:02:48 -05:00
										 |  |  |                 <div class="panel-body rendered-markdown"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                     {% if device.comments %} | 
					
						
							|  |  |  |                         {{ device.comments|gfm }} | 
					
						
							|  |  |  |                     {% else %} | 
					
						
							|  |  |  |                         <span class="text-muted">None</span> | 
					
						
							| 
									
										
										
										
											2017-02-17 15:10:08 -05:00
										 |  |  |                     {% endif %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                 </div> | 
					
						
							|  |  |  |             </div> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |         <div class="col-md-6"> | 
					
						
							| 
									
										
										
										
											2018-10-26 14:48:22 -04:00
										 |  |  |             {% if console_ports or power_ports %} | 
					
						
							|  |  |  |                 <div class="panel panel-default"> | 
					
						
							|  |  |  |                     <div class="panel-heading"> | 
					
						
							|  |  |  |                         <strong>Console / Power</strong> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                     </div> | 
					
						
							| 
									
										
										
										
											2018-10-26 14:48:22 -04:00
										 |  |  |                     <table class="table table-hover panel-body component-list"> | 
					
						
							|  |  |  |                         {% for cp in console_ports %} | 
					
						
							|  |  |  |                             {% include 'dcim/inc/consoleport.html' %} | 
					
						
							|  |  |  |                         {% endfor %} | 
					
						
							|  |  |  |                         {% for pp in power_ports %} | 
					
						
							|  |  |  |                             {% include 'dcim/inc/powerport.html' %} | 
					
						
							|  |  |  |                         {% endfor %} | 
					
						
							|  |  |  |                     </table> | 
					
						
							|  |  |  |                     {% if perms.dcim.add_interface or perms.dcim.add_consoleport or perms.dcim.add_powerport %} | 
					
						
							| 
									
										
										
										
											2019-03-05 15:42:47 -06:00
										 |  |  |                         <div class="panel-footer text-right noprint"> | 
					
						
							| 
									
										
										
										
											2018-10-26 14:48:22 -04:00
										 |  |  |                             {% if perms.dcim.add_consoleport %} | 
					
						
							| 
									
										
										
										
											2020-02-05 12:36:38 -05:00
										 |  |  |                                 <a href="{% url 'dcim:consoleport_add' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}" class="btn btn-xs btn-primary"> | 
					
						
							| 
									
										
										
										
											2018-10-26 14:48:22 -04:00
										 |  |  |                                     <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add console port | 
					
						
							|  |  |  |                                 </a> | 
					
						
							|  |  |  |                             {% endif %} | 
					
						
							|  |  |  |                             {% if perms.dcim.add_powerport %} | 
					
						
							| 
									
										
										
										
											2020-02-05 12:36:38 -05:00
										 |  |  |                                 <a href="{% url 'dcim:powerport_add' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}" class="btn btn-xs btn-primary"> | 
					
						
							| 
									
										
										
										
											2018-10-26 14:48:22 -04:00
										 |  |  |                                     <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add power port | 
					
						
							| 
									
										
										
										
											2019-04-10 16:32:13 -04:00
										 |  |  |                                 </a> | 
					
						
							|  |  |  |                             {% endif %} | 
					
						
							|  |  |  |                         </div> | 
					
						
							|  |  |  |                     {% endif %} | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |             {% endif %} | 
					
						
							|  |  |  |             {% if power_ports and poweroutlets %} | 
					
						
							|  |  |  |                 <div class="panel panel-default"> | 
					
						
							|  |  |  |                     <div class="panel-heading"> | 
					
						
							|  |  |  |                         <strong>Power Utilization</strong> | 
					
						
							|  |  |  |                     </div> | 
					
						
							|  |  |  |                     <table class="table table-hover panel-body"> | 
					
						
							|  |  |  |                         <tr> | 
					
						
							|  |  |  |                             <th>Input</th> | 
					
						
							|  |  |  |                             <th>Outlets</th> | 
					
						
							| 
									
										
										
										
											2019-06-19 10:51:53 -04:00
										 |  |  |                             <th>Allocated</th> | 
					
						
							|  |  |  |                             <th>Available</th> | 
					
						
							|  |  |  |                             <th>Utilization</th> | 
					
						
							| 
									
										
										
										
											2019-04-10 16:32:13 -04:00
										 |  |  |                         </tr> | 
					
						
							|  |  |  |                         {% for pp in power_ports %} | 
					
						
							| 
									
										
										
										
											2019-06-19 10:51:53 -04:00
										 |  |  |                             {% with utilization=pp.get_power_draw powerfeed=pp.connected_endpoint %} | 
					
						
							| 
									
										
										
										
											2019-04-10 16:32:13 -04:00
										 |  |  |                                 <tr> | 
					
						
							| 
									
										
										
										
											2019-06-19 10:51:53 -04:00
										 |  |  |                                     <td>{{ pp }}</td> | 
					
						
							|  |  |  |                                     <td>{{ utilization.outlet_count }}</td> | 
					
						
							|  |  |  |                                     <td>{{ utilization.allocated }}VA</td> | 
					
						
							| 
									
										
										
										
											2019-06-24 10:05:21 -04:00
										 |  |  |                                     {% if powerfeed.available_power %} | 
					
						
							| 
									
										
										
										
											2019-06-19 10:51:53 -04:00
										 |  |  |                                         <td>{{ powerfeed.available_power }}VA</td> | 
					
						
							|  |  |  |                                         <td>{% utilization_graph utilization.allocated|percentage:powerfeed.available_power %}</td> | 
					
						
							| 
									
										
										
										
											2019-04-10 16:32:13 -04:00
										 |  |  |                                     {% else %} | 
					
						
							| 
									
										
										
										
											2019-06-19 10:51:53 -04:00
										 |  |  |                                         <td class="text-muted">—</td> | 
					
						
							|  |  |  |                                         <td class="text-muted">—</td> | 
					
						
							| 
									
										
										
										
											2019-04-10 16:32:13 -04:00
										 |  |  |                                     {% endif %} | 
					
						
							|  |  |  |                                 </tr> | 
					
						
							| 
									
										
										
										
											2019-06-19 10:51:53 -04:00
										 |  |  |                                 {% for leg in utilization.legs %} | 
					
						
							|  |  |  |                                     <tr> | 
					
						
							|  |  |  |                                         <td style="padding-left: 20px">Leg {{ leg.name }}</td> | 
					
						
							|  |  |  |                                         <td>{{ leg.outlet_count }}</td> | 
					
						
							|  |  |  |                                         <td>{{ leg.allocated }}</td> | 
					
						
							|  |  |  |                                         <td>{{ powerfeed.available_power|divide:3 }}VA</td> | 
					
						
							|  |  |  |                                         {% with phase_available=powerfeed.available_power|divide:3 %} | 
					
						
							|  |  |  |                                             <td>{% utilization_graph leg.allocated|percentage:phase_available %}</td> | 
					
						
							|  |  |  |                                         {% endwith %} | 
					
						
							|  |  |  |                                     </tr> | 
					
						
							|  |  |  |                                 {% endfor %} | 
					
						
							|  |  |  |                             {% endwith %} | 
					
						
							| 
									
										
										
										
											2019-04-10 16:32:13 -04:00
										 |  |  |                         {% endfor %} | 
					
						
							|  |  |  |                     </table> | 
					
						
							| 
									
										
										
										
											2018-10-26 14:48:22 -04:00
										 |  |  |                 </div> | 
					
						
							|  |  |  |             {% endif %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |             {% if request.user.is_authenticated %} | 
					
						
							|  |  |  |                 <div class="panel panel-default"> | 
					
						
							|  |  |  |                     <div class="panel-heading"> | 
					
						
							|  |  |  |                         <strong>Secrets</strong> | 
					
						
							|  |  |  |                     </div> | 
					
						
							|  |  |  |                     {% if secrets %} | 
					
						
							|  |  |  |                         <table class="table table-hover panel-body"> | 
					
						
							|  |  |  |                             {% for secret in secrets %} | 
					
						
							|  |  |  |                                 {% include 'secrets/inc/secret_tr.html' %} | 
					
						
							|  |  |  |                             {% endfor %} | 
					
						
							|  |  |  |                         </table> | 
					
						
							|  |  |  |                     {% else %} | 
					
						
							|  |  |  |                         <div class="panel-body text-muted"> | 
					
						
							|  |  |  |                             None found | 
					
						
							|  |  |  |                         </div> | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |                     {% endif %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                     {% if perms.secrets.add_secret %} | 
					
						
							|  |  |  |                         <form id="secret_form"> | 
					
						
							|  |  |  |                             {% csrf_token %} | 
					
						
							|  |  |  |                         </form> | 
					
						
							| 
									
										
										
										
											2019-03-05 15:42:47 -06:00
										 |  |  |                         <div class="panel-footer text-right noprint"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                             <a href="{% url 'dcim:device_addsecret' pk=device.pk %}" class="btn btn-xs btn-primary"> | 
					
						
							|  |  |  |                                 <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> | 
					
						
							|  |  |  |                                 Add secret | 
					
						
							|  |  |  |                             </a> | 
					
						
							|  |  |  |                         </div> | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |                     {% endif %} | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |             {% endif %} | 
					
						
							| 
									
										
										
										
											2017-11-03 16:58:56 -04:00
										 |  |  |             <div class="panel panel-default"> | 
					
						
							|  |  |  |                 <div class="panel-heading"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                     <strong>Services</strong> | 
					
						
							| 
									
										
										
										
											2017-11-03 16:58:56 -04:00
										 |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                 {% if services %} | 
					
						
							| 
									
										
										
										
											2017-11-03 16:58:56 -04:00
										 |  |  |                     <table class="table table-hover panel-body"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                         {% for service in services %} | 
					
						
							|  |  |  |                             {% include 'ipam/inc/service.html' %} | 
					
						
							| 
									
										
										
										
											2017-11-03 16:58:56 -04:00
										 |  |  |                         {% endfor %} | 
					
						
							|  |  |  |                     </table> | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |                 {% else %} | 
					
						
							| 
									
										
										
										
											2017-11-03 16:58:56 -04:00
										 |  |  |                     <div class="panel-body text-muted"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                         None | 
					
						
							| 
									
										
										
										
											2017-11-03 16:58:56 -04:00
										 |  |  |                     </div> | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |                 {% endif %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                 {% if perms.ipam.add_service %} | 
					
						
							| 
									
										
										
										
											2019-03-05 15:42:47 -06:00
										 |  |  |                     <div class="panel-footer text-right noprint"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                         <a href="{% url 'dcim:device_service_assign' device=device.pk %}" class="btn btn-xs btn-primary"> | 
					
						
							|  |  |  |                             <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Assign service | 
					
						
							| 
									
										
										
										
											2017-11-03 16:58:56 -04:00
										 |  |  |                         </a> | 
					
						
							|  |  |  |                     </div> | 
					
						
							|  |  |  |                 {% endif %} | 
					
						
							|  |  |  |             </div> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |             <div class="panel panel-default"> | 
					
						
							|  |  |  |                 <div class="panel-heading"> | 
					
						
							|  |  |  |                     <strong>Images</strong> | 
					
						
							| 
									
										
										
										
											2017-03-31 15:19:44 -04:00
										 |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                 {% include 'inc/image_attachments.html' with images=device.images.all %} | 
					
						
							|  |  |  |                 {% if perms.extras.add_imageattachment %} | 
					
						
							| 
									
										
										
										
											2019-03-05 15:42:47 -06:00
										 |  |  |                     <div class="panel-footer text-right noprint"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                         <a href="{% url 'dcim:device_add_image' object_id=device.pk %}" class="btn btn-primary btn-xs"> | 
					
						
							|  |  |  |                             <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> | 
					
						
							|  |  |  |                             Attach an image | 
					
						
							|  |  |  |                         </a> | 
					
						
							|  |  |  |                     </div> | 
					
						
							|  |  |  |                 {% endif %} | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |             </div> | 
					
						
							| 
									
										
										
										
											2019-03-05 15:42:47 -06:00
										 |  |  |             <div class="panel panel-default noprint"> | 
					
						
							| 
									
										
										
										
											2016-07-01 17:12:43 -04:00
										 |  |  |                 <div class="panel-heading"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                     <strong>Related Devices</strong> | 
					
						
							| 
									
										
										
										
											2016-07-01 17:12:43 -04:00
										 |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                 {% if related_devices %} | 
					
						
							|  |  |  |                     <table class="table table-hover panel-body"> | 
					
						
							|  |  |  |                         {% for rd in related_devices %} | 
					
						
							| 
									
										
										
										
											2017-12-21 13:29:02 -05:00
										 |  |  |                             <tr> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 <td> | 
					
						
							|  |  |  |                                     <a href="{% url 'dcim:device' pk=rd.pk %}">{{ rd }}</a> | 
					
						
							|  |  |  |                                 </td> | 
					
						
							|  |  |  |                                 <td> | 
					
						
							|  |  |  |                                     {% if rd.rack %} | 
					
						
							|  |  |  |                                         <a href="{% url 'dcim:rack' pk=rd.rack.pk %}">Rack {{ rd.rack }}</a> | 
					
						
							|  |  |  |                                     {% else %} | 
					
						
							|  |  |  |                                         <span class="text-muted">—</span> | 
					
						
							|  |  |  |                                     {% endif %} | 
					
						
							|  |  |  |                                 </td> | 
					
						
							| 
									
										
										
										
											2019-02-06 10:23:30 -05:00
										 |  |  |                                 <td>{{ rd.device_type.display_name }}</td> | 
					
						
							| 
									
										
										
										
											2017-12-21 13:29:02 -05:00
										 |  |  |                             </tr> | 
					
						
							|  |  |  |                         {% endfor %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                     </table> | 
					
						
							|  |  |  |                 {% else %} | 
					
						
							|  |  |  |                     <div class="panel-body text-muted">None found</div> | 
					
						
							|  |  |  |                 {% endif %} | 
					
						
							| 
									
										
										
										
											2016-07-01 17:12:43 -04:00
										 |  |  |             </div> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |         </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  |     <div class="row"> | 
					
						
							|  |  |  |         <div class="col-md-12"> | 
					
						
							|  |  |  |             {% if device_bays or device.device_type.is_parent_device %} | 
					
						
							|  |  |  |                 {% if perms.dcim.delete_devicebay %} | 
					
						
							| 
									
										
										
										
											2018-08-20 14:40:19 -04:00
										 |  |  |                     <form method="post"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                     {% csrf_token %} | 
					
						
							|  |  |  |                 {% endif %} | 
					
						
							|  |  |  |                 <div class="panel panel-default"> | 
					
						
							|  |  |  |                     <div class="panel-heading"> | 
					
						
							|  |  |  |                         <strong>Device Bays</strong> | 
					
						
							| 
									
										
										
										
											2016-10-19 15:45:26 -04:00
										 |  |  |                     </div> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                     <table class="table table-hover table-headings panel-body component-list"> | 
					
						
							|  |  |  |                         <thead> | 
					
						
							| 
									
										
										
										
											2017-12-21 13:29:02 -05:00
										 |  |  |                             <tr> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 {% if perms.dcim.change_devicebay or perms.dcim.delete_devicebay %} | 
					
						
							|  |  |  |                                     <th class="pk"><input type="checkbox" class="toggle" title="Toggle all" /></th> | 
					
						
							|  |  |  |                                 {% endif %} | 
					
						
							|  |  |  |                                 <th>Name</th> | 
					
						
							| 
									
										
										
										
											2018-07-16 12:03:32 -04:00
										 |  |  |                                 <th>Status</th> | 
					
						
							| 
									
										
										
										
											2019-02-20 14:34:05 -05:00
										 |  |  |                                 <th>Description</th> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 <th colspan="2">Installed Device</th> | 
					
						
							|  |  |  |                                 <th></th> | 
					
						
							| 
									
										
										
										
											2017-12-21 13:29:02 -05:00
										 |  |  |                             </tr> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                         </thead> | 
					
						
							|  |  |  |                         <tbody> | 
					
						
							|  |  |  |                             {% for devicebay in device_bays %} | 
					
						
							|  |  |  |                                 {% include 'dcim/inc/devicebay.html' %} | 
					
						
							|  |  |  |                             {% empty %} | 
					
						
							|  |  |  |                                 <tr> | 
					
						
							|  |  |  |                                     <td colspan="5" class="text-center text-muted">— No device bays defined —</td> | 
					
						
							|  |  |  |                                 </tr> | 
					
						
							|  |  |  |                             {% endfor %} | 
					
						
							|  |  |  |                         </tbody> | 
					
						
							|  |  |  |                     </table> | 
					
						
							| 
									
										
										
										
											2019-03-05 15:42:47 -06:00
										 |  |  |                     <div class="panel-footer noprint"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                         {% if device_bays and perms.dcim.change_devicebay %} | 
					
						
							|  |  |  |                             <button type="submit" name="_rename" formaction="{% url 'dcim:devicebay_bulk_rename' %}?return_url={{ device.get_absolute_url }}" class="btn btn-warning btn-xs"> | 
					
						
							|  |  |  |                                 <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Rename | 
					
						
							|  |  |  |                             </button> | 
					
						
							|  |  |  |                         {% endif %} | 
					
						
							|  |  |  |                         {% if device_bays and perms.dcim.delete_devicebay %} | 
					
						
							| 
									
										
										
										
											2020-02-04 16:06:55 -05:00
										 |  |  |                             <button type="submit" formaction="{% url 'dcim:devicebay_bulk_delete' %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 <span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete selected | 
					
						
							|  |  |  |                             </button> | 
					
						
							|  |  |  |                         {% endif %} | 
					
						
							|  |  |  |                         {% if perms.dcim.add_devicebay %} | 
					
						
							|  |  |  |                             <div class="pull-right"> | 
					
						
							| 
									
										
										
										
											2020-02-05 12:36:38 -05:00
										 |  |  |                                 <a href="{% url 'dcim:devicebay_add' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}" class="btn btn-primary btn-xs"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                     <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add device bays | 
					
						
							|  |  |  |                                 </a> | 
					
						
							|  |  |  |                             </div> | 
					
						
							|  |  |  |                             <div class="clearfix"></div> | 
					
						
							|  |  |  |                         {% endif %} | 
					
						
							|  |  |  |                      </div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |                 {% if perms.dcim.delete_devicebay %} | 
					
						
							|  |  |  |                     </form> | 
					
						
							|  |  |  |                 {% endif %} | 
					
						
							|  |  |  |             {% endif %} | 
					
						
							| 
									
										
										
										
											2018-10-26 14:48:22 -04:00
										 |  |  |             {% if interfaces %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                 {% if perms.dcim.change_interface or perms.dcim.delete_interface %} | 
					
						
							|  |  |  |                     <form method="post"> | 
					
						
							|  |  |  |                     {% csrf_token %} | 
					
						
							|  |  |  |                     <input type="hidden" name="device" value="{{ device.pk }}" /> | 
					
						
							|  |  |  |                 {% endif %} | 
					
						
							|  |  |  |                 <div class="panel panel-default"> | 
					
						
							|  |  |  |                     <div class="panel-heading"> | 
					
						
							|  |  |  |                         <strong>Interfaces</strong> | 
					
						
							| 
									
										
										
										
											2019-03-05 15:42:47 -06:00
										 |  |  |                         <div class="pull-right noprint"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                             <button class="btn btn-default btn-xs toggle-ips" selected="selected"> | 
					
						
							|  |  |  |                                 <span class="glyphicon glyphicon-check" aria-hidden="true"></span> Show IPs | 
					
						
							|  |  |  |                             </button> | 
					
						
							| 
									
										
										
										
											2018-01-10 15:48:07 -05:00
										 |  |  |                         </div> | 
					
						
							| 
									
										
										
										
											2020-01-03 19:38:51 +00:00
										 |  |  |                         <div class="col-md-2 pull-right noprint"> | 
					
						
							| 
									
										
										
										
											2020-01-06 23:33:18 +00:00
										 |  |  |                             <input class="form-control interface-filter" type="text" placeholder="Filter" title="RegEx-enabled" style="height: 23px" /> | 
					
						
							| 
									
										
										
										
											2020-01-03 19:38:51 +00:00
										 |  |  |                         </div> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                     </div> | 
					
						
							|  |  |  |                     <table id="interfaces_table" class="table table-hover table-headings panel-body component-list"> | 
					
						
							|  |  |  |                         <thead> | 
					
						
							| 
									
										
										
										
											2017-12-21 13:29:02 -05:00
										 |  |  |                             <tr> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 {% if perms.dcim.change_interface or perms.dcim.delete_interface %} | 
					
						
							|  |  |  |                                     <th class="pk"><input type="checkbox" class="toggle" title="Toggle all" /></th> | 
					
						
							|  |  |  |                                 {% endif %} | 
					
						
							|  |  |  |                                 <th>Name</th> | 
					
						
							|  |  |  |                                 <th>LAG</th> | 
					
						
							|  |  |  |                                 <th>Description</th> | 
					
						
							| 
									
										
										
										
											2018-11-13 14:18:00 -05:00
										 |  |  |                                 <th>MTU</th> | 
					
						
							| 
									
										
										
										
											2018-07-11 15:30:54 -04:00
										 |  |  |                                 <th>Mode</th> | 
					
						
							| 
									
										
										
										
											2018-10-26 11:29:03 -04:00
										 |  |  |                                 <th>Cable</th> | 
					
						
							| 
									
										
										
										
											2018-10-26 13:21:43 -04:00
										 |  |  |                                 <th colspan="2">Connection</th> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 <th></th> | 
					
						
							| 
									
										
										
										
											2017-12-21 13:29:02 -05:00
										 |  |  |                             </tr> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                         </thead> | 
					
						
							|  |  |  |                         <tbody> | 
					
						
							|  |  |  |                             {% for iface in interfaces %} | 
					
						
							|  |  |  |                                 {% include 'dcim/inc/interface.html' %} | 
					
						
							|  |  |  |                             {% endfor %} | 
					
						
							|  |  |  |                         </tbody> | 
					
						
							|  |  |  |                     </table> | 
					
						
							| 
									
										
										
										
											2019-03-05 15:42:47 -06:00
										 |  |  |                     <div class="panel-footer noprint"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                         {% if interfaces and perms.dcim.change_interface %} | 
					
						
							|  |  |  |                             <button type="submit" name="_rename" formaction="{% url 'dcim:interface_bulk_rename' %}?return_url={{ device.get_absolute_url }}" class="btn btn-warning btn-xs"> | 
					
						
							|  |  |  |                                 <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Rename | 
					
						
							|  |  |  |                             </button> | 
					
						
							| 
									
										
										
										
											2020-02-05 09:15:48 -05:00
										 |  |  |                             <button type="submit" name="_edit" formaction="{% url 'dcim:interface_bulk_edit' %}?return_url={{ device.get_absolute_url }}" class="btn btn-warning btn-xs"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit | 
					
						
							|  |  |  |                             </button> | 
					
						
							|  |  |  |                         {% endif %} | 
					
						
							| 
									
										
										
										
											2018-10-24 13:59:44 -04:00
										 |  |  |                         {% if interfaces and perms.dcim.change_interface %} | 
					
						
							| 
									
										
										
										
											2018-11-08 15:04:34 -05:00
										 |  |  |                             <button type="submit" name="_disconnect" formaction="{% url 'dcim:interface_bulk_disconnect' %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 <span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span> Disconnect | 
					
						
							|  |  |  |                             </button> | 
					
						
							|  |  |  |                         {% endif %} | 
					
						
							|  |  |  |                         {% if interfaces and perms.dcim.delete_interface %} | 
					
						
							| 
									
										
										
										
											2020-02-04 16:06:55 -05:00
										 |  |  |                             <button type="submit" name="_delete" formaction="{% url 'dcim:interface_bulk_delete' %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 <span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete | 
					
						
							|  |  |  |                             </button> | 
					
						
							|  |  |  |                         {% endif %} | 
					
						
							|  |  |  |                         {% if perms.dcim.add_interface %} | 
					
						
							|  |  |  |                             <div class="pull-right"> | 
					
						
							| 
									
										
										
										
											2020-02-05 12:36:38 -05:00
										 |  |  |                                 <a href="{% url 'dcim:interface_add' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}" class="btn btn-primary btn-xs"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                     <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add interfaces | 
					
						
							|  |  |  |                                 </a> | 
					
						
							|  |  |  |                             </div> | 
					
						
							|  |  |  |                             <div class="clearfix"></div> | 
					
						
							|  |  |  |                         {% endif %} | 
					
						
							|  |  |  |                      </div> | 
					
						
							| 
									
										
										
										
											2018-01-10 15:48:07 -05:00
										 |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                 {% if perms.dcim.delete_interface %} | 
					
						
							|  |  |  |                     </form> | 
					
						
							|  |  |  |                 {% endif %} | 
					
						
							| 
									
										
										
										
											2016-07-26 10:14:51 -04:00
										 |  |  |             {% endif %} | 
					
						
							| 
									
										
										
										
											2018-10-26 14:48:22 -04:00
										 |  |  |             {% if consoleserverports %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                 {% if perms.dcim.delete_consoleserverport %} | 
					
						
							| 
									
										
										
										
											2018-08-08 15:22:26 -04:00
										 |  |  |                     <form method="post"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                     {% csrf_token %} | 
					
						
							| 
									
										
										
										
											2020-02-05 10:26:22 -05:00
										 |  |  |                     <input type="hidden" name="device" value="{{ device.pk }}" /> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                 {% endif %} | 
					
						
							|  |  |  |                 <div class="panel panel-default"> | 
					
						
							|  |  |  |                     <div class="panel-heading"> | 
					
						
							|  |  |  |                         <strong>Console Server Ports</strong> | 
					
						
							|  |  |  |                     </div> | 
					
						
							|  |  |  |                     <table class="table table-hover table-headings panel-body component-list"> | 
					
						
							|  |  |  |                         <thead> | 
					
						
							|  |  |  |                             <tr> | 
					
						
							|  |  |  |                                 {% if perms.dcim.change_consoleserverport or perms.dcim.delete_consoleserverport %} | 
					
						
							|  |  |  |                                     <th class="pk"><input type="checkbox" class="toggle" title="Toggle all" /></th> | 
					
						
							|  |  |  |                                 {% endif %} | 
					
						
							|  |  |  |                                 <th>Name</th> | 
					
						
							| 
									
										
										
										
											2019-10-30 14:25:55 -04:00
										 |  |  |                                 <th>Type</th> | 
					
						
							| 
									
										
										
										
											2019-02-20 14:34:05 -05:00
										 |  |  |                                 <th>Description</th> | 
					
						
							| 
									
										
										
										
											2018-10-26 11:29:03 -04:00
										 |  |  |                                 <th>Cable</th> | 
					
						
							| 
									
										
										
										
											2018-10-26 13:21:43 -04:00
										 |  |  |                                 <th colspan="2">Connection</th> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 <th></th> | 
					
						
							|  |  |  |                             </tr> | 
					
						
							|  |  |  |                         </thead> | 
					
						
							|  |  |  |                         <tbody> | 
					
						
							| 
									
										
										
										
											2018-10-24 10:37:54 -04:00
										 |  |  |                             {% for csp in consoleserverports %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 {% include 'dcim/inc/consoleserverport.html' %} | 
					
						
							|  |  |  |                             {% endfor %} | 
					
						
							|  |  |  |                         </tbody> | 
					
						
							|  |  |  |                     </table> | 
					
						
							| 
									
										
										
										
											2019-03-05 15:42:47 -06:00
										 |  |  |                     <div class="panel-footer noprint"> | 
					
						
							| 
									
										
										
										
											2018-10-24 10:37:54 -04:00
										 |  |  |                         {% if consoleserverports and perms.dcim.change_consoleport %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                             <button type="submit" name="_rename" formaction="{% url 'dcim:consoleserverport_bulk_rename' %}?return_url={{ device.get_absolute_url }}" class="btn btn-warning btn-xs"> | 
					
						
							|  |  |  |                                 <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Rename | 
					
						
							|  |  |  |                             </button> | 
					
						
							| 
									
										
										
										
											2020-02-05 09:15:48 -05:00
										 |  |  |                             <button type="submit" name="_edit" formaction="{% url 'dcim:consoleserverport_bulk_edit' %}?return_url={{ device.get_absolute_url }}" class="btn btn-warning btn-xs"> | 
					
						
							| 
									
										
										
										
											2019-05-02 13:56:30 -04:00
										 |  |  |                                 <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit | 
					
						
							|  |  |  |                             </button> | 
					
						
							| 
									
										
										
										
											2018-11-08 15:04:34 -05:00
										 |  |  |                             <button type="submit" name="_disconnect" formaction="{% url 'dcim:consoleserverport_bulk_disconnect' %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 <span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span> Disconnect | 
					
						
							|  |  |  |                             </button> | 
					
						
							|  |  |  |                         {% endif %} | 
					
						
							| 
									
										
										
										
											2018-10-24 10:37:54 -04:00
										 |  |  |                         {% if consoleserverports and perms.dcim.delete_consoleserverport %} | 
					
						
							| 
									
										
										
										
											2020-02-04 16:06:55 -05:00
										 |  |  |                             <button type="submit" formaction="{% url 'dcim:consoleserverport_bulk_delete' %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 <span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete | 
					
						
							|  |  |  |                             </button> | 
					
						
							|  |  |  |                         {% endif %} | 
					
						
							|  |  |  |                         {% if perms.dcim.add_consoleserverport %} | 
					
						
							|  |  |  |                             <div class="pull-right"> | 
					
						
							| 
									
										
										
										
											2020-02-05 12:36:38 -05:00
										 |  |  |                                 <a href="{% url 'dcim:consoleserverport_add' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}" class="btn btn-primary btn-xs"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                     <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add console server ports | 
					
						
							|  |  |  |                                 </a> | 
					
						
							|  |  |  |                             </div> | 
					
						
							|  |  |  |                             <div class="clearfix"></div> | 
					
						
							|  |  |  |                         {% endif %} | 
					
						
							|  |  |  |                     </div> | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                 {% if perms.dcim.delete_consoleserverport %} | 
					
						
							|  |  |  |                     </form> | 
					
						
							|  |  |  |                 {% endif %} | 
					
						
							|  |  |  |             {% endif %} | 
					
						
							| 
									
										
										
										
											2018-10-26 14:48:22 -04:00
										 |  |  |             {% if poweroutlets %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                 {% if perms.dcim.delete_poweroutlet %} | 
					
						
							| 
									
										
										
										
											2018-08-09 16:37:58 -04:00
										 |  |  |                     <form method="post"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                     {% csrf_token %} | 
					
						
							| 
									
										
										
										
											2020-02-05 10:26:22 -05:00
										 |  |  |                     <input type="hidden" name="device" value="{{ device.pk }}" /> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                 {% endif %} | 
					
						
							|  |  |  |                 <div class="panel panel-default"> | 
					
						
							|  |  |  |                     <div class="panel-heading"> | 
					
						
							|  |  |  |                         <strong>Power Outlets</strong> | 
					
						
							|  |  |  |                     </div> | 
					
						
							|  |  |  |                     <table class="table table-hover table-headings panel-body component-list"> | 
					
						
							|  |  |  |                         <thead> | 
					
						
							| 
									
										
										
										
											2017-12-21 13:29:02 -05:00
										 |  |  |                             <tr> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 {% if perms.dcim.change_poweroutlet or perms.dcim.delete_poweroutlet %} | 
					
						
							|  |  |  |                                     <th class="pk"><input type="checkbox" class="toggle" title="Toggle all" /></th> | 
					
						
							|  |  |  |                                 {% endif %} | 
					
						
							|  |  |  |                                 <th>Name</th> | 
					
						
							| 
									
										
										
										
											2019-11-06 15:30:54 -05:00
										 |  |  |                             <th>Type</th> | 
					
						
							| 
									
										
										
										
											2019-04-10 14:16:16 -04:00
										 |  |  |                                 <th>Input/Leg</th> | 
					
						
							| 
									
										
										
										
											2019-02-20 14:34:05 -05:00
										 |  |  |                                 <th>Description</th> | 
					
						
							| 
									
										
										
										
											2018-10-26 11:29:03 -04:00
										 |  |  |                                 <th>Cable</th> | 
					
						
							| 
									
										
										
										
											2019-04-10 13:05:51 -04:00
										 |  |  |                                 <th colspan="3">Connection</th> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 <th></th> | 
					
						
							| 
									
										
										
										
											2017-12-21 13:29:02 -05:00
										 |  |  |                             </tr> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                         </thead> | 
					
						
							|  |  |  |                         <tbody> | 
					
						
							| 
									
										
										
										
											2018-10-24 11:00:13 -04:00
										 |  |  |                             {% for po in poweroutlets %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 {% include 'dcim/inc/poweroutlet.html' %} | 
					
						
							|  |  |  |                             {% endfor %} | 
					
						
							|  |  |  |                         </tbody> | 
					
						
							|  |  |  |                     </table> | 
					
						
							| 
									
										
										
										
											2019-03-05 15:42:47 -06:00
										 |  |  |                     <div class="panel-footer noprint"> | 
					
						
							| 
									
										
										
										
											2018-10-24 11:00:13 -04:00
										 |  |  |                         {% if poweroutlets and perms.dcim.change_powerport %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                             <button type="submit" name="_rename" formaction="{% url 'dcim:poweroutlet_bulk_rename' %}?return_url={{ device.get_absolute_url }}" class="btn btn-warning btn-xs"> | 
					
						
							|  |  |  |                                 <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Rename | 
					
						
							|  |  |  |                             </button> | 
					
						
							| 
									
										
										
										
											2020-02-05 09:15:48 -05:00
										 |  |  |                             <button type="submit" name="_edit" formaction="{% url 'dcim:poweroutlet_bulk_edit' %}?return_url={{ device.get_absolute_url }}" class="btn btn-warning btn-xs"> | 
					
						
							| 
									
										
										
										
											2019-05-02 13:56:30 -04:00
										 |  |  |                                 <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit | 
					
						
							|  |  |  |                             </button> | 
					
						
							| 
									
										
										
										
											2018-11-08 15:04:34 -05:00
										 |  |  |                             <button type="submit" name="_disconnect" formaction="{% url 'dcim:poweroutlet_bulk_disconnect' %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 <span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span> Disconnect | 
					
						
							|  |  |  |                             </button> | 
					
						
							|  |  |  |                         {% endif %} | 
					
						
							| 
									
										
										
										
											2018-10-24 11:00:13 -04:00
										 |  |  |                         {% if poweroutlets and perms.dcim.delete_poweroutlet %} | 
					
						
							| 
									
										
										
										
											2020-02-04 16:06:55 -05:00
										 |  |  |                             <button type="submit" formaction="{% url 'dcim:poweroutlet_bulk_delete' %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                 <span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete | 
					
						
							|  |  |  |                             </button> | 
					
						
							|  |  |  |                         {% endif %} | 
					
						
							|  |  |  |                         {% if perms.dcim.add_poweroutlet %} | 
					
						
							|  |  |  |                             <div class="pull-right"> | 
					
						
							| 
									
										
										
										
											2020-02-05 12:36:38 -05:00
										 |  |  |                                 <a href="{% url 'dcim:poweroutlet_add' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}" class="btn btn-primary btn-xs"> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                                     <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add power outlets | 
					
						
							|  |  |  |                                 </a> | 
					
						
							|  |  |  |                             </div> | 
					
						
							|  |  |  |                             <div class="clearfix"></div> | 
					
						
							|  |  |  |                         {% endif %} | 
					
						
							|  |  |  |                     </div> | 
					
						
							| 
									
										
										
										
											2018-01-10 15:48:07 -05:00
										 |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |                 {% if perms.dcim.delete_poweroutlet %} | 
					
						
							|  |  |  |                     </form> | 
					
						
							|  |  |  |                 {% endif %} | 
					
						
							| 
									
										
										
										
											2016-07-26 10:16:23 -04:00
										 |  |  |             {% endif %} | 
					
						
							| 
									
										
										
										
											2018-10-25 12:44:28 -04:00
										 |  |  |             {% if front_ports %} | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                 <form method="post"> | 
					
						
							| 
									
										
										
										
											2020-02-05 10:26:22 -05:00
										 |  |  |                     {% csrf_token %} | 
					
						
							|  |  |  |                     <input type="hidden" name="device" value="{{ device.pk }}" /> | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                     <div class="panel panel-default"> | 
					
						
							|  |  |  |                         <div class="panel-heading"> | 
					
						
							| 
									
										
										
										
											2018-10-25 12:44:28 -04:00
										 |  |  |                             <strong>Front Ports</strong> | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                         </div> | 
					
						
							|  |  |  |                         <table class="table table-hover table-headings panel-body component-list"> | 
					
						
							|  |  |  |                             <thead> | 
					
						
							|  |  |  |                                 <tr> | 
					
						
							| 
									
										
										
										
											2018-10-25 12:08:13 -04:00
										 |  |  |                                     {% if perms.dcim.change_frontport or perms.dcim.delete_frontport %} | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                                         <th class="pk"><input type="checkbox" class="toggle" title="Toggle all" /></th> | 
					
						
							|  |  |  |                                     {% endif %} | 
					
						
							|  |  |  |                                     <th>Name</th> | 
					
						
							|  |  |  |                                     <th>Type</th> | 
					
						
							|  |  |  |                                     <th>Rear Port</th> | 
					
						
							|  |  |  |                                     <th>Position</th> | 
					
						
							| 
									
										
										
										
											2018-11-20 21:28:19 -05:00
										 |  |  |                                     <th>Description</th> | 
					
						
							| 
									
										
										
										
											2019-01-31 12:21:43 -05:00
										 |  |  |                                     <th>Cable</th> | 
					
						
							|  |  |  |                                     <th colspan="2">Connection</th> | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                                     <th></th> | 
					
						
							|  |  |  |                                 </tr> | 
					
						
							|  |  |  |                             </thead> | 
					
						
							|  |  |  |                             <tbody> | 
					
						
							| 
									
										
										
										
											2018-10-25 12:08:13 -04:00
										 |  |  |                                 {% for frontport in front_ports %} | 
					
						
							|  |  |  |                                     {% include 'dcim/inc/frontport.html' %} | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                                 {% endfor %} | 
					
						
							|  |  |  |                             </tbody> | 
					
						
							|  |  |  |                         </table> | 
					
						
							| 
									
										
										
										
											2019-03-05 15:42:47 -06:00
										 |  |  |                         <div class="panel-footer noprint"> | 
					
						
							| 
									
										
										
										
											2018-10-25 12:08:13 -04:00
										 |  |  |                             {% if front_ports and perms.dcim.change_frontport %} | 
					
						
							|  |  |  |                                 <button type="submit" name="_rename" formaction="{% url 'dcim:frontport_bulk_rename' %}?return_url={{ device.get_absolute_url }}" class="btn btn-warning btn-xs"> | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                                     <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Rename | 
					
						
							|  |  |  |                                 </button> | 
					
						
							| 
									
										
										
										
											2020-02-05 09:15:48 -05:00
										 |  |  |                                 <button type="submit" name="_edit" formaction="{% url 'dcim:frontport_bulk_edit' %}?return_url={{ device.get_absolute_url }}" class="btn btn-warning btn-xs"> | 
					
						
							| 
									
										
										
										
											2019-02-08 09:31:10 -05:00
										 |  |  |                                     <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit | 
					
						
							|  |  |  |                                 </button> | 
					
						
							| 
									
										
										
										
											2018-11-08 15:12:24 -05:00
										 |  |  |                                 <button type="submit" name="_disconnect" formaction="{% url 'dcim:frontport_bulk_disconnect' %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs"> | 
					
						
							|  |  |  |                                     <span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span> Disconnect | 
					
						
							|  |  |  |                                 </button> | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                             {% endif %} | 
					
						
							| 
									
										
										
										
											2018-10-25 12:08:13 -04:00
										 |  |  |                             {% if front_ports and perms.dcim.delete_frontport %} | 
					
						
							| 
									
										
										
										
											2020-02-04 16:06:55 -05:00
										 |  |  |                                 <button type="submit" formaction="{% url 'dcim:frontport_bulk_delete' %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs"> | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                                     <span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete | 
					
						
							|  |  |  |                                 </button> | 
					
						
							|  |  |  |                             {% endif %} | 
					
						
							| 
									
										
										
										
											2018-10-25 12:08:13 -04:00
										 |  |  |                             {% if perms.dcim.add_frontport %} | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                                 <div class="pull-right"> | 
					
						
							| 
									
										
										
										
											2020-02-05 12:36:38 -05:00
										 |  |  |                                     <a href="{% url 'dcim:frontport_add' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}" class="btn btn-primary btn-xs"> | 
					
						
							| 
									
										
										
										
											2018-10-26 14:48:22 -04:00
										 |  |  |                                         <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add front ports | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                                     </a> | 
					
						
							|  |  |  |                                 </div> | 
					
						
							|  |  |  |                                 <div class="clearfix"></div> | 
					
						
							|  |  |  |                             {% endif %} | 
					
						
							|  |  |  |                         </div> | 
					
						
							|  |  |  |                     </div> | 
					
						
							|  |  |  |                 </form> | 
					
						
							|  |  |  |             {% endif %} | 
					
						
							| 
									
										
										
										
											2018-10-25 12:44:28 -04:00
										 |  |  |             {% if rear_ports %} | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                 <form method="post"> | 
					
						
							| 
									
										
										
										
											2020-02-05 10:26:22 -05:00
										 |  |  |                     {% csrf_token %} | 
					
						
							|  |  |  |                     <input type="hidden" name="device" value="{{ device.pk }}" /> | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                     <div class="panel panel-default"> | 
					
						
							|  |  |  |                         <div class="panel-heading"> | 
					
						
							| 
									
										
										
										
											2018-10-25 12:44:28 -04:00
										 |  |  |                             <strong>Rear Ports</strong> | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                         </div> | 
					
						
							|  |  |  |                         <table class="table table-hover table-headings panel-body component-list"> | 
					
						
							|  |  |  |                             <thead> | 
					
						
							|  |  |  |                                 <tr> | 
					
						
							| 
									
										
										
										
											2018-10-25 12:08:13 -04:00
										 |  |  |                                     {% if perms.dcim.change_rearport or perms.dcim.delete_rearport %} | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                                         <th class="pk"><input type="checkbox" class="toggle" title="Toggle all" /></th> | 
					
						
							|  |  |  |                                     {% endif %} | 
					
						
							|  |  |  |                                     <th>Name</th> | 
					
						
							|  |  |  |                                     <th>Type</th> | 
					
						
							|  |  |  |                                     <th>Positions</th> | 
					
						
							| 
									
										
										
										
											2018-11-20 21:28:19 -05:00
										 |  |  |                                     <th>Description</th> | 
					
						
							| 
									
										
										
										
											2019-01-31 12:21:43 -05:00
										 |  |  |                                     <th>Cable</th> | 
					
						
							|  |  |  |                                     <th colspan="2">Connection</th> | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                                     <th></th> | 
					
						
							|  |  |  |                                 </tr> | 
					
						
							|  |  |  |                             </thead> | 
					
						
							|  |  |  |                             <tbody> | 
					
						
							| 
									
										
										
										
											2018-10-25 12:08:13 -04:00
										 |  |  |                                 {% for rearport in rear_ports %} | 
					
						
							|  |  |  |                                     {% include 'dcim/inc/rearport.html' %} | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                                 {% endfor %} | 
					
						
							|  |  |  |                             </tbody> | 
					
						
							|  |  |  |                         </table> | 
					
						
							| 
									
										
										
										
											2019-03-05 15:42:47 -06:00
										 |  |  |                         <div class="panel-footer noprint"> | 
					
						
							| 
									
										
										
										
											2018-10-25 12:08:13 -04:00
										 |  |  |                             {% if rear_ports and perms.dcim.change_rearport %} | 
					
						
							|  |  |  |                                 <button type="submit" name="_rename" formaction="{% url 'dcim:rearport_bulk_rename' %}?return_url={{ device.get_absolute_url }}" class="btn btn-warning btn-xs"> | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                                     <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Rename | 
					
						
							|  |  |  |                                 </button> | 
					
						
							| 
									
										
										
										
											2020-02-05 09:15:48 -05:00
										 |  |  |                                 <button type="submit" name="_edit" formaction="{% url 'dcim:rearport_bulk_edit' %}?return_url={{ device.get_absolute_url }}" class="btn btn-warning btn-xs"> | 
					
						
							| 
									
										
										
										
											2019-02-08 09:31:10 -05:00
										 |  |  |                                     <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit | 
					
						
							|  |  |  |                                 </button> | 
					
						
							| 
									
										
										
										
											2018-11-08 15:12:24 -05:00
										 |  |  |                                 <button type="submit" name="_disconnect" formaction="{% url 'dcim:rearport_bulk_disconnect' %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs"> | 
					
						
							|  |  |  |                                     <span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span> Disconnect | 
					
						
							|  |  |  |                                 </button> | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                             {% endif %} | 
					
						
							| 
									
										
										
										
											2018-10-25 12:08:13 -04:00
										 |  |  |                             {% if rear_ports and perms.dcim.delete_rearport %} | 
					
						
							| 
									
										
										
										
											2020-02-04 16:06:55 -05:00
										 |  |  |                                 <button type="submit" formaction="{% url 'dcim:rearport_bulk_delete' %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs"> | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                                     <span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete | 
					
						
							|  |  |  |                                 </button> | 
					
						
							|  |  |  |                             {% endif %} | 
					
						
							| 
									
										
										
										
											2018-10-25 12:08:13 -04:00
										 |  |  |                             {% if perms.dcim.add_rearport %} | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                                 <div class="pull-right"> | 
					
						
							| 
									
										
										
										
											2020-02-05 12:36:38 -05:00
										 |  |  |                                     <a href="{% url 'dcim:rearport_add' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}" class="btn btn-primary btn-xs"> | 
					
						
							| 
									
										
										
										
											2018-10-26 14:48:22 -04:00
										 |  |  |                                         <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add rear ports | 
					
						
							| 
									
										
										
										
											2018-10-03 14:04:16 -04:00
										 |  |  |                                     </a> | 
					
						
							|  |  |  |                                 </div> | 
					
						
							|  |  |  |                                 <div class="clearfix"></div> | 
					
						
							|  |  |  |                             {% endif %} | 
					
						
							|  |  |  |                         </div> | 
					
						
							|  |  |  |                     </div> | 
					
						
							|  |  |  |                 </form> | 
					
						
							|  |  |  |             {% endif %} | 
					
						
							| 
									
										
										
										
											2018-06-14 13:14:35 -04:00
										 |  |  |         </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2018-10-29 16:45:20 -04:00
										 |  |  | {% include 'inc/modal.html' with modal_name='graphs' %} | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  | {% include 'secrets/inc/private_key_modal.html' %} | 
					
						
							|  |  |  | {% endblock %} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {% block javascript %} | 
					
						
							|  |  |  | <script type="text/javascript"> | 
					
						
							| 
									
										
										
										
											2018-11-15 14:23:23 -05:00
										 |  |  | function toggleConnection(elem) { | 
					
						
							|  |  |  |     var url = netbox_api_path + "dcim/cables/" + elem.attr('data') + "/"; | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |     if (elem.hasClass('connected')) { | 
					
						
							|  |  |  |         $.ajax({ | 
					
						
							| 
									
										
										
										
											2017-01-31 09:41:25 -05:00
										 |  |  |             url: url, | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |             method: 'PATCH', | 
					
						
							|  |  |  |             dataType: 'json', | 
					
						
							|  |  |  |             beforeSend: function(xhr, settings) { | 
					
						
							|  |  |  |                 xhr.setRequestHeader("X-CSRFToken", "{{ csrf_token }}"); | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |             data: { | 
					
						
							| 
									
										
										
										
											2018-11-15 14:23:23 -05:00
										 |  |  |                 'status': 'False' | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |             }, | 
					
						
							|  |  |  |             context: this, | 
					
						
							|  |  |  |             success: function() { | 
					
						
							|  |  |  |                 elem.parents('tr').removeClass('success').addClass('info'); | 
					
						
							|  |  |  |                 elem.removeClass('connected btn-warning').addClass('btn-success'); | 
					
						
							| 
									
										
										
										
											2017-06-16 10:01:47 -04:00
										 |  |  |                 elem.attr('title', 'Mark installed'); | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |                 elem.children('i').removeClass('glyphicon glyphicon-ban-circle').addClass('fa fa-plug') | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |         }); | 
					
						
							|  |  |  |     } else { | 
					
						
							|  |  |  |         $.ajax({ | 
					
						
							| 
									
										
										
										
											2017-01-31 09:41:25 -05:00
										 |  |  |             url: url, | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |             method: 'PATCH', | 
					
						
							|  |  |  |             dataType: 'json', | 
					
						
							|  |  |  |             beforeSend: function(xhr, settings) { | 
					
						
							|  |  |  |                 xhr.setRequestHeader("X-CSRFToken", "{{ csrf_token }}"); | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |             data: { | 
					
						
							| 
									
										
										
										
											2018-11-15 14:23:23 -05:00
										 |  |  |                 'status': 'True' | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |             }, | 
					
						
							|  |  |  |             context: this, | 
					
						
							|  |  |  |             success: function() { | 
					
						
							|  |  |  |                 elem.parents('tr').removeClass('info').addClass('success'); | 
					
						
							|  |  |  |                 elem.removeClass('btn-success').addClass('connected btn-warning'); | 
					
						
							| 
									
										
										
										
											2017-06-16 10:01:47 -04:00
										 |  |  |                 elem.attr('title', 'Mark planned'); | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |                 elem.children('i').removeClass('fa fa-plug').addClass('glyphicon glyphicon-ban-circle') | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |         }); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     return false; | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2018-11-15 14:23:23 -05:00
										 |  |  | $(".cable-toggle").click(function() { | 
					
						
							|  |  |  |     return toggleConnection($(this)); | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  | }); | 
					
						
							|  |  |  | </script> | 
					
						
							| 
									
										
										
										
											2020-01-06 20:18:44 +00:00
										 |  |  | <script src="{% static 'js/interface_toggles.js' %}?v{{ settings.VERSION }}"></script> | 
					
						
							| 
									
										
										
										
											2017-03-30 15:40:00 -04:00
										 |  |  | <script src="{% static 'js/graphs.js' %}?v{{ settings.VERSION }}"></script> | 
					
						
							|  |  |  | <script src="{% static 'js/secrets.js' %}?v{{ settings.VERSION }}"></script> | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  | {% endblock %} |