diff --git a/frontend/assets/js/app.js b/frontend/assets/js/app.js index 4de68cb..2edc3a3 100644 --- a/frontend/assets/js/app.js +++ b/frontend/assets/js/app.js @@ -1055,12 +1055,12 @@ function renderDocuments() { const DOC_FIELD_TEMPLATES = { deployment: [ - { id: 'docTarget', label: 'Target System / Host', type: 'text', placeholder: 'e.g. web-server-01, firewall-cluster' }, + { id: 'docTarget', label: 'Target System / Host', type: 'network-node' }, { id: 'docVersion', label: 'Version / Build', type: 'text', placeholder: 'e.g. v2.1.0, build 42' }, { id: 'docStatus', label: 'Status', type: 'select', options: ['Planned', 'In Progress', 'Completed', 'Rolled Back', 'Failed'] } ], attack: [ - { id: 'docSource', label: 'Attack Source / IP', type: 'text', placeholder: 'e.g. 10.0.0.5, External C2' }, + { id: 'docSource', label: 'Attack Source / IP', type: 'network-node' }, { id: 'docVector', label: 'Attack Vector', type: 'select', options: ['Phishing', 'Brute Force', 'Malware', 'DDoS', 'SQL Injection', 'XSS', 'Social Engineering', 'Physical', 'Other'] }, { id: 'docImpact', label: 'Impact', type: 'select', options: ['None', 'Low', 'Medium', 'High', 'Critical'] } ], @@ -1086,6 +1086,17 @@ function updateDocFormFields() { const container = document.getElementById('dynamicDocFields'); const templates = DOC_FIELD_TEMPLATES[docType] || []; container.innerHTML = templates.map(f => { + if (f.type === 'network-node') { + const opts = nodes.map(n => ``).join(''); + return ` +
+ + +
`; + } if (f.type === 'select') { const opts = f.options.map(o => ``).join(''); return `