Skip to content

Commit

Permalink
Merge "made action value translatable in firewall rules table"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Feb 27, 2015
2 parents 0e3ad91 + a2a5bc7 commit a266f31
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion openstack_dashboard/dashboards/project/firewalls/tables.py
Expand Up @@ -195,6 +195,10 @@ def get_policy_link(datum):


class RulesTable(tables.DataTable):
ACTION_DISPLAY_CHOICES = (
("Allow", pgettext_lazy("Action Name of a Firewall Rule", u"ALLOW")),
("Deny", pgettext_lazy("Action Name of a Firewall Rule", u"DENY")),
)
name = tables.Column("name_or_id",
verbose_name=_("Name"),
link="horizon:project:firewalls:ruledetails")
Expand All @@ -211,7 +215,7 @@ class RulesTable(tables.DataTable):
destination_port = tables.Column("destination_port",
verbose_name=_("Destination Port"))
action = tables.Column("action",
filters=(filters.upper,),
display_choices=ACTION_DISPLAY_CHOICES,
verbose_name=_("Action"))
enabled = tables.Column("enabled",
verbose_name=_("Enabled"),
Expand Down

0 comments on commit a266f31

Please sign in to comment.