{% if spaces %} {% set grouped_spaces = {} %} {% for space in spaces %} {% if space.owner not in grouped_spaces %} {% set _ = grouped_spaces.update({space.owner: []}) %} {% endif %} {% set _ = grouped_spaces[space.owner].append(space) %} {% endfor %}
{% set total_spaces = spaces|length %} {% set running_spaces = spaces|selectattr('status', 'equalto', 'RUNNING')|list|length %} {% set sleeping_spaces = spaces|selectattr('status', 'equalto', 'SLEEPING')|list|length %} {% set stopped_spaces = spaces|selectattr('status', 'equalto', 'STOPPED')|list|length %} {% set failed_spaces = spaces|selectattr('status', 'equalto', 'FAILED')|list|length %}
{{ total_spaces }}
总空间数
{{ running_spaces }}
运行中
{{ sleeping_spaces }}
休眠中
{{ stopped_spaces }}
已停止
{{ failed_spaces }}
运行失败
{% for owner, owner_spaces in grouped_spaces.items() %} {% set running_count = owner_spaces|selectattr('status', 'equalto', 'RUNNING')|list|length %} {% set building_count = owner_spaces|selectattr('status', 'equalto', 'BUILDING')|list|length %} {% set sleeping_count = owner_spaces|selectattr('status', 'equalto', 'SLEEPING')|list|length %} {% set stopped_count = owner_spaces|selectattr('status', 'equalto', 'STOPPED')|list|length %} {% set failed_count = owner_spaces|selectattr('status', 'equalto', 'FAILED')|list|length %}
{{ owner }}
运行中: {{ running_count }} 休眠: {{ sleeping_count }} 停止: {{ stopped_count }} 失败: {{ failed_count }}
{% for space in owner_spaces %}
{{ space.name }}
{{ space.status }}
Space ID {{ space.repo_id }}
创建时间 {{ space.created_at }}
最后修改 {{ space.last_modified }}
应用端口 {{ space.app_port }}
{{ space.sdk }}
SDK 版本
{{ '私有' if space.private else '公开' }}
访问权限
查看
{% endfor %}
{% endfor %} {% else %}

没有找到任何 Spaces。请确保你的账户中有创建的 Spaces,并且提供的 token 有正确的权限。

{% endif %}