Add servers table filter action
Change-Id: I5c2b18b9c7dcc90e696cc1f338e1472a7e7a36e2
This commit is contained in:
parent
3bfd13cc20
commit
79b15f8353
|
@ -54,6 +54,17 @@ STATUS_DISPLAY_CHOICES = (
|
|||
u"Maintenance")),
|
||||
)
|
||||
|
||||
SERVER_FILTER_CHOICES = (
|
||||
('name', _("Server Name"), True),
|
||||
('status', _("Status ="), True),
|
||||
('availability_zone', _("Availability Zone"), True),
|
||||
)
|
||||
|
||||
|
||||
class ServersFilterAction(tables.FilterAction):
|
||||
filter_type = "server"
|
||||
filter_choices = SERVER_FILTER_CHOICES
|
||||
|
||||
|
||||
class ServersTable(tables.DataTable):
|
||||
STATUS_CHOICES = (
|
||||
|
@ -95,3 +106,4 @@ class ServersTable(tables.DataTable):
|
|||
verbose_name = _("Servers")
|
||||
status_columns = ["status"]
|
||||
row_class = UpdateRow
|
||||
table_actions = (ServersFilterAction,)
|
||||
|
|
Loading…
Reference in New Issue