mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-08-27 13:23:10 +02:00
Add files via upload
This commit is contained in:
@@ -32872,6 +32872,12 @@ html[data-theme="dark"] .form-group select {
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.workflow-properties > .workflow-dry-run-panel {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
max-height: 42%;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.workflow-property-empty {
|
.workflow-property-empty {
|
||||||
margin: 14px;
|
margin: 14px;
|
||||||
padding: 18px;
|
padding: 18px;
|
||||||
@@ -32913,6 +32919,38 @@ html[data-theme="dark"] .form-group select {
|
|||||||
font-weight: 700;
|
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 {
|
.workflow-custom-fields {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
|||||||
@@ -873,6 +873,7 @@
|
|||||||
layoutWorkflowGraph(false);
|
layoutWorkflowGraph(false);
|
||||||
}
|
}
|
||||||
selectWorkflowElement(null);
|
selectWorkflowElement(null);
|
||||||
|
closeWorkflowDryRunPanel();
|
||||||
updateEmptyState();
|
updateEmptyState();
|
||||||
renderWorkflowList();
|
renderWorkflowList();
|
||||||
setTimeout(() => cy && cy.resize(), 0);
|
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) {
|
function renderWorkflowDryRunTrace(result) {
|
||||||
const panel = document.getElementById('workflow-dry-run-panel');
|
const panel = document.getElementById('workflow-dry-run-panel');
|
||||||
const output = document.getElementById('workflow-dry-run-output');
|
const output = document.getElementById('workflow-dry-run-output');
|
||||||
@@ -1601,6 +1610,8 @@
|
|||||||
}).join('');
|
}).join('');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.closeWorkflowDryRunPanel = closeWorkflowDryRunPanel;
|
||||||
|
|
||||||
window.saveWorkflowDraft = async function () {
|
window.saveWorkflowDraft = async function () {
|
||||||
initCy();
|
initCy();
|
||||||
const meta = readWorkflowMetaFromForm();
|
const meta = readWorkflowMetaFromForm();
|
||||||
@@ -1684,8 +1695,9 @@
|
|||||||
console.log(result);
|
console.log(result);
|
||||||
console.groupEnd();
|
console.groupEnd();
|
||||||
renderWorkflowDryRunTrace(result);
|
renderWorkflowDryRunTrace(result);
|
||||||
const summary = trace.slice(0, 8).map(item => `${item.label || item.nodeId}: ${item.status}`).join('\n');
|
if (typeof showNotification === 'function') {
|
||||||
window.alert((_t('workflows.dryRunDone') || 'Dry-run completed') + '\n\n' + summary);
|
showNotification(_t('workflows.dryRunDone') || 'Dry-run completed', 'success');
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
showNotification(error.message || _t('workflows.dryRunFailed'), 'error');
|
showNotification(error.message || _t('workflows.dryRunFailed'), 'error');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2633,9 +2633,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="workflow-custom-fields" class="workflow-custom-fields"></div>
|
<div id="workflow-custom-fields" class="workflow-custom-fields"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="workflow-dry-run-panel" class="workflow-property-form" hidden>
|
<div id="workflow-dry-run-panel" class="workflow-property-form workflow-dry-run-panel" hidden>
|
||||||
<div class="workflow-custom-fields-head">
|
<div class="workflow-custom-fields-head workflow-dry-run-head">
|
||||||
<span data-i18n="workflows.dryRunTrace">试运行轨迹</span>
|
<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>
|
||||||
<div id="workflow-dry-run-output" class="workflow-property-empty workflow-property-empty--compact"></div>
|
<div id="workflow-dry-run-output" class="workflow-property-empty workflow-property-empty--compact"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user