refactor(v2): isolate legacy provider stack and prune obsolete tests
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
from django.contrib import admin
|
||||
from django.conf import settings
|
||||
|
||||
from .models import ImportFile, ImportRun, IngestionError, IngestionRun
|
||||
|
||||
@ -91,15 +92,18 @@ class ImportFileAdmin(admin.ModelAdmin):
|
||||
)
|
||||
|
||||
|
||||
@admin.register(IngestionRun)
|
||||
class LegacyIngestionRunAdmin(admin.ModelAdmin):
|
||||
list_display = ("provider_namespace", "job_type", "status", "started_at", "finished_at")
|
||||
list_filter = ("provider_namespace", "job_type", "status")
|
||||
search_fields = ("provider_namespace", "error_summary")
|
||||
|
||||
|
||||
@admin.register(IngestionError)
|
||||
class LegacyIngestionErrorAdmin(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")
|
||||
|
||||
|
||||
if settings.LEGACY_PROVIDER_STACK_ENABLED:
|
||||
admin.site.register(IngestionRun, LegacyIngestionRunAdmin)
|
||||
admin.site.register(IngestionError, LegacyIngestionErrorAdmin)
|
||||
|
||||
Reference in New Issue
Block a user