mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-20 12:22:23 -06:00
Enable attachment of wireless interfaces to SSIDs
This commit is contained in:
@@ -9,7 +9,6 @@ class Migration(migrations.Migration):
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('dcim', '0136_wireless'),
|
||||
('extras', '0062_clear_secrets_changelog'),
|
||||
('ipam', '0050_iprange'),
|
||||
]
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
from django.db import models
|
||||
from django.urls import reverse
|
||||
|
||||
from extras.utils import extras_features
|
||||
from netbox.models import PrimaryModel
|
||||
from netbox.models import BigIDModel, PrimaryModel
|
||||
from utilities.querysets import RestrictedQuerySet
|
||||
|
||||
__all__ = (
|
||||
@@ -9,6 +10,10 @@ __all__ = (
|
||||
)
|
||||
|
||||
|
||||
#
|
||||
# SSIDs
|
||||
#
|
||||
|
||||
@extras_features('custom_fields', 'custom_links', 'export_templates', 'tags', 'webhooks')
|
||||
class SSID(PrimaryModel):
|
||||
"""
|
||||
@@ -38,3 +43,6 @@ class SSID(PrimaryModel):
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse('wireless:ssid', args=[self.pk])
|
||||
|
||||
@@ -10,9 +10,8 @@ __all__ = (
|
||||
|
||||
class SSIDTable(BaseTable):
|
||||
pk = ToggleColumn()
|
||||
id = tables.Column(
|
||||
linkify=True,
|
||||
verbose_name='ID'
|
||||
name = tables.Column(
|
||||
linkify=True
|
||||
)
|
||||
tags = TagColumn(
|
||||
url_name='dcim:cable_list'
|
||||
@@ -20,5 +19,5 @@ class SSIDTable(BaseTable):
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
model = SSID
|
||||
fields = ('pk', 'id', 'name', 'description', 'vlan')
|
||||
fields = ('pk', 'name', 'description', 'vlan')
|
||||
default_columns = ('pk', 'name', 'description', 'vlan')
|
||||
|
||||
@@ -15,7 +15,7 @@ class SSIDListView(generic.ObjectListView):
|
||||
|
||||
|
||||
class SSIDView(generic.ObjectView):
|
||||
queryset = SSID.objects.prefetch_related('power_panel', 'rack')
|
||||
queryset = SSID.objects.all()
|
||||
|
||||
|
||||
class SSIDEditView(generic.ObjectEditView):
|
||||
@@ -34,13 +34,13 @@ class SSIDBulkImportView(generic.BulkImportView):
|
||||
|
||||
|
||||
class SSIDBulkEditView(generic.BulkEditView):
|
||||
queryset = SSID.objects.prefetch_related('power_panel', 'rack')
|
||||
queryset = SSID.objects.all()
|
||||
filterset = filtersets.SSIDFilterSet
|
||||
table = tables.SSIDTable
|
||||
form = forms.SSIDBulkEditForm
|
||||
|
||||
|
||||
class SSIDBulkDeleteView(generic.BulkDeleteView):
|
||||
queryset = SSID.objects.prefetch_related('power_panel', 'rack')
|
||||
queryset = SSID.objects.all()
|
||||
filterset = filtersets.SSIDFilterSet
|
||||
table = tables.SSIDTable
|
||||
|
||||
Reference in New Issue
Block a user