TradingAgents/webapp/templates/_partials/left_panel.html

52 lines
2.0 KiB
HTML

{% macro render_item(item) %}
<li class="process-item status-{{ item.status }}" id="item-{{ item.id }}">
<div class="item-header">
{% if item.children %}
<button class="toggle-btn" onclick="toggleNode(this)" aria-label="Toggle children">
<span class="toggle-icon"></span>
</button>
{% else %}
<span class="toggle-spacer"></span>
{% endif %}
<span hx-get="/content/{{ item.id }}" hx-target="#right-panel" hx-swap="innerHTML" class="item-name clickable">
<span class="status-icon" id="status-icon-{{ item.id }}">
{% if item.status == 'completed' %}✅
{% elif item.status == 'in_progress' %}⏳
{% elif item.status == 'error' %}❌
{% else %}⏸️
{% endif %}
</span>
{{ item.name }}
</span>
</div>
{% if item.children %}
<ul class="item-children collapsed" id="children-{{ item.id }}">
{% for child in item.children %}
{{ render_item(child) }}
{% endfor %}
</ul>
{% endif %}
</li>
{% endmacro %}
<div id="overall-progress-bar" hx-swap-oob="true" style="width:{{ app_state.overall_progress }}%;"></div>
<span id="overall-progress-text" hx-swap-oob="true">{{ app_state.overall_progress }}% ({{ app_state.overall_status }})</span>
<h2>
{% if app_state.company_symbol %}
Trading Analysis for {{ app_state.company_symbol }}
{% else %}
Execution Status
{% endif %}
</h2>
{% if tree %}
<ul class="execution-tree" id="execution-tree" hx-get="/status-content" hx-trigger="every 5s" hx-swap="innerHTML">
{% for item in tree %}
{{ render_item(item) }}
{% endfor %}
</ul>
{% else %}
<p id="execution-tree">No process running. Start a new one from the configuration.</p>
{% endif %}