mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-03-24 03:46:41 +08:00
feat(web): 新增 HID OTG 自检接口与设置页环境诊断面板,并优化在线升级状态文案本地化及重启后自动刷新体验
This commit is contained in:
@@ -440,6 +440,7 @@ export default {
|
||||
hid: 'HID',
|
||||
msd: 'MSD',
|
||||
atx: 'ATX',
|
||||
environment: 'Environment',
|
||||
network: 'Network',
|
||||
users: 'Users',
|
||||
hardware: 'Hardware',
|
||||
@@ -521,6 +522,11 @@ export default {
|
||||
updatePhaseRestarting: 'Restarting',
|
||||
updatePhaseSuccess: 'Success',
|
||||
updatePhaseFailed: 'Failed',
|
||||
updateMsgChecking: 'Checking for updates',
|
||||
updateMsgDownloading: 'Downloading binary',
|
||||
updateMsgVerifying: 'Verifying (SHA256)',
|
||||
updateMsgInstalling: 'Replacing binary',
|
||||
updateMsgRestarting: 'Restarting service',
|
||||
// Auth
|
||||
auth: 'Access',
|
||||
authSettings: 'Access Settings',
|
||||
@@ -650,6 +656,86 @@ export default {
|
||||
serialNumber: 'Serial Number',
|
||||
serialNumberAuto: 'Auto-generated',
|
||||
descriptorWarning: 'Changing these settings will reconnect the USB device',
|
||||
otgSelfCheck: {
|
||||
title: 'OTG Self-Check',
|
||||
desc: 'Check UDC, gadget binding, and link status',
|
||||
run: 'Run Self-Check',
|
||||
failed: 'Failed to run OTG self-check',
|
||||
overall: 'Overall Status',
|
||||
ok: 'Healthy',
|
||||
hasIssues: 'Issues Found',
|
||||
summary: 'Issue Summary',
|
||||
counts: '{errors} errors, {warnings} warnings',
|
||||
groupCounts: '{ok} passed, {warnings} warnings, {errors} errors',
|
||||
notRun: 'Not run',
|
||||
status: {
|
||||
ok: 'Healthy',
|
||||
warn: 'Warning',
|
||||
error: 'Error',
|
||||
skipped: 'Skipped',
|
||||
},
|
||||
groups: {
|
||||
udc: 'UDC Basics',
|
||||
gadgetConfig: 'Gadget Config',
|
||||
oneKvm: 'one-kvm Gadget',
|
||||
functions: 'Functions & Nodes',
|
||||
link: 'Link State',
|
||||
},
|
||||
values: {
|
||||
missing: 'Missing',
|
||||
notConfigured: 'Not configured',
|
||||
mounted: 'Mounted',
|
||||
unmounted: 'Unmounted',
|
||||
available: 'Available',
|
||||
unavailable: 'Unavailable',
|
||||
exists: 'Exists',
|
||||
none: 'None',
|
||||
unbound: 'Unbound',
|
||||
noConflict: 'No conflict',
|
||||
conflict: 'Conflict',
|
||||
unknown: 'Unknown',
|
||||
normal: 'Normal',
|
||||
abnormal: 'Abnormal',
|
||||
},
|
||||
selectedUdc: 'Target UDC',
|
||||
boundUdc: 'Bound UDC',
|
||||
messages: {
|
||||
udc_dir_exists: 'UDC directory check',
|
||||
udc_has_entries: 'UDC check',
|
||||
configfs_mounted: 'configfs check',
|
||||
usb_gadget_dir_exists: 'usb_gadget check',
|
||||
libcomposite_loaded: 'libcomposite check',
|
||||
one_kvm_gadget_exists: 'one-kvm gadget check',
|
||||
other_gadgets: 'Other gadget check',
|
||||
configured_udc_valid: 'Configured UDC check',
|
||||
one_kvm_bound_udc: 'Bound UDC check',
|
||||
hid_functions_present: 'HID function check',
|
||||
config_c1_exists: 'configs/c.1 check',
|
||||
function_links_ok: 'Function link check',
|
||||
hid_device_nodes: 'HID node check',
|
||||
udc_conflict: 'UDC conflict check',
|
||||
udc_state: 'UDC state check',
|
||||
udc_speed: 'UDC speed check',
|
||||
},
|
||||
hints: {
|
||||
udc_dir_exists: 'Ensure UDC/OTG kernel drivers are enabled',
|
||||
udc_has_entries: 'Ensure OTG controller is enabled in device tree',
|
||||
configfs_mounted: 'Try: mount -t configfs none /sys/kernel/config',
|
||||
usb_gadget_dir_exists: 'Ensure configfs and USB gadget support are enabled',
|
||||
libcomposite_loaded: 'Try: modprobe libcomposite',
|
||||
one_kvm_gadget_exists: 'Enable OTG HID or MSD to let one-kvm gadget be created automatically',
|
||||
other_gadgets: 'Potential UDC contention with one-kvm; check other OTG services',
|
||||
configured_udc_valid: 'Please reselect UDC in HID OTG settings',
|
||||
one_kvm_bound_udc: 'Ensure HID/MSD is enabled and initialized successfully',
|
||||
hid_functions_present: 'Check OTG HID config and enable at least one HID function',
|
||||
config_c1_exists: 'Gadget structure is incomplete; try restarting One-KVM',
|
||||
function_links_ok: 'Reinitialize OTG (toggle HID backend once or restart service)',
|
||||
hid_device_nodes: 'Ensure gadget is bound and check kernel logs',
|
||||
udc_conflict: 'Stop other OTG services or switch one-kvm to an idle UDC',
|
||||
udc_state: 'Ensure target host is connected and has recognized the USB device',
|
||||
udc_speed: 'Device may not be fully enumerated; try reconnecting USB',
|
||||
},
|
||||
},
|
||||
// WebRTC / ICE
|
||||
webrtcSettings: 'WebRTC Settings',
|
||||
webrtcSettingsDesc: 'Configure STUN/TURN servers for NAT traversal',
|
||||
|
||||
@@ -440,6 +440,7 @@ export default {
|
||||
hid: 'HID',
|
||||
msd: 'MSD',
|
||||
atx: 'ATX',
|
||||
environment: '环境',
|
||||
network: '网络',
|
||||
users: '用户',
|
||||
hardware: '硬件',
|
||||
@@ -521,6 +522,11 @@ export default {
|
||||
updatePhaseRestarting: '重启中',
|
||||
updatePhaseSuccess: '成功',
|
||||
updatePhaseFailed: '失败',
|
||||
updateMsgChecking: '检查更新中',
|
||||
updateMsgDownloading: '下载中',
|
||||
updateMsgVerifying: '校验中(SHA256)',
|
||||
updateMsgInstalling: '替换程序中',
|
||||
updateMsgRestarting: '服务重启中',
|
||||
// Auth
|
||||
auth: '访问控制',
|
||||
authSettings: '访问设置',
|
||||
@@ -650,6 +656,86 @@ export default {
|
||||
serialNumber: '序列号',
|
||||
serialNumberAuto: '自动生成',
|
||||
descriptorWarning: '修改这些设置将导致 USB 设备重新连接',
|
||||
otgSelfCheck: {
|
||||
title: 'OTG 自检',
|
||||
desc: '检查 UDC、gadget 绑定和连接状态',
|
||||
run: '运行自检',
|
||||
failed: '执行 OTG 自检失败',
|
||||
overall: '总体状态',
|
||||
ok: '正常',
|
||||
hasIssues: '存在问题',
|
||||
summary: '问题统计',
|
||||
counts: '错误 {errors},警告 {warnings}',
|
||||
groupCounts: '通过 {ok},警告 {warnings},错误 {errors}',
|
||||
notRun: '未执行',
|
||||
status: {
|
||||
ok: '正常',
|
||||
warn: '告警',
|
||||
error: '异常',
|
||||
skipped: '跳过',
|
||||
},
|
||||
groups: {
|
||||
udc: 'UDC 基础',
|
||||
gadgetConfig: 'gadget 配置',
|
||||
oneKvm: 'one-kvm gadget',
|
||||
functions: '功能与设备节点',
|
||||
link: '连接状态',
|
||||
},
|
||||
values: {
|
||||
missing: '不存在',
|
||||
notConfigured: '未配置',
|
||||
mounted: '已挂载',
|
||||
unmounted: '未挂载',
|
||||
available: '可用',
|
||||
unavailable: '不可用',
|
||||
exists: '存在',
|
||||
none: '无',
|
||||
unbound: '未绑定',
|
||||
noConflict: '无冲突',
|
||||
conflict: '冲突',
|
||||
unknown: '未知',
|
||||
normal: '正常',
|
||||
abnormal: '异常',
|
||||
},
|
||||
selectedUdc: '目标 UDC',
|
||||
boundUdc: '已绑定 UDC',
|
||||
messages: {
|
||||
udc_dir_exists: 'UDC 目录检查',
|
||||
udc_has_entries: 'UDC 检查',
|
||||
configfs_mounted: 'configfs 检查',
|
||||
usb_gadget_dir_exists: 'usb_gadget 检查',
|
||||
libcomposite_loaded: 'libcomposite 检查',
|
||||
one_kvm_gadget_exists: 'one-kvm gadget 检查',
|
||||
other_gadgets: '其他 gadget 检查',
|
||||
configured_udc_valid: '配置 UDC 检查',
|
||||
one_kvm_bound_udc: 'gadget 绑定 UDC 检查',
|
||||
hid_functions_present: 'HID 函数检查',
|
||||
config_c1_exists: 'configs/c.1 检查',
|
||||
function_links_ok: 'functions 链接检查',
|
||||
hid_device_nodes: 'HID 设备节点检查',
|
||||
udc_conflict: 'UDC 冲突检查',
|
||||
udc_state: 'UDC 状态检查',
|
||||
udc_speed: 'UDC 速率检查',
|
||||
},
|
||||
hints: {
|
||||
udc_dir_exists: '请确认内核已启用 UDC/OTG 驱动',
|
||||
udc_has_entries: '请确认 OTG 控制器已在设备树中启用',
|
||||
configfs_mounted: '可执行: mount -t configfs none /sys/kernel/config',
|
||||
usb_gadget_dir_exists: '请确认 configfs 与 USB gadget 支持已启用',
|
||||
libcomposite_loaded: '可执行: modprobe libcomposite',
|
||||
one_kvm_gadget_exists: '启用 OTG HID 或 MSD 后会自动创建 one-kvm gadget',
|
||||
other_gadgets: '可能与 one-kvm 抢占 UDC,请检查是否有其他 OTG 服务',
|
||||
configured_udc_valid: '请在 HID OTG 设置中重新选择 UDC',
|
||||
one_kvm_bound_udc: '请确认 HID/MSD 已启用并成功初始化',
|
||||
hid_functions_present: '请检查 OTG HID 配置是否至少启用了一个 HID 功能',
|
||||
config_c1_exists: 'gadget 结构不完整,请尝试重启 One-KVM',
|
||||
function_links_ok: '建议重新初始化 OTG(切换一次 HID 后端或重启服务)',
|
||||
hid_device_nodes: '请确认 gadget 已绑定并检查内核日志',
|
||||
udc_conflict: '请停用其他 OTG 服务或切换 one-kvm 到空闲 UDC',
|
||||
udc_state: '请确认已连接被控机,且被控机已识别 USB 设备',
|
||||
udc_speed: '设备可能未完成枚举,可尝试重插 USB',
|
||||
},
|
||||
},
|
||||
// WebRTC / ICE
|
||||
webrtcSettings: 'WebRTC 设置',
|
||||
webrtcSettingsDesc: '配置 STUN/TURN 服务器以实现 NAT 穿透',
|
||||
|
||||
Reference in New Issue
Block a user