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",)
class TerminateCluster(tables.BatchAction):
name = "terminate"
class DeleteCluster(tables.BatchAction):
name = "delete"
icon = "remove"
classes = ('btn-danger',)
help_text = _("Terminated cluster is not recoverable.")
help_text = _("Deleted cluster is not recoverable.")
@staticmethod
def action_present(count):
return ungettext_lazy(
u"Terminate Cluster",
u"Terminate Clusters",
u"Delete Cluster",
u"Delete Clusters",
count
)
@staticmethod
def action_past(count):
return ungettext_lazy(
u"Scheduled termination of Cluster",
u"Scheduled termination of Clusters",
u"Scheduled deletion of Cluster",
u"Scheduled deletion of Clusters",
count
)
@ -159,8 +159,8 @@ class ClustersTable(tables.DataTable):
verbose_name = _("Clusters")
status_columns = ["task"]
row_class = UpdateRow
table_actions = (LaunchLink, TerminateCluster)
row_actions = (AddShard, ResetPassword, TerminateCluster)
table_actions = (LaunchLink, DeleteCluster)
row_actions = (AddShard, ResetPassword, DeleteCluster)
def get_instance_size(instance):

View File

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