fix(work): return approval state cards directly from callbacks
This commit is contained in:
@@ -13,6 +13,7 @@ DELIVERY={None:'尚未接收结果','ready':'已接收结果,等待投递','se
|
||||
def card_content(task_id,execution,delivery,files=None,connection_lost=False,remote_approvals=False):
|
||||
execution=execution if execution in EXECUTION else 'unknown'
|
||||
color='green' if execution=='completed' else 'red' if execution in {'failed','interrupted'} else 'orange' if execution in {'waiting_for_approval','unknown'} else 'blue'
|
||||
if execution=='cancelled':color='grey'
|
||||
label=EXECUTION[execution]
|
||||
if connection_lost and execution not in {'completed','failed','cancelled','interrupted'}:
|
||||
color='red';label='客户端失联,任务结果待核对'
|
||||
|
||||
Reference in New Issue
Block a user