Add files via upload

This commit is contained in:
公明
2026-07-07 17:29:20 +08:00
committed by GitHub
parent 95e00563da
commit eb542e38f5
3 changed files with 59 additions and 4 deletions
+38
View File
@@ -32872,6 +32872,12 @@ html[data-theme="dark"] .form-group select {
overflow-y: auto;
}
.workflow-properties > .workflow-dry-run-panel {
flex: 0 0 auto;
max-height: 42%;
overflow-y: auto;
}
.workflow-property-empty {
margin: 14px;
padding: 18px;
@@ -32913,6 +32919,38 @@ html[data-theme="dark"] .form-group select {
font-weight: 700;
}
.workflow-dry-run-panel {
flex-shrink: 0;
border-top: 1px solid var(--border-color);
margin-top: auto;
}
.workflow-dry-run-head {
margin-top: 0;
}
.workflow-dry-run-close {
flex-shrink: 0;
}
.workflow-dry-run-step {
display: flex;
flex-direction: column;
gap: 2px;
padding: 8px 0;
border-bottom: 1px solid var(--border-color);
font-size: 13px;
}
.workflow-dry-run-step:last-child {
border-bottom: none;
}
.workflow-dry-run-step span {
color: var(--text-secondary);
font-size: 12px;
}
.workflow-custom-fields {
display: grid;
gap: 8px;
+14 -2
View File
@@ -873,6 +873,7 @@
layoutWorkflowGraph(false);
}
selectWorkflowElement(null);
closeWorkflowDryRunPanel();
updateEmptyState();
renderWorkflowList();
setTimeout(() => cy && cy.resize(), 0);
@@ -1581,6 +1582,14 @@
}
}
function closeWorkflowDryRunPanel() {
const panel = document.getElementById('workflow-dry-run-panel');
const output = document.getElementById('workflow-dry-run-output');
if (!panel) return;
panel.hidden = true;
if (output) output.innerHTML = '';
}
function renderWorkflowDryRunTrace(result) {
const panel = document.getElementById('workflow-dry-run-panel');
const output = document.getElementById('workflow-dry-run-output');
@@ -1601,6 +1610,8 @@
}).join('');
}
window.closeWorkflowDryRunPanel = closeWorkflowDryRunPanel;
window.saveWorkflowDraft = async function () {
initCy();
const meta = readWorkflowMetaFromForm();
@@ -1684,8 +1695,9 @@
console.log(result);
console.groupEnd();
renderWorkflowDryRunTrace(result);
const summary = trace.slice(0, 8).map(item => `${item.label || item.nodeId}: ${item.status}`).join('\n');
window.alert((_t('workflows.dryRunDone') || 'Dry-run completed') + '\n\n' + summary);
if (typeof showNotification === 'function') {
showNotification(_t('workflows.dryRunDone') || 'Dry-run completed', 'success');
}
} catch (error) {
showNotification(error.message || _t('workflows.dryRunFailed'), 'error');
}
+7 -2
View File
@@ -2633,9 +2633,14 @@
</div>
<div id="workflow-custom-fields" class="workflow-custom-fields"></div>
</div>
<div id="workflow-dry-run-panel" class="workflow-property-form" hidden>
<div class="workflow-custom-fields-head">
<div id="workflow-dry-run-panel" class="workflow-property-form workflow-dry-run-panel" hidden>
<div class="workflow-custom-fields-head workflow-dry-run-head">
<span data-i18n="workflows.dryRunTrace">试运行轨迹</span>
<button type="button" class="role-selection-panel-close workflow-dry-run-close" onclick="closeWorkflowDryRunPanel()" data-i18n="common.close" data-i18n-attr="title,aria-label" title="关闭" aria-label="关闭">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M18 6L6 18M6 6l12 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</button>
</div>
<div id="workflow-dry-run-output" class="workflow-property-empty workflow-property-empty--compact"></div>
</div>