Source code for ferrosoft.apps.dataimport.tables

from django.urls import reverse
from django.utils.translation import gettext_lazy as _

from ferrosoft.apps.dataimport.models import ImportJob
from ferrosoft.apps.ferrobase import tables
from ferrosoft.apps.ferrobase.tables import ActionColumn
from ferrosoft.apps.ferrobase.views import table_template_bs5


[docs] class RecentJobsTable(tables.Table):
[docs] class Meta: template_name = table_template_bs5 model = ImportJob fields = [ "creation_time", "name", "line_count", "status", "collection", ]
view = ActionColumn( verbose_name=_("View"), label=_("View"), href=lambda record, **kwargs: reverse( "dataimport:job_detail", kwargs={"id": record.pk} ), font_icon="bi bi-eye", )