diff --git a/templates/admin/request.html b/templates/admin/request.html index 75d93aa..8730db3 100644 --- a/templates/admin/request.html +++ b/templates/admin/request.html @@ -268,9 +268,33 @@ {% endif %} {% if req.musicgpt_status %} -

MusicGPT: {{ req.musicgpt_status }} - {% if req.musicgpt_cost is not none %}({{ format_musicgpt_cost(req.musicgpt_cost) }}){% endif %} -

+
    + {% set mg_steps = [ + ('IN_QUEUE', 'Queued'), + ('IN_PROGRESS', 'Generating'), + ('COMPLETED', 'Completed') + ] %} + {% set current_mg = req.musicgpt_status %} + {% set ns = namespace(mg_index=-1) %} + {% for j in range(mg_steps|length) %} + {% if mg_steps[j][0] == current_mg %}{% set ns.mg_index = j %}{% endif %} + {% endfor %} + {% if current_mg in ('FAILED', 'ERROR', 'CANCELLED') %}{% set ns.mg_index = -2 %}{% endif %} + {% for j in range(mg_steps|length) %} + {% set mg_key, mg_label = mg_steps[j] %} + {% set mg_completed = j < ns.mg_index %} + {% set mg_current = j == ns.mg_index %} +
  1. +
    + {% if mg_completed %}✓{% else %}{{ j + 1 }}{% endif %} +
    +
    {{ mg_label }}
    +
  2. + {% endfor %} +
+ {% if req.musicgpt_cost is not none %} +

LLM Cost: {{ format_musicgpt_cost(req.musicgpt_cost) }}

+ {% endif %} {% endif %} {% if req.status != 'cancelled' %}