mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-09 09:08:15 -06:00
15106 length -> distance
This commit is contained in:
parent
ef0cc744cd
commit
441cf4e792
@ -35,7 +35,7 @@
|
|||||||
<td>{{ object.description|placeholder }}</td>
|
<td>{{ object.description|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "Length" %}</th>
|
<th scope="row">{% trans "Distance" %}</th>
|
||||||
<td>
|
<td>
|
||||||
{% if object.distance is not None %}
|
{% if object.distance is not None %}
|
||||||
{{ object.distance|floatformat }} {{ object.get_distance_unit_display }}
|
{{ object.distance|floatformat }} {{ object.get_distance_unit_display }}
|
||||||
|
@ -150,5 +150,5 @@ class WirelessLinkBulkEditForm(NetBoxModelBulkEditForm):
|
|||||||
FieldSet('distance', 'distance_unit', name=_('Attributes')),
|
FieldSet('distance', 'distance_unit', name=_('Attributes')),
|
||||||
)
|
)
|
||||||
nullable_fields = (
|
nullable_fields = (
|
||||||
'ssid', 'tenant', 'description', 'auth_type', 'auth_cipher', 'auth_psk', 'length', 'comments',
|
'ssid', 'tenant', 'description', 'auth_type', 'auth_cipher', 'auth_psk', 'distance', 'comments',
|
||||||
)
|
)
|
||||||
|
@ -113,7 +113,7 @@ class WirelessLinkImportForm(NetBoxModelImportForm):
|
|||||||
help_text=_('Authentication cipher')
|
help_text=_('Authentication cipher')
|
||||||
)
|
)
|
||||||
distance_unit = CSVChoiceField(
|
distance_unit = CSVChoiceField(
|
||||||
label=_('Length unit'),
|
label=_('Distance unit'),
|
||||||
choices=WirelessLinkDistanceUnitChoices,
|
choices=WirelessLinkDistanceUnitChoices,
|
||||||
required=False,
|
required=False,
|
||||||
help_text=_('Distance unit')
|
help_text=_('Distance unit')
|
||||||
|
@ -71,7 +71,7 @@ class WirelessLinkFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|||||||
model = WirelessLink
|
model = WirelessLink
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
FieldSet('q', 'filter_id', 'tag'),
|
FieldSet('q', 'filter_id', 'tag'),
|
||||||
FieldSet('ssid', 'status', 'length', 'length_unit', name=_('Attributes')),
|
FieldSet('ssid', 'status', 'distance', 'distance_unit', name=_('Attributes')),
|
||||||
FieldSet('tenant_group_id', 'tenant_id', name=_('Tenant')),
|
FieldSet('tenant_group_id', 'tenant_id', name=_('Tenant')),
|
||||||
FieldSet('auth_type', 'auth_cipher', 'auth_psk', name=_('Authentication')),
|
FieldSet('auth_type', 'auth_cipher', 'auth_psk', name=_('Authentication')),
|
||||||
)
|
)
|
||||||
|
@ -174,7 +174,7 @@ class WirelessLink(WirelessAuthenticationBase, PrimaryModel):
|
|||||||
choices=WirelessLinkDistanceUnitChoices,
|
choices=WirelessLinkDistanceUnitChoices,
|
||||||
blank=True,
|
blank=True,
|
||||||
)
|
)
|
||||||
# Stores the normalized length (in meters) for database ordering
|
# Stores the normalized distance (in meters) for database ordering
|
||||||
_abs_distance = models.DecimalField(
|
_abs_distance = models.DecimalField(
|
||||||
max_digits=10,
|
max_digits=10,
|
||||||
decimal_places=4,
|
decimal_places=4,
|
||||||
|
Loading…
Reference in New Issue
Block a user