Skip to content

Commit

Permalink
fix: bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
iSecloud committed Oct 12, 2024
1 parent f299073 commit 3350521
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dbm-ui/backend/ticket/flow_manager/delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,14 @@ def _end_time(self) -> Optional[str]:
return datetime2str(self.pre_flow_tree.updated_at)

@property
def _summary(self) -> str:
def _summary(self) -> dict:
if self.pre_flow_tree.status in FAILED_STATES:
return _("失败后继续提交")
return {"status": TicketFlowStatus.FAILED, "message": _("失败后继续提交")}
elif self.pre_flow_tree.status in SUCCEED_STATES:
return _("执行成功")
return {"status": TicketFlowStatus.SUCCEEDED, "message": _("执行成功")}
else:
return _("执行{}".format(StateType.get_choice_label(self.pre_flow_tree.status)))
state = StateType.get_choice_label(self.pre_flow_tree.status)
return {"status": TicketFlowStatus.RUNNING, "message": _("执行{}".format(state))}

@property
def _url(self) -> str:
Expand Down

0 comments on commit 3350521

Please sign in to comment.