Merge "Replace "Terminate Instance" with "Delete Instance""

This commit is contained in:
Jenkins 2015-12-02 23:27:46 +00:00 committed by Gerrit Code Review
commit 891927c938
2 changed files with 18 additions and 18 deletions

View File

@ -29,25 +29,25 @@ from openstack_dashboard.contrib.trove.content.databases import db_capability
ACTIVE_STATES = ("ACTIVE",) ACTIVE_STATES = ("ACTIVE",)
class TerminateCluster(tables.BatchAction): class DeleteCluster(tables.BatchAction):
name = "terminate" name = "delete"
icon = "remove" icon = "remove"
classes = ('btn-danger',) classes = ('btn-danger',)
help_text = _("Terminated cluster is not recoverable.") help_text = _("Deleted cluster is not recoverable.")
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ungettext_lazy( return ungettext_lazy(
u"Terminate Cluster", u"Delete Cluster",
u"Terminate Clusters", u"Delete Clusters",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ungettext_lazy( return ungettext_lazy(
u"Scheduled termination of Cluster", u"Scheduled deletion of Cluster",
u"Scheduled termination of Clusters", u"Scheduled deletion of Clusters",
count count
) )
@ -159,8 +159,8 @@ class ClustersTable(tables.DataTable):
verbose_name = _("Clusters") verbose_name = _("Clusters")
status_columns = ["task"] status_columns = ["task"]
row_class = UpdateRow row_class = UpdateRow
table_actions = (LaunchLink, TerminateCluster) table_actions = (LaunchLink, DeleteCluster)
row_actions = (AddShard, ResetPassword, TerminateCluster) row_actions = (AddShard, ResetPassword, DeleteCluster)
def get_instance_size(instance): def get_instance_size(instance):

View File

@ -31,26 +31,26 @@ from openstack_dashboard.contrib.trove.content.database_backups \
ACTIVE_STATES = ("ACTIVE",) ACTIVE_STATES = ("ACTIVE",)
class TerminateInstance(tables.BatchAction): class DeleteInstance(tables.BatchAction):
help_text = _("Terminated instances are not recoverable.") help_text = _("Deleted instances are not recoverable.")
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ungettext_lazy( return ungettext_lazy(
u"Terminate Instance", u"Delete Instance",
u"Terminate Instances", u"Delete Instances",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ungettext_lazy( return ungettext_lazy(
u"Scheduled termination of Instance", u"Scheduled deletion of Instance",
u"Scheduled termination of Instances", u"Scheduled deletion of Instances",
count count
) )
name = "terminate" name = "delete"
classes = ("btn-danger", ) classes = ("btn-danger", )
icon = "remove" icon = "remove"
@ -340,13 +340,13 @@ class InstancesTable(tables.DataTable):
verbose_name = _("Instances") verbose_name = _("Instances")
status_columns = ["status"] status_columns = ["status"]
row_class = UpdateRow row_class = UpdateRow
table_actions = (LaunchLink, TerminateInstance) table_actions = (LaunchLink, DeleteInstance)
row_actions = (CreateBackup, row_actions = (CreateBackup,
ResizeVolume, ResizeVolume,
ResizeInstance, ResizeInstance,
RestartInstance, RestartInstance,
DetachReplica, DetachReplica,
TerminateInstance) DeleteInstance)
class UsersTable(tables.DataTable): class UsersTable(tables.DataTable):