diff --git a/web/static/css/vulnerability-workspace.css b/web/static/css/vulnerability-workspace.css index ae144d3c..4e66f7c8 100644 --- a/web/static/css/vulnerability-workspace.css +++ b/web/static/css/vulnerability-workspace.css @@ -52,7 +52,6 @@ font-weight: 650; font-variant-numeric: tabular-nums; margin: 6px 0 2px; - color: var(--text-primary); } #page-vulnerabilities .stat-label { font-size: 12px; color: var(--text-secondary); } @@ -65,6 +64,46 @@ #page-vulnerabilities .vulnerability-host-option { padding: 10px 8px; } #page-vulnerabilities .vulnerability-host-option[aria-pressed="true"] { background: color-mix(in srgb,var(--accent-color) 9%,transparent); } #page-vulnerabilities .vulnerability-domain-branch > .vulnerability-host-option { padding-inline-start: 22px; } +#page-vulnerabilities .vulnerability-host-option-name { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} +.vulnerability-domain-label { + display: inline-block; + max-width: calc(100% - 54px); + padding: 0; + border: 0; + background: transparent; + color: var(--text-primary); + font: inherit; + text-align: start; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + vertical-align: middle; + cursor: pointer; +} +.vulnerability-domain-label[aria-pressed="true"] { color: var(--accent-color); font-weight: 600; } +.vulnerability-host-heading-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; } +.vulnerability-host-heading-actions [hidden] { display: none; } +#page-vulnerabilities .vulnerability-host-results-heading { align-items: start; } +#vulnerability-host-selection { + min-width: 0; + flex: 1 1 180px; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; +} +.vulnerability-table-name { + flex: 1; + min-width: 0; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; +} #page-vulnerabilities .vulnerability-host-overview { min-height: 36px; margin-bottom: 12px; } #page-vulnerabilities .vulnerability-host-results-heading h3 { font-size: 16px; font-weight: 600; } #page-vulnerabilities .vulnerability-host-table { min-width: 880px; font-size: 13px; } @@ -131,7 +170,7 @@ } .vulnerability-inspector-header .modal-close { position: static; flex-shrink: 0; } .vulnerability-inspector-eyebrow { color: var(--text-muted); font-size: 12px; } -.vulnerability-inspector-header h2 { font-size: 21px; line-height: 1.5; margin: 6px 0 0; overflow-wrap: anywhere; } +.vulnerability-inspector-header h2 { font-size: 21px; line-height: 1.5; margin: 6px 0 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; } #vulnerability-inspector-body { padding: 20px 28px 32px; overflow-y: auto; flex: 1; } .vulnerability-inspector-meta, .vulnerability-inspector-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; } @@ -141,12 +180,15 @@ .vulnerability-inspector-tabs button[aria-pressed="true"] { color: var(--accent-color); border-bottom-color: var(--accent-color); font-weight: 600; } [data-inspector-panel][hidden] { display: none; } [data-inspector-panel] h3 { margin: 24px 0 12px; font-size: 14px; } -.vulnerability-inspector-description { white-space: pre-wrap; line-height: 1.8; font-size: 14px; } +.vulnerability-inspector-description { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; font-size: 14px; } .vulnerability-target-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; } .vulnerability-target-list li { display: flex; flex-direction: column; gap: 5px; padding: 13px 16px; background: var(--bg-secondary); border-bottom: 1px solid var(--border-color); overflow-wrap: anywhere; } .vulnerability-target-list li:last-child { border-bottom: 0; } .vulnerability-target-list strong { font-size: 13px; } -.vulnerability-target-list code { font-size: 12px; color: var(--text-secondary); white-space: pre-wrap; } +.vulnerability-target-list code { display: block; max-width: 100%; max-height: 96px; overflow: auto; font-size: 12px; color: var(--text-secondary); white-space: pre; } +.vulnerability-target-heading { display: flex; align-items: center; gap: 10px; min-width: 0; } +.vulnerability-target-heading strong { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.vulnerability-target-heading button { flex-shrink: 0; font-size: 12px; } .vulnerability-timeline { list-style: none; padding: 0 0 0 16px; border-inline-start: 1px solid var(--border-color); margin: 0; } .vulnerability-timeline-event { position: relative; padding: 0 0 24px 12px; } .vulnerability-timeline-event::before { content: ''; position: absolute; left: -21px; top: 5px; width: 8px; height: 8px; background: var(--accent-color); border-radius: 50%; } diff --git a/web/static/i18n/ar-SA.json b/web/static/i18n/ar-SA.json index 9ef50189..419b6861 100644 --- a/web/static/i18n/ar-SA.json +++ b/web/static/i18n/ar-SA.json @@ -2751,9 +2751,9 @@ "noHistory": "لا يوجد سجل منظم بعد", "exportVisibleHosts": "تصدير النتائج المعروضة", "tableDownload": "تنزيل", - "pageAllHosts": "جميع مضيفي هذه الصفحة", + "allHosts": "جميع المضيفين", + "clearHostSelection": "مسح مرشح المضيف", "hostSearch": "البحث في جميع المضيفين…", - "domainAll": "جميع مضيفي النطاق في هذه الصفحة", "tableSeverity": "الخطورة", "tableTitle": "اسم الثغرة", "tableStatus": "الحالة", diff --git a/web/static/i18n/en-US.json b/web/static/i18n/en-US.json index fc5c0155..38df04e0 100644 --- a/web/static/i18n/en-US.json +++ b/web/static/i18n/en-US.json @@ -2894,9 +2894,9 @@ "noHistory": "No structured history yet", "exportVisibleHosts": "Export displayed findings", "tableDownload": "Download", - "pageAllHosts": "All hosts on this page", + "allHosts": "All hosts", + "clearHostSelection": "Clear host filter", "hostSearch": "Search all hosts…", - "domainAll": "All hosts in this domain on this page", "tableSeverity": "Severity", "tableTitle": "Finding", "tableStatus": "Status", diff --git a/web/static/i18n/ru-RU.json b/web/static/i18n/ru-RU.json index f50dfa38..7d14857d 100644 --- a/web/static/i18n/ru-RU.json +++ b/web/static/i18n/ru-RU.json @@ -2907,9 +2907,9 @@ "noHistory": "Структурированной истории пока нет", "exportVisibleHosts": "Экспорт показанных записей", "tableDownload": "Скачать", - "pageAllHosts": "Все хосты на странице", + "allHosts": "Все хосты", + "clearHostSelection": "Сбросить фильтр хостов", "hostSearch": "Поиск по всем хостам…", - "domainAll": "Все хосты домена на странице", "tableSeverity": "Критичность", "tableTitle": "Уязвимость", "tableStatus": "Статус", diff --git a/web/static/i18n/zh-CN.json b/web/static/i18n/zh-CN.json index 5451746c..73aa475c 100644 --- a/web/static/i18n/zh-CN.json +++ b/web/static/i18n/zh-CN.json @@ -2882,9 +2882,9 @@ "noHistory": "暂无结构化处置记录", "exportVisibleHosts": "导出右侧列表", "tableDownload": "下载", - "pageAllHosts": "本页全部域名", + "allHosts": "全部域名", + "clearHostSelection": "清除域名筛选", "hostSearch": "搜索全部域名…", - "domainAll": "本页该域名下全部主机", "tableSeverity": "严重度", "tableTitle": "漏洞名称", "tableStatus": "状态", diff --git a/web/static/js/vulnerability-workspace.js b/web/static/js/vulnerability-workspace.js index 31c663da..13678091 100644 --- a/web/static/js/vulnerability-workspace.js +++ b/web/static/js/vulnerability-workspace.js @@ -117,10 +117,12 @@ async function openVulnerabilityInspector(id) { if (request !== vulnerabilityInspectorRequest) return; const v = context.vulnerability; title.textContent = v.title; + title.title = v.title; const jsID = escapeJsStringAttr(v.id); const targets = (v.targets || []).map(target => ` -
  • ${escapeHtml(target.host)} - ${escapeHtml([target.scheme, target.port, target.path].filter(Boolean).join(' · ') || target.raw)} +
  • ${escapeHtml(target.host)} +
    + ${escapeHtml(target.raw)}
  • `).join(''); const history = (context.history || []).map(event => `
  • diff --git a/web/static/js/vulnerability.js b/web/static/js/vulnerability.js index d5f7cdcb..e28c1649 100644 --- a/web/static/js/vulnerability.js +++ b/web/static/js/vulnerability.js @@ -1539,7 +1539,7 @@ function renderVulnerabilityHostBrowser(vulnerabilities, opts) { } const button = (key, label, count, items = []) => ` `; const tree = Array.from(domains, ([domain, hosts]) => { const count = new Set(vulnerabilities.filter(vuln => (vuln.target_domain || vuln.target_host || '') === domain).map(vuln => vuln.id)).size; @@ -1549,8 +1549,7 @@ function renderVulnerabilityHostBrowser(vulnerabilities, opts) { } const open = opts.hostOpenStates?.get(domain) ?? true; return `
    - ${escapeHtml(domain)} ${count} - ${button('domain:' + domain, vulnT('vulnerabilityPage.domainAll'), count)} + ${count} ${Array.from(hosts, ([host, n]) => button('host:' + host, host, n, vulnerabilities.filter(vuln => (vuln.target_host || '') === host))).join('')}
    `; @@ -1563,14 +1562,16 @@ function renderVulnerabilityHostBrowser(vulnerabilities, opts) { aria-label="${escapeAttr(vulnT('vulnerabilityPage.hostSearch'))}" placeholder="${escapeAttr(vulnT('vulnerabilityPage.hostSearch'))}" value="${escapeAttr(vulnerabilityHostQuery)}">

    - +
    + + +
    @@ -1594,6 +1595,7 @@ function renderVulnerabilityHostBrowser(vulnerabilities, opts) { list.querySelector('.vulnerability-host-tree').addEventListener('click', event => { const option = event.target.closest('button[data-host-key]'); if (!option) return; + event.preventDefault(); vulnerabilityHostSelection = option.dataset.hostKey; renderVulnerabilityHostTable(); }); @@ -1643,8 +1645,11 @@ function renderVulnerabilityHostTable(expandedIds) { document.querySelectorAll('#vulnerabilities-list [data-host-key]').forEach(option => { option.setAttribute('aria-pressed', String(option.dataset.hostKey === selection)); }); - const label = selection ? selection.slice(selection.indexOf(':') + 1) : vulnT('vulnerabilityPage.pageAllHosts'); - document.getElementById('vulnerability-host-selection').textContent = label || vulnT('vulnerabilityPage.unknownHost'); + const label = selection ? selection.slice(selection.indexOf(':') + 1) : vulnT('vulnerabilityPage.allHosts'); + const heading = document.getElementById('vulnerability-host-selection'); + heading.textContent = label || vulnT('vulnerabilityPage.unknownHost'); + heading.title = heading.textContent; + document.getElementById('vulnerability-host-clear').hidden = !selection; document.getElementById('vulnerability-host-selection-count').textContent = vulnT('vulnerabilityPage.groupPageCount', { count: items.length }); const counts = {}; @@ -1689,7 +1694,7 @@ function renderVulnerabilityTableItem(vuln) {

    ${escapeHtml((vuln.description || '').slice(0, 160))}

    ${vuln.case_id ? `${escapeHtml(vulnT('vulnerabilityPage.mergedRecord'))}` : ''} diff --git a/web/templates/index.html b/web/templates/index.html index f93d1120..9b3fcf59 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -48,7 +48,7 @@ - + @@ -7136,8 +7136,8 @@ - - + +