🐤 Sync 2025-11-15 00:12:24
This commit is contained in:
@@ -10,7 +10,7 @@ LUCI_DEPENDS:=+luci-base +luci-lib-jsonc +curl +bandix
|
||||
|
||||
PKG_MAINTAINER:=timsaya
|
||||
|
||||
PKG_VERSION:=0.8.0
|
||||
PKG_VERSION:=0.8.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
@@ -570,11 +570,11 @@ function formatDnsServer(query) {
|
||||
function formatResponseResult(query) {
|
||||
if (!query) return { display: [], full: [] };
|
||||
|
||||
// 显示响应IP(response_ips),它是一个字符串数组
|
||||
if (query.response_ips && Array.isArray(query.response_ips) && query.response_ips.length > 0) {
|
||||
// 显示响应记录(response_records),它是一个字符串数组
|
||||
if (query.response_records && Array.isArray(query.response_records) && query.response_records.length > 0) {
|
||||
var maxDisplay = 5; // 最多显示5条
|
||||
var displayRecords = query.response_ips.slice(0, maxDisplay);
|
||||
var fullRecords = query.response_ips;
|
||||
var displayRecords = query.response_records.slice(0, maxDisplay);
|
||||
var fullRecords = query.response_records;
|
||||
|
||||
return {
|
||||
display: displayRecords,
|
||||
@@ -1113,20 +1113,25 @@ return view.extend({
|
||||
]),
|
||||
E('div', { 'class': 'stats-card' }, [
|
||||
E('div', { 'class': 'stats-card-title' }, getTranslation('响应时间', language)),
|
||||
E('div', { 'class': 'stats-card-value', 'id': 'stat-avg-response-time', 'style': 'margin-bottom: 12px;' }, [
|
||||
E('span', {}, (stats.avg_response_time_ms || 0).toFixed(1)),
|
||||
E('div', { 'class': 'stats-card-value', 'id': 'stat-latest-response-time', 'style': 'margin-bottom: 12px;' }, [
|
||||
E('span', {}, (stats.latest_response_time_ms || 0).toFixed(1)),
|
||||
E('span', { 'class': 'stats-card-unit' }, ' ' + getTranslation('毫秒', language))
|
||||
]),
|
||||
E('div', { 'class': 'stats-card-details', 'id': 'stat-response-time-details' }, [
|
||||
E('div', { 'class': 'stats-detail-row' }, [
|
||||
E('span', { 'class': 'stats-detail-label' }, getTranslation('平均响应时间', language) + ':'),
|
||||
E('span', { 'class': 'stats-detail-value', 'id': 'stat-avg-response-time' },
|
||||
(stats.avg_response_time_ms || 0).toFixed(1) + ' ' + getTranslation('毫秒', language))
|
||||
]),
|
||||
E('div', { 'class': 'stats-detail-row' }, [
|
||||
E('span', { 'class': 'stats-detail-label' }, getTranslation('最快响应时间', language) + ':'),
|
||||
E('span', { 'class': 'stats-detail-value', 'id': 'stat-min-response-time' },
|
||||
(stats.min_response_time_ms || 0) + ' ' + getTranslation('毫秒', language))
|
||||
(stats.min_response_time_ms || 0).toFixed(1) + ' ' + getTranslation('毫秒', language))
|
||||
]),
|
||||
E('div', { 'class': 'stats-detail-row' }, [
|
||||
E('span', { 'class': 'stats-detail-label' }, getTranslation('最慢响应时间', language) + ':'),
|
||||
E('span', { 'class': 'stats-detail-value', 'id': 'stat-max-response-time' },
|
||||
(stats.max_response_time_ms || 0) + ' ' + getTranslation('毫秒', language))
|
||||
(stats.max_response_time_ms || 0).toFixed(1) + ' ' + getTranslation('毫秒', language))
|
||||
])
|
||||
])
|
||||
]),
|
||||
@@ -1157,19 +1162,24 @@ return view.extend({
|
||||
totalQueriesEl.textContent = stats.total_queries || 0;
|
||||
}
|
||||
|
||||
var latestResponseTimeEl = document.getElementById('stat-latest-response-time');
|
||||
if (latestResponseTimeEl && latestResponseTimeEl.firstChild) {
|
||||
latestResponseTimeEl.firstChild.textContent = (stats.latest_response_time_ms || 0).toFixed(1);
|
||||
}
|
||||
|
||||
var avgResponseTimeEl = document.getElementById('stat-avg-response-time');
|
||||
if (avgResponseTimeEl && avgResponseTimeEl.firstChild) {
|
||||
avgResponseTimeEl.firstChild.textContent = (stats.avg_response_time_ms || 0).toFixed(1);
|
||||
if (avgResponseTimeEl) {
|
||||
avgResponseTimeEl.textContent = (stats.avg_response_time_ms || 0).toFixed(1) + ' ' + getTranslation('毫秒', language);
|
||||
}
|
||||
|
||||
var minResponseTimeEl = document.getElementById('stat-min-response-time');
|
||||
if (minResponseTimeEl) {
|
||||
minResponseTimeEl.textContent = (stats.min_response_time_ms || 0) + ' ' + getTranslation('毫秒', language);
|
||||
minResponseTimeEl.textContent = (stats.min_response_time_ms || 0).toFixed(1) + ' ' + getTranslation('毫秒', language);
|
||||
}
|
||||
|
||||
var maxResponseTimeEl = document.getElementById('stat-max-response-time');
|
||||
if (maxResponseTimeEl) {
|
||||
maxResponseTimeEl.textContent = (stats.max_response_time_ms || 0) + ' ' + getTranslation('毫秒', language);
|
||||
maxResponseTimeEl.textContent = (stats.max_response_time_ms || 0).toFixed(1) + ' ' + getTranslation('毫秒', language);
|
||||
}
|
||||
|
||||
var successRateEl = document.getElementById('stat-success-rate');
|
||||
|
||||
@@ -41,6 +41,8 @@ const translations = {
|
||||
'明亮模式': '明亮模式',
|
||||
'暗黑模式': '暗黑模式',
|
||||
'意见反馈': '意见反馈',
|
||||
'日志级别': '日志级别',
|
||||
'设置 Bandix 服务的日志级别': '设置 Bandix 服务的日志级别',
|
||||
'离线超时时间': '离线超时时间',
|
||||
'设置设备离线判断的超时时间(秒)': '设置设备离线判断的超时时间(秒)。超过此时间未活动的设备将被标记为离线',
|
||||
'历史流量周期': '历史流量周期',
|
||||
@@ -100,6 +102,8 @@ const translations = {
|
||||
'明亮模式': '明亮模式',
|
||||
'暗黑模式': '暗黑模式',
|
||||
'意见反馈': '意見反饋',
|
||||
'日志级别': '日誌級別',
|
||||
'设置 Bandix 服务的日志级别': '設置 Bandix 服務的日誌級別',
|
||||
'离线超时时间': '離線超時時間',
|
||||
'设置设备离线判断的超时时间(秒)': '設定設備離線判斷的超時時間(秒)。超過此時間未活動的設備將被標記為離線',
|
||||
'历史流量周期': '歷史流量週期',
|
||||
@@ -160,6 +164,8 @@ const translations = {
|
||||
'明亮模式': 'Light Mode',
|
||||
'暗黑模式': 'Dark Mode',
|
||||
'意见反馈': 'Feedback',
|
||||
'日志级别': 'Log Level',
|
||||
'设置 Bandix 服务的日志级别': 'Set the log level for Bandix service',
|
||||
'离线超时时间': 'Offline Timeout',
|
||||
'设置设备离线判断的超时时间(秒)': 'Set the timeout for device offline detection (seconds). Devices inactive for longer than this time will be marked as offline',
|
||||
'历史流量周期': 'Traffic History Period',
|
||||
@@ -220,6 +226,8 @@ const translations = {
|
||||
'明亮模式': 'Mode Clair',
|
||||
'暗黑模式': 'Mode Sombre',
|
||||
'意见反馈': 'Commentaires',
|
||||
'日志级别': 'Niveau de Journal',
|
||||
'设置 Bandix 服务的日志级别': 'Définir le niveau de journal pour le service Bandix',
|
||||
'离线超时时间': 'Délai d\'expiration hors ligne',
|
||||
'设置设备离线判断的超时时间(秒)': 'Définir le délai d\'expiration pour la détection hors ligne des appareils (secondes). Les appareils inactifs plus longtemps que cette durée seront marqués comme hors ligne',
|
||||
'历史流量周期': 'Période d\'Historique du Trafic',
|
||||
@@ -280,6 +288,8 @@ const translations = {
|
||||
'明亮模式': 'ライトモード',
|
||||
'暗黑模式': 'ダークモード',
|
||||
'意见反馈': 'フィードバック',
|
||||
'日志级别': 'ログレベル',
|
||||
'设置 Bandix 服务的日志级别': 'Bandix サービスのログレベルを設定',
|
||||
'离线超时时间': 'オフラインタイムアウト',
|
||||
'设置设备离线判断的超时时间(秒)': 'デバイスのオフライン検出のタイムアウト時間(秒)を設定。この時間を超えて非アクティブなデバイスはオフラインとしてマークされます',
|
||||
'历史流量周期': 'トラフィック履歴期間',
|
||||
@@ -340,6 +350,8 @@ const translations = {
|
||||
'明亮模式': 'Светлый Режим',
|
||||
'暗黑模式': 'Темный Режим',
|
||||
'意见反馈': 'Обратная связь',
|
||||
'日志级别': 'Уровень Журналирования',
|
||||
'设置 Bandix 服务的日志级别': 'Установить уровень журналирования для службы Bandix',
|
||||
'离线超时时间': 'Таймаут отключения',
|
||||
'设置设备离线判断的超时时间(秒)': 'Установить таймаут для обнаружения отключения устройств (секунды). Устройства, неактивные дольше этого времени, будут помечены как отключенные',
|
||||
'历史流量周期': 'Период Истории Трафика',
|
||||
@@ -591,13 +603,14 @@ return view.extend({
|
||||
s.description = getTranslation('配置 Bandix 服务的基本参数', language);
|
||||
s.addremove = false;
|
||||
|
||||
// 添加端口设置选项
|
||||
o = s.option(form.Value, 'port', getTranslation('端口', language),
|
||||
getTranslation('Bandix 服务监听的端口', language));
|
||||
o.default = '8686';
|
||||
o.datatype = 'port';
|
||||
o.placeholder = '8686';
|
||||
o.rmempty = false;
|
||||
// 添加端口设置选项
|
||||
o = s.option(form.Value, 'port', getTranslation('端口', language),
|
||||
getTranslation('Bandix 服务监听的端口', language));
|
||||
o.default = '8686';
|
||||
o.datatype = 'port';
|
||||
o.placeholder = '8686';
|
||||
o.rmempty = false;
|
||||
|
||||
|
||||
// 添加网卡选择下拉菜单
|
||||
o = s.option(form.ListValue, 'iface', getTranslation('监控网卡', language),
|
||||
@@ -631,6 +644,18 @@ return view.extend({
|
||||
o.default = 'auto';
|
||||
o.rmempty = false;
|
||||
|
||||
|
||||
// 添加日志级别选择选项
|
||||
o = s.option(form.ListValue, 'log_level', getTranslation('日志级别', language),
|
||||
getTranslation('设置 Bandix 服务的日志级别', language));
|
||||
o.value('trace', 'Trace');
|
||||
o.value('debug', 'Debug');
|
||||
o.value('info', 'Info');
|
||||
o.value('warn', 'Warn');
|
||||
o.value('error', 'Error');
|
||||
o.default = 'info';
|
||||
o.rmempty = false;
|
||||
|
||||
// 添加数据目录设置(只读)
|
||||
o = s.option(form.DummyValue, 'data_dir', getTranslation('数据目录', language));
|
||||
o.default = '/usr/share/bandix';
|
||||
|
||||
Reference in New Issue
Block a user