Fixed inconsistent names set for BatchAction
The name of a BatchAction should be one word. Change-Id: I5172454b23a5aab951a089f05b0f5a04e1a72ba6 Closes-bug: #1626210
This commit is contained in:
parent
877344de0d
commit
14ab4d1c0c
@ -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
|
||||
|
||||
|
@ -221,7 +221,7 @@ class AddMembers(tables.BatchAction):
|
||||
count
|
||||
)
|
||||
|
||||
name = "addMember"
|
||||
name = "add"
|
||||
icon = "plus"
|
||||
requires_input = True
|
||||
success_url = constants.GROUPS_MANAGE_URL
|
||||
|
@ -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)
|
||||
|
@ -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"),)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user