phase3: add normalized domain schema, admin, services, and multistage docker build
This commit is contained in:
32
apps/ingestion/admin.py
Normal file
32
apps/ingestion/admin.py
Normal file
@ -0,0 +1,32 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from .models import IngestionError, IngestionRun
|
||||
|
||||
|
||||
class IngestionErrorInline(admin.TabularInline):
|
||||
model = IngestionError
|
||||
extra = 0
|
||||
readonly_fields = ("occurred_at",)
|
||||
|
||||
|
||||
@admin.register(IngestionRun)
|
||||
class IngestionRunAdmin(admin.ModelAdmin):
|
||||
list_display = (
|
||||
"provider_namespace",
|
||||
"job_type",
|
||||
"status",
|
||||
"records_processed",
|
||||
"records_failed",
|
||||
"started_at",
|
||||
"finished_at",
|
||||
)
|
||||
list_filter = ("provider_namespace", "job_type", "status")
|
||||
search_fields = ("provider_namespace",)
|
||||
inlines = (IngestionErrorInline,)
|
||||
|
||||
|
||||
@admin.register(IngestionError)
|
||||
class IngestionErrorAdmin(admin.ModelAdmin):
|
||||
list_display = ("provider_namespace", "entity_type", "external_id", "severity", "occurred_at")
|
||||
list_filter = ("severity", "provider_namespace")
|
||||
search_fields = ("entity_type", "external_id", "message")
|
||||
Reference in New Issue
Block a user