feat: add workflow recovery controls to console
This commit is contained in:
@@ -196,6 +196,11 @@
|
||||
<div class="detail-block"><div class="detail-block-heading"><span>步骤状态</span><small id="workflow-steps-count">加载中</small></div><div class="detail-list" id="workflow-steps"><div class="detail-loading">正在读取步骤…</div></div></div>
|
||||
<div class="detail-block"><div class="detail-block-heading"><span>事件时间线</span><small id="workflow-events-count">加载中</small></div><div class="detail-list" id="workflow-events"><div class="detail-loading">正在读取事件…</div></div></div>
|
||||
<div class="detail-block" id="workflow-output-block" hidden><div class="detail-block-heading"><span>流程输出</span><small>只读快照</small></div><pre id="workflow-output"></pre></div>
|
||||
<div class="detail-block recovery-block" id="workflow-recovery-block" hidden>
|
||||
<div class="detail-block-heading"><span>人工核查与恢复</span><small id="workflow-recovery-hint">需要 workflows:recover</small></div>
|
||||
<p class="recovery-intro">只在 NEEDS_REVIEW 状态显示。每个决定都要引用外部证据,并使用当前流程、步骤和激活修订;服务端会再次校验所有门控。</p>
|
||||
<div class="recovery-action-grid" id="workflow-recovery-actions"></div>
|
||||
</div>
|
||||
<div class="drawer-actions" id="workflow-actions" hidden><button class="quiet-button" id="workflow-control-button" type="button">暂停流程</button><button class="quiet-button danger-button" id="workflow-cancel-button" type="button">取消流程</button></div>
|
||||
<p class="drawer-note" id="workflow-detail-note">流程详情只读取当前权威视图;事件审计需要 workflows:audit:read 权限,所有控制操作仍由服务端权限和并发版本校验。</p>
|
||||
<form class="action-form" id="workflow-action-form" hidden>
|
||||
@@ -205,6 +210,29 @@
|
||||
<div class="action-form-buttons"><button class="quiet-button" id="workflow-action-cancel" type="button">返回</button><button class="primary-button compact" id="workflow-action-submit" type="submit">提交控制 →</button></div>
|
||||
<div class="action-error" id="workflow-action-error" role="alert"></div>
|
||||
</form>
|
||||
<form class="action-form recovery-form" id="workflow-recovery-form" hidden>
|
||||
<div class="action-form-heading"><span class="panel-kicker">WEAVE RECOVERY</span><h3 id="workflow-recovery-title">人工恢复</h3></div>
|
||||
<p id="workflow-recovery-description">提交后会写入流程审计,并按当前版本重新读取实例。</p>
|
||||
<div class="recovery-snapshot" id="workflow-recovery-snapshot">当前流程修订 — · 当前步骤 —</div>
|
||||
<label class="field-label" for="workflow-recovery-reason">核查原因</label><textarea id="workflow-recovery-reason" rows="3" maxlength="1024" placeholder="说明你核实了什么事实,以及为什么可以执行该决定"></textarea>
|
||||
<label class="field-label" for="workflow-recovery-evidence">证据引用</label><input id="workflow-recovery-evidence" type="text" maxlength="512" placeholder="例如 evidence:query-001(不能含空格)">
|
||||
<div id="workflow-recovery-step-fields" hidden>
|
||||
<label class="field-label" for="workflow-recovery-step-key">步骤键</label><input id="workflow-recovery-step-key" type="text" maxlength="64" placeholder="当前步骤 key">
|
||||
<label class="field-label" for="workflow-recovery-activation-id">激活 ID</label><input id="workflow-recovery-activation-id" type="text" maxlength="32" placeholder="当前激活代次 ID">
|
||||
<label class="field-label" for="workflow-recovery-step-revision">步骤修订</label><input id="workflow-recovery-step-revision" type="number" min="1" step="1" placeholder="当前步骤 revision">
|
||||
</div>
|
||||
<div id="workflow-recovery-task-fields" hidden>
|
||||
<label class="field-label" for="workflow-recovery-task-id">任务 ID</label><input id="workflow-recovery-task-id" type="text" maxlength="32" placeholder="待核查任务 ID">
|
||||
<label class="field-label" for="workflow-recovery-task-revision">任务修订</label><input id="workflow-recovery-task-revision" type="number" min="1" step="1" placeholder="当前任务 revision">
|
||||
</div>
|
||||
<div class="recovery-inline-fields" id="workflow-recovery-outcome-fields" hidden>
|
||||
<div><label class="field-label" for="workflow-recovery-outcome">结论</label><select id="workflow-recovery-outcome"><option value="SUCCEEDED">SUCCEEDED · 成功</option><option value="FAILED">FAILED · 失败</option></select></div>
|
||||
<div id="workflow-recovery-result-wrap"><label class="field-label" for="workflow-recovery-result">结果 JSON</label><textarea id="workflow-recovery-result" rows="3" placeholder="例如 {"status":"DONE"};TIMER 成功可填 null"></textarea></div>
|
||||
</div>
|
||||
<label class="check-row" id="workflow-recovery-confirm-row"><input id="workflow-recovery-confirm" type="checkbox"><span id="workflow-recovery-confirm-label">我确认已核实当前事项,可以提交这个恢复决定。</span></label>
|
||||
<div class="action-form-buttons"><button class="quiet-button" id="workflow-recovery-cancel" type="button">返回</button><button class="primary-button compact" id="workflow-recovery-submit" type="submit">提交恢复 →</button></div>
|
||||
<div class="action-error" id="workflow-recovery-error" role="alert"></div>
|
||||
</form>
|
||||
</aside>
|
||||
</div>
|
||||
<div class="drawer-backdrop" id="subscription-drawer-backdrop" hidden>
|
||||
|
||||
Reference in New Issue
Block a user