From 8776da278a52e9cc1d11d08f351f55135874d606 Mon Sep 17 00:00:00 2001 From: pengyuesheng Date: Wed, 15 May 2019 15:11:11 +0800 Subject: [PATCH] Translate executions state Change-Id: I128eb824638254d504ff52ab658054778061a68c --- mistraldashboard/executions/tables.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mistraldashboard/executions/tables.py b/mistraldashboard/executions/tables.py index f1a560d..6646457 100644 --- a/mistraldashboard/executions/tables.py +++ b/mistraldashboard/executions/tables.py @@ -169,6 +169,14 @@ class ExecutionsTable(tables.DataTable): ("running", None), ) + STATUS_DISPLAY_CHOICES = ( + ("success", _("Success")), + ("error", _("Error")), + ("paused", _("Paused")), + ("delayed", _("Delayed")), + ("running", _("Running")), + ) + id = tables.Column( "id", verbose_name=_("ID"), @@ -208,6 +216,7 @@ class ExecutionsTable(tables.DataTable): verbose_name=_("Created at"), filters=[humantime] ) + updated_at = tables.Column( "updated_at", verbose_name=_("Updated at"), @@ -220,6 +229,7 @@ class ExecutionsTable(tables.DataTable): filters=[label], status=True, status_choices=STATE_STATUS_CHOICES, + display_choices=STATUS_DISPLAY_CHOICES, cell_attributes_getter=getHoverHelp )