<%- include('../partials/admin-header') %>

监控任务 & 检测记录

<% if (flash) { %>
<%= decodeURIComponent(flash) %>
<% } %>

创建监控任务

调度器

<%= schedulerRunning ? '运行中' : '已停止' %> <% if (schedulerRunning) { %>
<% } else { %>
<% } %>

任务列表

<% tasks.forEach(t => { %> <% }) %> <% if (tasks.length === 0) { %> <% } %>
ID产品频道Cron状态上次运行操作
<%= t.id %> <%= t.merchant_name %> — <%= t.product_name %> <%= t.channel_name || '-' %> <%= t.cron_expr %> <%= t.enabled ? '启用' : '禁用' %> <%= t.last_run || '-' %>
暂无任务,请先创建

最近检测记录(最新 50 条)

<% logs.forEach(l => { %> <% }) %> <% if (logs.length === 0) { %> <% } %>
ID产品状态消息已推送时间
<%= l.id %> <%= l.product_name || l.product_id %> <% if (l.status === 'in_stock') { %>有货 <% } else if (l.status === 'out_of_stock') { %>缺货 <% } else { %><%= l.status %><% } %> <%= l.message || '-' %> <%= l.notified ? '✅' : '❌' %> <%= l.created_at %>
暂无记录
<%- include('../partials/footer') %>