mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 19:36:26 -06:00
Misc cleanup
This commit is contained in:
parent
2e52014828
commit
00ab899604
@ -117,9 +117,6 @@ class BaseTable(tables.Table):
|
|||||||
"""
|
"""
|
||||||
Update the table sequence to display only the named columns and any exempt columns.
|
Update the table sequence to display only the named columns and any exempt columns.
|
||||||
"""
|
"""
|
||||||
if not selected_columns:
|
|
||||||
raise Exception('wtf?')
|
|
||||||
|
|
||||||
# Hide non-selected columns which are not exempt
|
# Hide non-selected columns which are not exempt
|
||||||
for column in self.columns:
|
for column in self.columns:
|
||||||
if column.name not in [*selected_columns, *self.exempt_columns]:
|
if column.name not in [*selected_columns, *self.exempt_columns]:
|
||||||
@ -187,10 +184,12 @@ class BaseTable(tables.Table):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def configuration(self):
|
def configuration(self):
|
||||||
return {
|
config = {
|
||||||
'columns': ','.join([c[0] for c in self.selected_columns]),
|
'columns': ','.join([c[0] for c in self.selected_columns]),
|
||||||
'ordering': self.order_by,
|
|
||||||
}
|
}
|
||||||
|
if self.order_by:
|
||||||
|
config['ordering'] = self.order_by
|
||||||
|
return config
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def config_params(self):
|
def config_params(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user