mirror of
https://github.com/thecyberlearn/quantum-ai-v2.git
synced 2026-08-18 22:32:59 +00:00
## Major System Simplification - **90% reduction** in agent configuration complexity (369 → 83 lines) - Removed unused dynamic field system (174 lines eliminated) - Deleted generic template fallback (dead code removal) - Enhanced JavaScript utilities with 15+ shared functions ## New Workflows App Architecture - Unified agent processing with hybrid N8N/Django approach - Shared component system (6 reusable components) - Individual templates with consistent UI patterns - Configuration-driven agent definitions (metadata only) ## Enhanced Developer Experience - 4-step agent creation process (vs complex multi-step before) - Agent template starter file for easy copying - Comprehensive documentation with before/after examples - Enhanced WorkflowsCore utilities for common operations ## Files Added - `workflows/` - Complete new Django app with simplified architecture - `agent-template-starter.html` - Template for easy agent creation - `workflows-core.js` - Enhanced JavaScript utilities (15+ functions) - Shared components: header, quick-agents, processing, results, wallet - Simplified agent configs (5 lines vs 50+ lines each) ## Benefits Achieved ✅ 90% less configuration code per agent ✅ Shared component reusability with dynamic data ✅ Enhanced JavaScript utilities automatically available ✅ Consistent UI/UX across all agents ✅ Dramatically simplified maintenance 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
36 lines
1.3 KiB
Python
36 lines
1.3 KiB
Python
from django.contrib import admin
|
|
from .models import WorkflowRequest, WorkflowResponse, WorkflowAnalytics
|
|
|
|
|
|
@admin.register(WorkflowRequest)
|
|
class WorkflowRequestAdmin(admin.ModelAdmin):
|
|
list_display = ['id', 'user', 'agent_slug', 'status', 'created_at']
|
|
list_filter = ['status', 'agent_slug', 'created_at']
|
|
search_fields = ['user__username', 'agent_slug', 'id']
|
|
readonly_fields = ['id', 'created_at', 'updated_at']
|
|
|
|
def get_queryset(self, request):
|
|
return super().get_queryset(request).select_related('user')
|
|
|
|
|
|
@admin.register(WorkflowResponse)
|
|
class WorkflowResponseAdmin(admin.ModelAdmin):
|
|
list_display = ['request', 'success', 'processing_time', 'created_at']
|
|
list_filter = ['success', 'created_at']
|
|
search_fields = ['request__id', 'request__user__username']
|
|
readonly_fields = ['created_at']
|
|
|
|
def get_queryset(self, request):
|
|
return super().get_queryset(request).select_related('request__user')
|
|
|
|
|
|
@admin.register(WorkflowAnalytics)
|
|
class WorkflowAnalyticsAdmin(admin.ModelAdmin):
|
|
list_display = ['agent_slug', 'user', 'success', 'processing_time', 'date']
|
|
list_filter = ['success', 'agent_slug', 'date']
|
|
search_fields = ['user__username', 'agent_slug']
|
|
date_hierarchy = 'date'
|
|
|
|
def get_queryset(self, request):
|
|
return super().get_queryset(request).select_related('user')
|