{% extends "base.html" %} {% block nav_key %}dashboard{% endblock %} {% block title %}续火花控制台{% endblock %} {% block page_title %}今日续火花概览{% endblock %} {% block page_subtitle %}多账号发送与运营管理{% endblock %} {% block topbar_actions %} 发送控制台
{% endblock %} {% block content %} {% set task_lock = ops.task_lock %} {% set enabled_accounts = accounts | selectattr("enabled", "equalto", true) | list %} {% set send_summary = ops.send_console.summary %} {% set total_targets = send_summary.total_targets or 0 %} {% set done_targets = send_summary.today_sent_targets or 0 %} {% set failed_targets = send_summary.today_failed_targets or 0 %} {% set pending_targets = send_summary.today_pending_targets or 0 %} {% set unproc_targets = send_summary.today_unprocessed_targets or 0 %} {% set block_targets = send_summary.today_account_blocked_targets or 0 %} {% set ring_total = total_targets if total_targets > 0 else 1 %} {% set ring_pct = (done_targets / ring_total * 100) | round(0) | int %} {% set ring_circ = 490 %} {% set ring_offset = (ring_circ * (1 - ring_pct / 100)) | round(1) %} {% set success_rate = (done_targets / ring_total * 100) | round(0) | int if total_targets else 0 %} {% set remaining = total_targets - done_targets %}
{# ---- task state ---- #} {% if task_lock and task_lock.running %}
发送任务运行中:pid {{ task_lock.pid or "unknown" }},已运行约 {{ task_lock.ageSeconds }} 秒。补发按钮会等任务结束后再可用。
{% elif task_lock and task_lock.staleRemoved %}
已自动清理一个过期任务锁,可以重新发起补发。
{% else %}
当前没有发送任务运行。
{% endif %} {# ---- bento hero ---- #}

今日续火花进度

实时
{{ done_targets }}/{{ total_targets }}
今日成功 / 总目标
{{ ring_pct }}% 已完成

火花概览

全部账号
🔥
{{ enabled_accounts|length }}
启用账号 · 共 {{ accounts|length }} 个
今日成功率{{ success_rate }}%
未完成目标{{ remaining }}
今日火花状态 {% for i in range(5) %}{% endfor %}

今日状态分布

{{ total_targets }} 个目标
今日成功
{{ done_targets }}
已完成 {{ done_targets }}/{{ total_targets }}
失败待补发
{{ failed_targets }}
进入重试队列
待发送
{{ pending_targets }}
排队等待中
未处理
{{ unproc_targets }}
尚未进入流程
{# ---- send summary table ---- #}

发送控制台摘要

每个账号今天的发送状态分布,进入发送控制台可做批量补发或针对性重试。

打开发送控制台 →
{% for row in ops.send_console.accounts %} {% set row_total = row.total_targets or 1 %} {% set row_done = row.sent_targets|length %} {% set row_pct = (row_done / row_total * 100)|round(0)|int %} {% else %} {% endfor %}
账号完成进度今日成功失败待补发待发送未处理账号异常最近失败原因
{{ row.username }}
{{ row.unique_id }}
{{ row_done }}/{{ row.total_targets }}
{{ row_done }} {% if row.failed_targets|length %}{{ row.failed_targets|length }}{% else %}0{% endif %} {{ row.pending_targets|length }} {{ row.unprocessed_targets|length }} {% if row.account_blocked_targets|length %}{{ row.account_blocked_targets|length }}{% else %}0{% endif %} {% if row.last_failure_reason %}{{ row.last_failure_reason }}{% elif row.account_failure %}账号异常:{{ row.account_failure.category or "-" }}{% else %}-{% endif %}
当前没有发送摘要数据。
{# ---- activity timeline ---- #}

实时发送动态

打开发送控制台 →
{% set ns = namespace(rows=[]) %} {% for acct in ops.send_console.accounts %} {% for item in acct.sent_targets[:6] %}{% set ns.rows = ns.rows + [{type:'ok', acc:acct.username, target:item.target, msg:item.message, time:item.sentAt}] %}{% endfor %} {% for item in acct.failed_targets[:4] %}{% set ns.rows = ns.rows + [{type:'no', acc:acct.username, target:item.target, msg:item.reason, time:item.category}] %}{% endfor %} {% for item in acct.pending_targets[:4] %}{% set ns.rows = ns.rows + [{type:'wait', acc:acct.username, target:item.target, msg:item.scheduledAt, time:'待发送'}] %}{% endfor %} {% endfor %} {% if ns.rows %}
{% for r in ns.rows[:10] %}
{% if r.type == 'ok' %}✓{% elif r.type == 'no' %}✗{% else %}◔{% endif %}
{{ r.acc }} → {{ r.target }} {% if r.type == 'ok' %}续火花成功{% elif r.type == 'no' %}发送失败{% else %}等待发送{% endif %}
{% if r.type == 'ok' and r.msg %}消息:{{ r.msg }}{% elif r.type == 'no' and r.msg %}原因:{{ r.msg }}{% elif r.type == 'wait' and r.msg %}预计 {{ r.msg }} 发送{% else %}—{% endif %}
{{ r.time or '—' }}
{% endfor %}
{% else %}
今日暂无发送动态。任务运行后会在这里实时显示成功 / 失败 / 待发送记录。
{% endif %}
{# ---- interactive login browser (full width) ---- #}

登录抖音账号

交互式登录浏览器

检查中

通过 noVNC 打开远端浏览器,手动扫码登录抖音,再把登录态保存回系统。适合登录态失效或批量修复。

{# ---- account management ---- #}

账号管理

点击账号展开管理开关、目标好友、好友缓存、登录同步与删除。共 {{ accounts|length }} 个账号。

{% if accounts %}
{% for account in accounts %} {% endfor %}
{% else %}
当前没有账号。先通过交互式登录浏览器登录并保存账号。
{% endif %}

容器状态

{% for row in ops.containers %}{% else %}{% endfor %}
NameStatusImage
{{ row.Names }}{{ row.Status }}{{ row.Image }}
当前没有可见容器状态。

Cron / 调度

{{ ops.crontab or "当前没有 crontab 任务。" }}

日志预览

{{ ops.log_tail or "暂无日志" }}
{% endblock %} {% block scripts %} {% endblock %}