mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 09:51:22 -06:00
#7025: Misc cleanup
This commit is contained in:
parent
d3a3a6ba46
commit
dbd503bcc8
@ -198,6 +198,7 @@ class CircuitGroupAssignmentForm(NetBoxModelForm):
|
|||||||
circuit = DynamicModelChoiceField(
|
circuit = DynamicModelChoiceField(
|
||||||
label=_('Circuit'),
|
label=_('Circuit'),
|
||||||
queryset=Circuit.objects.all(),
|
queryset=Circuit.objects.all(),
|
||||||
|
selector=True
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
@ -78,7 +78,7 @@ class Migration(migrations.Migration):
|
|||||||
options={
|
options={
|
||||||
'verbose_name': 'Circuit group assignment',
|
'verbose_name': 'Circuit group assignment',
|
||||||
'verbose_name_plural': 'Circuit group assignments',
|
'verbose_name_plural': 'Circuit group assignments',
|
||||||
'ordering': ('circuit', 'priority', 'pk'),
|
'ordering': ('group', 'circuit', 'priority', 'pk'),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
migrations.AddConstraint(
|
migrations.AddConstraint(
|
@ -203,7 +203,7 @@ class CircuitGroupAssignment(CustomFieldsMixin, ExportTemplatesMixin, TagsMixin,
|
|||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ('circuit', 'priority', 'pk')
|
ordering = ('group', 'circuit', 'priority', 'pk')
|
||||||
constraints = (
|
constraints = (
|
||||||
models.UniqueConstraint(
|
models.UniqueConstraint(
|
||||||
fields=('circuit', 'group'),
|
fields=('circuit', 'group'),
|
||||||
|
@ -77,18 +77,22 @@ class CircuitTable(TenancyColumnsMixin, ContactsColumnMixin, NetBoxTable):
|
|||||||
verbose_name=_('Commit Rate')
|
verbose_name=_('Commit Rate')
|
||||||
)
|
)
|
||||||
comments = columns.MarkdownColumn(
|
comments = columns.MarkdownColumn(
|
||||||
verbose_name=_('Comments'),
|
verbose_name=_('Comments')
|
||||||
)
|
)
|
||||||
tags = columns.TagColumn(
|
tags = columns.TagColumn(
|
||||||
url_name='circuits:circuit_list'
|
url_name='circuits:circuit_list'
|
||||||
)
|
)
|
||||||
|
assignments = columns.ManyToManyColumn(
|
||||||
|
verbose_name=_('Assignments'),
|
||||||
|
linkify_item=True
|
||||||
|
)
|
||||||
|
|
||||||
class Meta(NetBoxTable.Meta):
|
class Meta(NetBoxTable.Meta):
|
||||||
model = Circuit
|
model = Circuit
|
||||||
fields = (
|
fields = (
|
||||||
'pk', 'id', 'cid', 'provider', 'provider_account', 'type', 'status', 'tenant', 'tenant_group',
|
'pk', 'id', 'cid', 'provider', 'provider_account', 'type', 'status', 'tenant', 'tenant_group',
|
||||||
'termination_a', 'termination_z', 'install_date', 'termination_date', 'commit_rate', 'description',
|
'termination_a', 'termination_z', 'install_date', 'termination_date', 'commit_rate', 'description',
|
||||||
'comments', 'contacts', 'tags', 'created', 'last_updated',
|
'comments', 'contacts', 'tags', 'created', 'last_updated', 'assignments',
|
||||||
)
|
)
|
||||||
default_columns = (
|
default_columns = (
|
||||||
'pk', 'cid', 'provider', 'type', 'status', 'tenant', 'termination_a', 'termination_z', 'description',
|
'pk', 'cid', 'provider', 'type', 'status', 'tenant', 'termination_a', 'termination_z', 'description',
|
||||||
|
@ -20,23 +20,23 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "Group" %}</th>
|
<th scope="row">{% trans "Group" %}</th>
|
||||||
<td>{{ object.group }}</td>
|
<td>{{ object.group|linkify }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "Circuit" %}</th>
|
<th scope="row">{% trans "Circuit" %}</th>
|
||||||
<td>{{ object.circuit }}</td>
|
<td>{{ object.circuit|linkify }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "Priority" %}</th>
|
<th scope="row">{% trans "Priority" %}</th>
|
||||||
<td>{{ object.priority }}</td>
|
<td>{{ object.get_priority_display }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include 'inc/panels/tags.html' %}
|
{% include 'inc/panels/tags.html' %}
|
||||||
{% include 'inc/panels/custom_fields.html' %}
|
|
||||||
{% plugin_left_page object %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col col-md-6">
|
<div class="col col-md-6">
|
||||||
|
{% include 'inc/panels/custom_fields.html' %}
|
||||||
{% plugin_right_page object %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user