You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
2.6 KiB
Smarty
13 lines
2.6 KiB
Smarty
{foreach $operations_page.items|default:[] as $job}
|
|
<tr data-operation-id="{$job.id|escape}">
|
|
<td data-label="任务"><span class="admin-checkout-user"><strong>#{$job.id|escape} · {$job.display.kind|escape}</strong><span>{if $job.created_at}创建 {$job.created_at|date_format:'%Y-%m-%d %H:%M:%S'|escape}{else}创建时间未记录{/if}</span></span></td>
|
|
<td data-label="关联实例"><span class="admin-checkout-user"><strong>{$job.instance_name|default:'无关联实例'|escape}</strong>{if $job.instance_id}<span>实例 #{$job.instance_id|escape}</span>{/if}{if $job.order_id}<span>订单 #{$job.order_id|escape}</span>{/if}</span></td>
|
|
<td data-label="用户"><span class="admin-checkout-user"><strong>操作人:{$job.actor_name|default:'未记录'|escape}{if $job.actor_id} #{$job.actor_id|escape}{/if}</strong>{if $job.owner_id}<span>所属:{$job.owner_name|default:'未记录'|escape} #{$job.owner_id|escape}</span>{/if}</span></td>
|
|
<td data-label="宿主机"><span class="admin-checkout-user"><strong>{$job.host_name|default:'未记录'|escape}</strong><span>{$job.region|default:'地区未记录'|escape}</span></span></td>
|
|
<td data-label="状态"><span class="admin-checkout-user"><strong class="{if $job.status == 'failed'}text-danger{elseif $job.attention}text-warning{elseif $job.status == 'succeeded'}text-success{/if}">{$job.display.status|escape}</strong>{if $job.attention}<span class="text-warning">{$job.display.attention|escape}</span>{/if}</span></td>
|
|
<td data-label="执行与调度"><span class="admin-checkout-user"><strong>尝试 {$job.attempts|escape} 次</strong><span>{$job.display.lease|escape}</span></span></td>
|
|
<td data-label="更新与异常"><span class="admin-checkout-user"><strong>{if $job.updated_at}{$job.updated_at|date_format:'%Y-%m-%d %H:%M:%S'|escape}{else}更新时间未记录{/if}</strong>{if $job.error}<span class="text-danger">{$job.error|escape}</span>{else}<span>未记录错误</span>{/if}</span></td>
|
|
<td data-label="操作"><div class="d-flex flex-wrap gap-1"><button class="btn btn-primary btn-sm" type="button" data-operation-detail="{$job.id|escape}" aria-label="查看任务 #{$job.id|escape} 的详情">查看详情</button>{if $admin_can_manage|default:false && $job.can_cancel|default:false}<button class="btn btn-outline-danger btn-sm" type="button" data-operation-cancel="{$job.id|escape}" aria-label="中止任务 #{$job.id|escape}">中止任务</button>{/if}</div></td>
|
|
</tr>
|
|
{foreachelse}<tr><td colspan="8" class="text-center text-muted py-4">{if $operations_error|default:''}任务暂时无法读取,请点击刷新重试。{else}没有符合条件的任务。{/if}</td></tr>{/foreach}
|