Add Image Generation Settings Endpoint and Update Frontend Modal: Implement a new API endpoint to fetch image generation settings, enhance the ImageQueueModal to display progress and status, and integrate the settings into the image generation workflow.

This commit is contained in:
Desktop
2025-11-12 03:50:34 +05:00
parent e89eaab0f2
commit 27ec18727c
6 changed files with 590 additions and 286 deletions

View File

@@ -45,6 +45,10 @@ integration_task_progress_viewset = IntegrationSettingsViewSet.as_view({
'get': 'task_progress',
})
integration_image_gen_settings_viewset = IntegrationSettingsViewSet.as_view({
'get': 'get_image_generation_settings',
})
urlpatterns = [
path('', include(router.urls)),
# System status endpoint
@@ -55,6 +59,8 @@ urlpatterns = [
path('webhook/', gitea_webhook, name='gitea-webhook'),
# Integration settings routes - exact match to reference plugin workflow
# IMPORTANT: More specific paths must come BEFORE less specific ones
# GET: Image generation settings - MUST come before other settings paths
path('integrations/image_generation/', integration_image_gen_settings_viewset, name='integration-image-gen-settings'),
# GET: Task progress - MUST come before other settings paths
path('settings/task_progress/<str:task_id>/', integration_task_progress_viewset, name='integration-task-progress'),
# POST: Generate image (for image_generation integration) - MUST come before base path