@@ -33,28 +33,6 @@
|
||||
<el-tag :type="statusTag(scope.row.last_status)">{% raw %}{{ scope.row.last_status || 'never' }}{% endraw %}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="健康状态" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="healthTag(scope.row.health_status)">{% raw %}{{ healthLabel(scope.row.health_status) }}{% endraw %}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="latest_success_at" label="最近成功" min-width="170"></el-table-column>
|
||||
<el-table-column label="最近失败原因" min-width="240">
|
||||
<template slot-scope="scope">
|
||||
<div class="cell-ellipsis" :title="scope.row.latest_failure_summary || scope.row.last_error || '-'">
|
||||
{% raw %}{{ scope.row.latest_failure_summary || scope.row.last_error || '-' }}{% endraw %}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="历史执行" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<div class="history-metrics">
|
||||
<span class="metric-success">{% raw %}{{ `成 ${scope.row.history_success_count || 0}` }}{% endraw %}</span>
|
||||
<span class="metric-fail">{% raw %}{{ `失 ${scope.row.history_fail_count || 0}` }}{% endraw %}</span>
|
||||
</div>
|
||||
<div class="history-total">{% raw %}{{ `共 ${scope.row.history_total_count || 0}` }}{% endraw %}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="280">
|
||||
<template slot-scope="scope">
|
||||
<div class="action-row">
|
||||
@@ -165,23 +143,6 @@ new Vue({
|
||||
if (status === 'running') return 'warning';
|
||||
return 'info';
|
||||
},
|
||||
healthTag(status) {
|
||||
if (status === 'healthy') return 'success';
|
||||
if (status === 'running') return 'warning';
|
||||
if (status === 'failed') return 'danger';
|
||||
if (status === 'disabled') return 'info';
|
||||
return '';
|
||||
},
|
||||
healthLabel(status) {
|
||||
const mapping = {
|
||||
healthy: '健康',
|
||||
running: '执行中',
|
||||
failed: '异常',
|
||||
disabled: '停用',
|
||||
idle: '待运行'
|
||||
};
|
||||
return mapping[status] || '待运行';
|
||||
},
|
||||
async loadJobs() {
|
||||
this.loading = true;
|
||||
try {
|
||||
@@ -308,10 +269,5 @@ new Vue({
|
||||
.page-hero-copy h1{font-size:30px;line-height:1.1;margin-bottom:10px;color:#0f172a}
|
||||
.page-hero-copy p{color:#64748b;font-size:14px}
|
||||
.action-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
|
||||
.cell-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#475569}
|
||||
.history-metrics{display:flex;align-items:center;justify-content:center;gap:8px}
|
||||
.metric-success{color:#16a34a;font-weight:600}
|
||||
.metric-fail{color:#dc2626;font-weight:600}
|
||||
.history-total{margin-top:4px;color:#64748b;font-size:12px}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user