mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-24 00:15:17 -06:00
cleanup
This commit is contained in:
parent
24cc5edcfb
commit
9901091459
@ -170,8 +170,6 @@ class CircuitTerminationForm(NetBoxModelForm):
|
||||
fields = [
|
||||
'provider', 'circuit', 'term_side', 'region', 'site_group', 'site', 'location', 'provider_network', 'mark_connected',
|
||||
'port_speed', 'upstream_speed', 'xconnect_id', 'pp_info', 'description', 'tags',
|
||||
'provider', 'circuit', 'term_side', 'region', 'site_group', 'site', 'location', 'provider_network', 'mark_connected',
|
||||
'port_speed', 'upstream_speed', 'xconnect_id', 'pp_info', 'description', 'tags',
|
||||
]
|
||||
help_texts = {
|
||||
'port_speed': "Physical circuit speed",
|
||||
|
@ -0,0 +1,20 @@
|
||||
# Generated by Django 4.0.5 on 2022-09-15 13:06
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('dcim', '0161_cabling_cleanup'),
|
||||
('circuits', '0038_cabling_cleanup'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='circuittermination',
|
||||
name='location',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='circuit_terminations', to='dcim.location'),
|
||||
),
|
||||
]
|
@ -11,7 +11,7 @@ __all__ = (
|
||||
)
|
||||
|
||||
|
||||
CIRCUIT_TERMINATION_LINK = """
|
||||
CIRCUITTERMINATION_LINK = """
|
||||
{% if value.location %}
|
||||
<a href="{{ value.location.get_absolute_url }}">{{ value.location }}</a>
|
||||
{% elif value.site %}
|
||||
@ -51,11 +51,11 @@ class CircuitTable(TenancyColumnsMixin, NetBoxTable):
|
||||
)
|
||||
status = columns.ChoiceFieldColumn()
|
||||
termination_a = tables.TemplateColumn(
|
||||
template_code=CIRCUIT_TERMINATION_LINK,
|
||||
template_code=CIRCUITTERMINATION_LINK,
|
||||
verbose_name='Side A'
|
||||
)
|
||||
termination_z = tables.TemplateColumn(
|
||||
template_code=CIRCUIT_TERMINATION_LINK,
|
||||
template_code=CIRCUITTERMINATION_LINK,
|
||||
verbose_name='Side Z'
|
||||
)
|
||||
commit_rate = CommitRateColumn()
|
||||
|
@ -37,6 +37,10 @@
|
||||
{{ termination.site|linkify }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Location</td>
|
||||
<td>{{ termination.location|linkify }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Termination</td>
|
||||
<td>
|
||||
|
@ -7,6 +7,10 @@
|
||||
<td>Site</td>
|
||||
<td>{{ terminations.0.device.site|linkify }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Location</td>
|
||||
<td>{{ terminations.0.device.location|linkify }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rack</td>
|
||||
<td>{{ terminations.0.device.rack|linkify|placeholder }}</td>
|
||||
@ -29,6 +33,10 @@
|
||||
<td>Site</td>
|
||||
<td>{{ terminations.0.power_panel.site|linkify }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Location</td>
|
||||
<td>{{ terminations.0.power_panel.location|linkify }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Power Panel</td>
|
||||
<td>{{ terminations.0.power_panel|linkify }}</td>
|
||||
|
Loading…
Reference in New Issue
Block a user