mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Convert table config updates to use REST API
This commit is contained in:
@ -168,8 +168,14 @@ class TableConfigForm(BootstrapMixin, forms.Form):
|
||||
)
|
||||
|
||||
def __init__(self, table, *args, **kwargs):
|
||||
self.table = table
|
||||
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
# Initialize columns field based on table attributes
|
||||
self.fields['columns'].choices = table.configurable_columns
|
||||
self.fields['columns'].initial = table.visible_columns
|
||||
|
||||
@property
|
||||
def table_name(self):
|
||||
return self.table.__class__.__name__
|
||||
|
Reference in New Issue
Block a user