From 0d65da62233a95a5ebb4f8a712d54420dc4c8f7a Mon Sep 17 00:00:00 2001 From: Sycun <165354365+Sycun@users.noreply.github.com> Date: Sun, 15 Nov 2026 10:35:07 +0800 Subject: [PATCH] fix(vulnerabilities): clarify group pagination and selection counts --- web/static/i18n/ar-SA.json | 6 +++++- web/static/i18n/en-US.json | 6 +++++- web/static/i18n/ru-RU.json | 6 +++++- web/static/i18n/zh-CN.json | 6 +++++- web/static/js/vulnerability.js | 10 ++++++++-- web/templates/index.html | 2 +- 6 files changed, 29 insertions(+), 7 deletions(-) diff --git a/web/static/i18n/ar-SA.json b/web/static/i18n/ar-SA.json index 47e21d87..61e0c624 100644 --- a/web/static/i18n/ar-SA.json +++ b/web/static/i18n/ar-SA.json @@ -2826,7 +2826,11 @@ "sortOldest": "الإنشاء: الأقدم أولاً", "expandPage": "توسيع الصفحة", "collapsePage": "طي الصفحة", - "hostPagination": "عرض {{start}}–{{end}} من أصل {{total}} مجموعة حسب المضيف", + "hostPagination": "مجموعات المضيفين {{start}}–{{end}} من {{total}}", + "selectedPageFindings": "{{count}} ثغرة ضمن التحديد في هذه الصفحة", + "hostsPerPage": "مجموعات المضيفين لكل صفحة", + "tasksPerPage": "مجموعات المهام لكل صفحة", + "recordsPerPage": "الثغرات لكل صفحة", "taskPagination": "عرض {{start}}–{{end}} من أصل {{total}} مجموعة حسب المهمة", "recordPagination": "عرض {{start}}–{{end}} من أصل {{total}} سجل ثغرة", "viewLabel": "عرض الثغرات", diff --git a/web/static/i18n/en-US.json b/web/static/i18n/en-US.json index dc456dd6..d829e64b 100644 --- a/web/static/i18n/en-US.json +++ b/web/static/i18n/en-US.json @@ -2969,7 +2969,11 @@ "sortOldest": "Created: oldest first", "expandPage": "Expand page", "collapsePage": "Collapse page", - "hostPagination": "Showing {{start}}–{{end}} of {{total}} host groups", + "hostPagination": "Host groups {{start}}–{{end}} of {{total}}", + "selectedPageFindings": "{{count}} findings in the selection on this page", + "hostsPerPage": "Host groups per page", + "tasksPerPage": "Task groups per page", + "recordsPerPage": "Findings per page", "taskPagination": "Showing {{start}}–{{end}} of {{total}} task groups", "recordPagination": "Showing {{start}}–{{end}} of {{total}} findings", "viewLabel": "Vulnerability view", diff --git a/web/static/i18n/ru-RU.json b/web/static/i18n/ru-RU.json index 5d11f60e..bbbe123f 100644 --- a/web/static/i18n/ru-RU.json +++ b/web/static/i18n/ru-RU.json @@ -2982,7 +2982,11 @@ "sortOldest": "Создание: сначала старые", "expandPage": "Развернуть страницу", "collapsePage": "Свернуть страницу", - "hostPagination": "Показано {{start}}–{{end}} из {{total}} групп по хостам", + "hostPagination": "Группы хостов {{start}}–{{end}} из {{total}}", + "selectedPageFindings": "Уязвимостей в выбранной области на этой странице: {{count}}", + "hostsPerPage": "Групп хостов на странице", + "tasksPerPage": "Групп задач на странице", + "recordsPerPage": "Уязвимостей на странице", "taskPagination": "Показано {{start}}–{{end}} из {{total}} групп по задачам", "recordPagination": "Показано {{start}}–{{end}} из {{total}} записей", "viewLabel": "Вид списка уязвимостей", diff --git a/web/static/i18n/zh-CN.json b/web/static/i18n/zh-CN.json index 8aab159e..41d8b806 100644 --- a/web/static/i18n/zh-CN.json +++ b/web/static/i18n/zh-CN.json @@ -2957,7 +2957,11 @@ "sortOldest": "创建时间:最早优先", "expandPage": "展开本页", "collapsePage": "收起本页", - "hostPagination": "显示 {{start}}–{{end}} / 共 {{total}} 个域名组", + "hostPagination": "主机分组 {{start}}–{{end}} / 共 {{total}} 组", + "selectedPageFindings": "本页所选范围 {{count}} 条漏洞", + "hostsPerPage": "每页主机组数", + "tasksPerPage": "每页任务组数", + "recordsPerPage": "每页漏洞数", "taskPagination": "显示 {{start}}–{{end}} / 共 {{total}} 个任务组", "recordPagination": "显示 {{start}}–{{end}} / 共 {{total}} 条漏洞", "viewLabel": "漏洞视图", diff --git a/web/static/js/vulnerability.js b/web/static/js/vulnerability.js index 3e16e33b..6a98934b 100644 --- a/web/static/js/vulnerability.js +++ b/web/static/js/vulnerability.js @@ -1582,7 +1582,7 @@ function renderVulnerabilityBrowserTable() { heading.title = heading.textContent; document.getElementById('vulnerability-host-clear').hidden = !selection; document.getElementById('vulnerability-host-selection-count').textContent = - vulnT('vulnerabilityPage.groupPageCount', { count: items.length }); + vulnT(selection ? 'vulnerabilityPage.selectedPageFindings' : 'vulnerabilityPage.pageFindings', { count: items.length }); const counts = {}; let pending = 0; for (const item of items) { @@ -1668,6 +1668,12 @@ function renderVulnerabilityPagination() { none: 'vulnerabilityPage.recordPagination' }[vulnerabilityView]; + const pageSizeLabel = { + host: 'vulnerabilityPage.hostsPerPage', + task: 'vulnerabilityPage.tasksPerPage', + none: 'vulnerabilityPage.recordsPerPage' + }[vulnerabilityView]; + // 计算显示范围 const start = total === 0 ? 0 : (currentPage - 1) * pageSize + 1; const end = total === 0 ? 0 : Math.min(currentPage * pageSize, total); @@ -1679,7 +1685,7 @@ function renderVulnerabilityPagination() {
${escapeHtml(vulnT(paginationLabel, { start, end, total }))}