{% extends "_base.html" %} {% load network_tags %} {% block title %}{{ action }} Template - MeshAdmin{% endblock %} {% block content %}
{% csrf_token %}
{{ form.name|add_class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5" }} {% if form.name.errors %}

{{ form.name.errors|join:", " }}

{% endif %}
{% if not network %}
{{ form.network|add_class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5" }} {% if form.network.errors %}

{{ form.network.errors|join:", " }}

{% endif %}
{% endif %}

Host Type Settings

{{ form.is_lighthouse|add_class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 mr-2" }}
{{ form.is_relay|add_class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 mr-2" }}
{{ form.use_relay|add_class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 mr-2" }}

Enrollment Key Settings

{{ form.reusable|add_class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 mr-2" }}

Use this type to enroll multiple peers

{{ form.usage_limit|add_class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5" }}

For example, set to 30 if you want to enroll 30 peers

{% if form.usage_limit.errors %}

{{ form.usage_limit.errors|join:", " }}

{% endif %}
{{ form.expiry_days|add_class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5" }}

Days until the key expires. Leave empty for no expiration.

{% if form.expiry_days.errors %}

{{ form.expiry_days.errors|join:", " }}

{% endif %}
{{ form.ephemeral_peers|add_class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 mr-2" }}

Peers that are offline for over 10 minutes will be removed automatically

Access Control

{{ form.groups|add_class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5" }}

Select groups to assign to hosts created with this template.

{% if form.groups.errors %}

{{ form.groups.errors|join:", " }}

{% endif %}
{% endblock %}