Skip to content

Commit 9e4f865

Browse files
committed
fix(dbm-services): 演练报告数量统计错误 #14615
1 parent fcb7e50 commit 9e4f865

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

dbm-ui/backend/db_report/views/revover_drill_report_view.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class RecoverDrillTaskViewSet(BaseDrillReportViewSet):
132132
},
133133
{
134134
"name": "backup_total_size",
135-
"display_name": _("备份大小"),
135+
"display_name": _("备份大小(G)"),
136136
"format": ReportFieldFormat.TEXT.value,
137137
},
138138
{
@@ -147,8 +147,8 @@ class RecoverDrillTaskViewSet(BaseDrillReportViewSet):
147147
"format": ReportFieldFormat.TEXT.value,
148148
},
149149
{
150-
"name": "status",
151-
"display_name": _("任务状态"),
150+
"name": "state",
151+
"display_name": _("状态"),
152152
"format": ReportFieldFormat.STATUS.value,
153153
},
154154
{

dbm-ui/backend/flow/plugins/components/collections/mysql/mysql_backup_recovery_exercise.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def _execute(self, data, parent_data) -> bool:
4242
elif kwargs["task_status"] == TaskStatus.RECOVER_SUCCESS:
4343
# 如果是恢复成功,则更新任务结束时间
4444
tsk.recover_end_time = timezone.now()
45+
tsk.state = ReportStateType.NORMAL.value
4546
tsk.save(update_fields=["task_status", "recover_end_time"])
4647
elif kwargs["task_status"] == TaskStatus.RECOVER_FAILED:
4748
# 备份恢复失败时,设置 state 为 abnormal,且后续不再改变

0 commit comments

Comments
 (0)