Merge "Add help text to BatchAction"
This commit is contained in:
commit
79a60a5e03
@ -34,6 +34,7 @@ class MigrateInstance(policy.PolicyTargetMixin, tables.BatchAction):
|
||||
name = "migrate"
|
||||
classes = ("btn-migrate", "btn-danger")
|
||||
policy_rules = (("compute", "compute_extension:admin_actions:migrate"),)
|
||||
help_text = _("Migrating instances may cause some unrecoverable results.")
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
|
@ -73,6 +73,8 @@ class ReleaseIPs(tables.BatchAction):
|
||||
name = "release"
|
||||
classes = ('btn-danger',)
|
||||
icon = "unlink"
|
||||
help_text = _("Once a floating IP is released, there is"
|
||||
" no guarantee the same IP can be allocated again.")
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
|
@ -32,6 +32,8 @@ ACTIVE_STATES = ("ACTIVE",)
|
||||
|
||||
|
||||
class TerminateInstance(tables.BatchAction):
|
||||
help_text = _("Terminated instances are not recoverable.")
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
@ -57,6 +59,9 @@ class TerminateInstance(tables.BatchAction):
|
||||
|
||||
|
||||
class RestartInstance(tables.BatchAction):
|
||||
help_text = _("Restarted instances will lose any data not"
|
||||
" saved in persistent storage.")
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
|
@ -83,6 +83,7 @@ class TerminateInstance(policy.PolicyTargetMixin, tables.BatchAction):
|
||||
classes = ("btn-danger",)
|
||||
icon = "off"
|
||||
policy_rules = (("compute", "compute:delete"),)
|
||||
help_text = _("Terminated instances are not recoverable.")
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
@ -112,6 +113,8 @@ class RebootInstance(policy.PolicyTargetMixin, tables.BatchAction):
|
||||
name = "reboot"
|
||||
classes = ('btn-danger', 'btn-reboot')
|
||||
policy_rules = (("compute", "compute:reboot"),)
|
||||
help_text = _("Restarted instances will lose any data"
|
||||
" not saved in persistent storage.")
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
@ -689,6 +692,7 @@ class StopInstance(policy.PolicyTargetMixin, tables.BatchAction):
|
||||
name = "stop"
|
||||
classes = ('btn-danger',)
|
||||
policy_rules = (("compute", "compute:stop"),)
|
||||
help_text = _("To power off a specific instance.")
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
|
@ -125,6 +125,9 @@ class SetGateway(policy.PolicyTargetMixin, tables.LinkAction):
|
||||
|
||||
|
||||
class ClearGateway(policy.PolicyTargetMixin, tables.BatchAction):
|
||||
help_text = _("You may reset the gateway later by using the"
|
||||
" set gateway action, but the gateway IP may change.")
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
|
@ -440,6 +440,9 @@ class DetachVolume(tables.BatchAction):
|
||||
name = "detach"
|
||||
classes = ('btn-danger', 'btn-detach')
|
||||
policy_rules = (("compute", "compute:detach_volume"),)
|
||||
help_text = _("The data will remain in the volume and another instance"
|
||||
" will be able to access the data if you attach"
|
||||
" this volume to it.")
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
|
Loading…
Reference in New Issue
Block a user