From 50134c78fd91bf03acedfc136a2e4d3d507e28bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ses=C3=B3stris=20Vieira?= Date: Wed, 28 Feb 2024 14:08:39 -0300 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=B5es=20no=20sistema=20de=20cronj?= =?UTF-8?q?obs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/apps/utils/admin.py | 11 +++++++++-- sigi/menu_conf.yaml | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/sigi/apps/utils/admin.py b/sigi/apps/utils/admin.py index 0dcbf20..5279135 100644 --- a/sigi/apps/utils/admin.py +++ b/sigi/apps/utils/admin.py @@ -31,12 +31,19 @@ class JobScheduleInline(admin.TabularInline): return False @mark_safe - @admin.display(description=_("executar")) + @admin.display(description=_("Ver/executar")) def get_runner(self, sched): if sched.status == JobSchedule.STATUS_AGENDADO: url = reverse("admin:utils_jobschedule_runjob", args=[sched.id]) return ( - f"play_arrow" + f"" + "play_arrow" + ) + elif sched.status == JobSchedule.STATUS_CONCLUIDO: + url = reverse("admin:utils_jobschedule_change", args=[sched.id]) + return ( + f"" + "description" ) return "" diff --git a/sigi/menu_conf.yaml b/sigi/menu_conf.yaml index 4238cf4..f657305 100644 --- a/sigi/menu_conf.yaml +++ b/sigi/menu_conf.yaml @@ -21,7 +21,7 @@ admin_menu: - title: Jobs de cron view_name: admin:utils_cronjob_changelist - title: Jobs agendados - view_name: admin_utils_jobschedule_changelist + view_name: admin:utils_jobschedule_changelist querystr: status__exact=A main_menu: