Merge "Fixed inconsistent names set for BatchAction"

This commit is contained in:
Jenkins 2016-09-29 02:12:59 +00:00 committed by Gerrit Code Review
commit 0254853577
5 changed files with 6 additions and 5 deletions

View File

@ -599,7 +599,8 @@ class BatchAction(Action):
.. attribute:: name
An internal name for this action.
A short name or "slug" representing this action.
Should be one word such as "delete", "add", "disable", etc.
.. method:: action_present

View File

@ -221,7 +221,7 @@ class AddMembers(tables.BatchAction):
count
)
name = "addMember"
name = "add"
icon = "plus"
requires_input = True
success_url = constants.GROUPS_MANAGE_URL

View File

@ -303,7 +303,7 @@ class GroupsViewTests(test.BaseAdminViewTests):
self.mox.ReplayAll()
formData = {'action': 'group_non_members__addMember__%s' % user.id}
formData = {'action': 'group_non_members__add__%s' % user.id}
res = self.client.post(GROUP_ADD_MEMBER_URL, formData)
self.assertRedirectsNoFollow(res, GROUP_MANAGE_URL)

View File

@ -146,7 +146,7 @@ class ClearGateway(policy.PolicyTargetMixin, tables.BatchAction):
count
)
name = "cleargateway"
name = "clear"
classes = ('btn-cleargateway',)
redirect_url = "horizon:project:routers:index"
policy_rules = (("network", "update_router"),)

View File

@ -42,7 +42,7 @@ class RoutersTable(tables.TableRegion):
delete_button.click()
return forms.BaseFormRegion(self.driver, self.conf)
@tables.bind_row_action('cleargateway')
@tables.bind_row_action('clear')
def clear_gateway(self, clear_gateway_button, row):
clear_gateway_button.click()
return forms.BaseFormRegion(self.driver, self.conf)