{# 公共 Action 表格模板 #} {# 参数: actions: 动作列表 title: 表格标题(默认 "Actions") table_class: 表格 CSS 类(默认 "action-table") #} {% macro render_action_table(actions, title="Actions", table_class="action-table") %}
| # | action | status | duration(ms) | inputs | output | error | artifacts |
|---|---|---|---|---|---|---|---|
| {{ action.action_index }} |
{{ action.action_name }}
{% if action.origin %}
{{ action.origin.name|default("") }} {% endif %} |
{{ status_badge(action.status) }} | {{ "%.3f"|format(action.duration_ms|default(0)) }} | {{ json_pretty(action.inputs|default({})) }} |
{{ json_pretty(action.output|default(null)) }} |
{% if action.error_type %}{{ action.error_type }} {% endif %} {{ action.error_message|default("") }} {% if action.stacktrace %} stacktrace{{ action.stacktrace }}
|
{% if action.artifacts %}
{{ action.artifacts|length }} 个产物{% for art in action.artifacts %} {% if art.type == "image" and art.path %} {% elif art.type == "file" and art.path %} {% else %}{{ json_pretty(art) }}
{% endif %}
{% endfor %}
|