23 lines
No EOL
723 B
Python
23 lines
No EOL
723 B
Python
from django.contrib import admin
|
|
from apps.agents.models import Agent, AgentExecution, AgentEvent
|
|
|
|
|
|
@admin.register(Agent)
|
|
class AgentAdmin(admin.ModelAdmin):
|
|
list_display = ('name', 'user', 'status', 'created_at')
|
|
list_filter = ('status', 'created_at')
|
|
search_fields = ('name', 'description')
|
|
|
|
|
|
@admin.register(AgentExecution)
|
|
class AgentExecutionAdmin(admin.ModelAdmin):
|
|
list_display = ('agent', 'user', 'status', 'created_at')
|
|
list_filter = ('status', 'created_at')
|
|
search_fields = ('agent__name',)
|
|
|
|
|
|
@admin.register(AgentEvent)
|
|
class AgentEventAdmin(admin.ModelAdmin):
|
|
list_display = ('event_type', 'execution', 'timestamp')
|
|
list_filter = ('event_type', 'timestamp')
|
|
search_fields = ('execution__agent__name',) |