fix: Fix the problem of abnormal display of snapshot task logs (#8676)

Refs #8657
This commit is contained in:
ssongliu 2025-05-15 18:10:35 +08:00 committed by GitHub
parent b817f13212
commit c72bbaa5f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View file

@ -103,7 +103,6 @@ func (u *CronjobService) loadTask(cronjob *model.Cronjob, record *model.JobRecor
case "log":
err = u.handleSystemLog(*cronjob, record.StartTime, taskItem)
case "snapshot":
taskItem.Task.Type = task.TaskScopeSnapshot
_ = cronjobRepo.UpdateRecords(record.ID, map[string]interface{}{"records": record.Records})
err = u.handleSnapshot(*cronjob, *record, taskItem)
}

View file

@ -91,7 +91,7 @@
<template #default="{ row }">
<div>
<el-button
@click="openWithResource(row, 'create')"
@click="openTaskLog(row.taskID)"
link
v-if="row.status === 'Waiting'"
type="primary"
@ -99,7 +99,7 @@
{{ $t('setting.snapshot') }}{{ $t('commons.status.waiting') }}
</el-button>
<el-button
@click="openWithResource(row, 'create')"
@click="openTaskLog(row.taskID)"
link
v-if="row.status === 'Failed'"
type="danger"
@ -115,7 +115,7 @@
@click="reCreate(row)"
/>
<el-button
@click="openWithResource(row, 'create')"
@click="openTaskLog(row.taskID)"
link
v-if="row.status === 'Success'"
type="success"