parc_info_api_switch_get.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <div class="modal-dialog {% if item.ports %}modal-lg{% endif %}" role="document">
  2. <div class="modal-content">
  3. <div class="modal-header">
  4. <h5 class="modal-title">Détail d'un switch</h5>
  5. <button type="button" class="btn btn-sm btn-dark close" data-dismiss="modal" aria-label="Close">
  6. <span aria-hidden="true">&times;</span>
  7. </button>
  8. </div>
  9. <div class="modal-body">
  10. <table class="table table-sm">
  11. <tr><td>Site : </td><td>{{item.SW_Baie.BAIE_Site_NG}}</td></tr>
  12. <tr><td>Baie : </td><td>{{item.SW_Baie}}</td></tr>
  13. <tr><td>Nom : </td><td>{{item.SW_Nom}}</td></tr>
  14. <tr><td>Adresse IP : </td><td>{{item.SW_IP}}</td></tr>
  15. <tr><td>Actitecture : </td><td>{{item.get_SW_OS_display}}</td></tr>
  16. <tr><td>Connectivité : </td><td>{{item.get_SW_TYPE_display}}</td></tr>
  17. {%if item.SW_Commentaires != "" %}<tr><td>Commentaires : </td><td>{{item.SW_Commentaires}}</td></tr>{% endif %}
  18. </table>
  19. {% if item.ports %}
  20. <h5>Listes des ports réseau</h5>
  21. <table class="table table-sm">
  22. <tr><td>Port</td><td>VLAN</td><td>Bandeau</td><td>Commentaire</td><td>&nbsp;</td></tr>
  23. {% for port in item.ports %}
  24. <tr>
  25. <td>{% if port.PL_Port_NG == "old" %}{{port.PL_Port}}{% else %}{{port.PL_Port_NG}}{% endif %}</td>
  26. <td>{{port.PL_VLAN}}</td>
  27. <td>{{port.PL_Headbang_plug}}</td>
  28. <td>{{port.PL_Commentaires}}</td>
  29. <td onmouseover="this.style.cursor='pointer';"><i class="far fa-edit" onclick="bt_edit_port('{{item.id}}','{{port.id}}')"></i></td></tr>
  30. {% endfor %}
  31. </table>
  32. {% endif %}
  33. </div>
  34. <div class="modal-footer">
  35. <button type="button" class="btn btn-success" onclick="bt_edit_port('{{item.id}}','0')"><i class="fas fa-plus-square"></i> Ajouter un port</button>
  36. <button type="button" class="btn btn-warning" onclick="bt_update_port('{{item.id}}')"><i class="fas fa-plus-square"></i> Mise à jour des ports Switch</button>
  37. <button type="button" class="btn btn-dark" onclick="bt_edit_info({{item.id}})"><i class="far fa-edit"></i> Modifier le Switch</button>
  38. </div>
  39. </div>
  40. </div>