{% extends 'utils/object_list.html' %}
{% block extra_buttons %}
{% if perms.peering.change_directpeeringsession and instance.check_bgp_session_states %}
<button type="button" class="btn btn-sm btn-success" id="id_poll_session_states">
  <i class="fas fa-sync"></i> Poll States
</button>
{% endif %}
{% if perms.peering.add_directpeeringsession %}
<a href="{% url 'peering:directpeeringsession_add' %}?bgp_group={{ instance.pk }}&return_url={{ instance.get_peering_sessions_list_url }}" class="btn btn-sm btn-primary">
  <i class="fas fa-plus"></i> Add
</a>
{% endif %}
{% endblock %}

{% extends 'utils/object_list.html' %}
{% block extra_buttons %}
{% if perms.peering.change_directpeeringsession and instance.check_bgp_session_states %}
<button type="button" class="btn btn-sm btn-success" id="id_poll_session_states">
  <i class="fas fa-sync"></i> Poll States
</button>
{% endif %}
{% if perms.peering.add_directpeeringsession %}
<a href="{% url 'peering:directpeeringsession_add' %}?bgp_group={{ instance.pk }}{% if context_as %}&local_autonomous_system={{ context_as.pk }}{% endif %}&return_url={{ instance.get_peering_sessions_list_url }}" class="btn btn-sm btn-primary">
  <i class="fas fa-plus"></i> Add
</a>
{% endif %}
{% endblock %}

Set affiliated AS by default for direct sessions
Set affiliated AS by default for direct sessions
