_device_header.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <div class="row">
  2. <div class="col-md-9">
  3. {% if device.rack %}
  4. <ol class="breadcrumb">
  5. <li><a href="{% url 'dcim:site' slug=device.rack.site.slug %}">{{ device.rack.site }}</a></li>
  6. <li><a href="{% url 'dcim:rack_list' %}?site={{ device.rack.site.slug }}">Racks</a></li>
  7. <li><a href="{% url 'dcim:rack' pk=device.rack.pk %}">{{ device.rack }}</a></li>
  8. <li>{{ device }}</li>
  9. </ol>
  10. {% endif %}
  11. </div>
  12. <div class="col-md-3">
  13. <form action="{% url 'dcim:device_list' %}" method="get">
  14. <div class="input-group">
  15. <input type="text" name="q" class="form-control" placeholder="Device name or serial" />
  16. <span class="input-group-btn">
  17. <button type="submit" class="btn btn-primary">
  18. <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
  19. </button>
  20. </span>
  21. </div>
  22. </form>
  23. </div>
  24. </div>
  25. <div class="pull-right">
  26. {% if perms.dcim.change_device %}
  27. <a href="{% url 'dcim:device_edit' pk=device.pk %}" class="btn btn-warning">
  28. <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
  29. Edit this device
  30. </a>
  31. {% endif %}
  32. {% if perms.dcim.delete_device %}
  33. <a href="{% url 'dcim:device_delete' pk=device.pk %}" class="btn btn-danger">
  34. <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
  35. Delete this device
  36. </a>
  37. {% endif %}
  38. </div>
  39. <h1>{{ device }}</h1>
  40. <ul class="nav nav-tabs" style="margin-bottom: 20px">
  41. <li role="presentation"{% if active_tab == 'info' %} class="active"{% endif %}><a href="{% url 'dcim:device' pk=device.pk %}">Info</a></li>
  42. <li role="presentation"{% if active_tab == 'inventory' %} class="active"{% endif %}><a href="{% url 'dcim:device_inventory' pk=device.pk %}">Inventory</a></li>
  43. {% if device.status %}
  44. <li role="presentation"{% if active_tab == 'lldp-neighbors' %} class="active"{% endif %}><a href="{% url 'dcim:device_lldp_neighbors' pk=device.pk %}">LLDP Neighbors</a></li>
  45. {% endif %}
  46. </ul>