mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #3064: Include tags in object lists as a toggleable table column
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import django_tables2 as tables
|
||||
|
||||
from utilities.tables import BaseTable, ToggleColumn
|
||||
from utilities.tables import BaseTable, TagColumn, ToggleColumn
|
||||
from .models import SecretRole, Secret
|
||||
|
||||
SECRETROLE_ACTIONS = """
|
||||
@ -42,8 +42,11 @@ class SecretRoleTable(BaseTable):
|
||||
class SecretTable(BaseTable):
|
||||
pk = ToggleColumn()
|
||||
device = tables.LinkColumn()
|
||||
tags = TagColumn(
|
||||
url_name='secrets:secret_list'
|
||||
)
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
model = Secret
|
||||
fields = ('pk', 'device', 'role', 'name', 'last_updated', 'hash')
|
||||
fields = ('pk', 'device', 'role', 'name', 'last_updated', 'hash', 'tags')
|
||||
default_columns = ('pk', 'device', 'role', 'name', 'last_updated')
|
||||
|
Reference in New Issue
Block a user