vpn.html 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. {% extends "base.html" %}
  2. {% block content %}
  3. <div class="row">
  4. <h2>Configuration du VPN</h2>
  5. <div class="large-6 columns">
  6. <div class="panel">
  7. <h3>Statut</h3>
  8. <form action="{{ object.get_absolute_url }}" method="post">{% csrf_token %}
  9. <table class="full-width">
  10. <tr>
  11. <td class="center"><span class="label">Identifiant</span></td>
  12. <td>{{object.login}}</td>
  13. </tr>{% block password %}
  14. <tr>
  15. <td class="center" colspan="2">
  16. <a class="button radius tiny" id="passgen" href="{% url 'vpn:generate_password' object.pk %}"><i class="fa fa-refresh"></i>
  17. Générer un nouveau mot de passe</a>
  18. </td>
  19. </tr>
  20. {% endblock %}<tr class="flatfield">
  21. <td class="center">{{ form.comment.label_tag }}</td>
  22. <td>{{ form.comment }}</td>
  23. </tr>
  24. <tr>
  25. <td class="center boolviewer" colspan="2">
  26. <input type="checkbox" disabled="disabled"{% if object.activated %} checked="checked"{% endif %} />
  27. <span>Ce VPN est {{ object.activated|yesno:"activé,désactivé" }}</span>
  28. </td>
  29. </tr>
  30. <tr><td class="center" colspan="2"><input type="submit" value="Valider" /></td></tr>
  31. </table>
  32. </div>
  33. </div>
  34. <div class="large-6 columns">
  35. <div class="panel">
  36. <h3>Adresses IP</h3>
  37. <table class="full-width">
  38. {{ form.non_field_errors }}
  39. <tr class="flatfield">
  40. <td class="center">{{ form.ipv4_endpoint.label_tag }}</td>
  41. <td>{{ form.ipv4_endpoint }} {{ form.ipv4_endpoint.errors }}</td>
  42. </tr>
  43. <tr class="flatfield">
  44. <td class="center">{{ form.ipv6_endpoint.label_tag }}</td>
  45. <td>{{ form.ipv6_endpoint }} {{ form.ipv6_endpoint.errors }}</td>
  46. </tr>
  47. <tr>
  48. <td class="center"><span class="label">Sous-réseaux</span></td>
  49. <td>
  50. {% for subnet in object.administrative_subscription.ip_subnet.all %}{{ subnet }}<br/>{% endfor %}
  51. </td>
  52. </tr>
  53. <tr><td class="center" colspan="2"><input type="submit" value="Valider" /></td></tr>
  54. </table>
  55. </div>
  56. </div>
  57. </form>
  58. </div>
  59. <div class="row">
  60. <h3 class="graphtitle">Graphe de trafic sur <span id="trafic_zoom">24 heures</span> :</h3>
  61. <img id="trafic_graph" src="{% url 'vpn:get_graph' vpn_id=object.pk %}" alt="Graphe de trafic {{ object.login }}" />
  62. </div>
  63. {% endblock %}