mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #8496: Enable assigning multiple ASNs to a provider
This commit is contained in:
@ -16,14 +16,29 @@
|
||||
<div class="row mb-3">
|
||||
<div class="col col-md-6">
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
Provider
|
||||
</h5>
|
||||
<h5 class="card-header">Provider</h5>
|
||||
<div class="card-body">
|
||||
<table class="table table-hover attr-table">
|
||||
<tr>
|
||||
<th scope="row">ASN</th>
|
||||
<td>{{ object.asn|placeholder }}</td>
|
||||
<th scope="row">ASN</th>
|
||||
<td>
|
||||
{% if object.asn %}
|
||||
<div class="float-end text-warning">
|
||||
<i class="mdi mdi-alert" title="This field will be removed in a future release. Please migrate this data to ASN objects."></i>
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ object.asn|placeholder }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">ASNs</th>
|
||||
<td>
|
||||
{% for asn in object.asns.all %}
|
||||
{{ asn|linkify }}{% if not forloop.last %}, {% endif %}
|
||||
{% empty %}
|
||||
{{ ''|placeholder }}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Account</th>
|
||||
|
@ -45,7 +45,17 @@
|
||||
{% if sites_count %}
|
||||
<a href="{% url 'dcim:site_list' %}?asn_id={{ object.pk }}">{{ sites_count }}</a>
|
||||
{% else %}
|
||||
{{ sites_count }}
|
||||
{{ ''|placeholder }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Providers</td>
|
||||
<td>
|
||||
{% if providers_count %}
|
||||
<a href="{% url 'circuits:provider_list' %}?asn_id={{ object.pk }}">{{ providers_count }}</a>
|
||||
{% else %}
|
||||
{{ ''|placeholder }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
@ -69,6 +79,13 @@
|
||||
{% include 'inc/paginator.html' with paginator=sites_table.paginator page=sites_table.page %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h5 class="card-header">Providers</h5>
|
||||
<div class="card-body table-responsive">
|
||||
{% render_table providers_table 'inc/table.html' %}
|
||||
{% include 'inc/paginator.html' with paginator=providers_table.paginator page=providers_table.page %}
|
||||
</div>
|
||||
</div>
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user