mirror of
https://github.com/jetkvm/kvm.git
synced 2026-05-21 05:20:35 +00:00
edaa86c0d3
* fix: add USB serial console toggle to hardware settings (#726) * fix: add USB CDC-ACM serial console gadget function (#726) Add serial_console.go with acm.usb0 gadget config item following the mass_storage pattern. Add SerialConsole bool to Devices struct and wire it through config.go enable check and jsonrpc.go setUsbDeviceState. The existing UI toggle in UsbDeviceSetting.tsx (with localization messages) now calls through to the backend correctly. When enabled, the KVM device creates /dev/ttyGS0 and the target host sees a CDC-ACM serial device (/dev/ttyACM*). When disabled, the symlink is removed from the USB gadget config and the host no longer enumerates the ACM interface. * fix: add CDC-ACM Console terminal UI for USB serial gadget (#726) * fix: merge terminal buttons into split button and rename CDC-ACM to USB Serial Console (#726) Combine KVM Terminal and USB Serial Console into a split button when both are present, make USB serial console state reactive via zustand store so the action bar updates without a page refresh, and fix the split button chevron not respecting the disabled state.
37 lines
1.5 KiB
Go
37 lines
1.5 KiB
Go
package kvm
|
|
|
|
import (
|
|
"github.com/jetkvm/kvm/internal/logging"
|
|
"github.com/rs/zerolog"
|
|
)
|
|
|
|
func ErrorfL(l *zerolog.Logger, format string, err error, args ...any) error {
|
|
return logging.ErrorfL(l, format, err, args...)
|
|
}
|
|
|
|
var (
|
|
logger = logging.GetSubsystemLogger("jetkvm")
|
|
failsafeLogger = logging.GetSubsystemLogger("failsafe")
|
|
networkLogger = logging.GetSubsystemLogger("network")
|
|
cloudLogger = logging.GetSubsystemLogger("cloud")
|
|
websocketLogger = logging.GetSubsystemLogger("websocket")
|
|
webrtcLogger = logging.GetSubsystemLogger("webrtc")
|
|
nativeLogger = logging.GetSubsystemLogger("native")
|
|
nbdLogger = logging.GetSubsystemLogger("nbd")
|
|
timesyncLogger = logging.GetSubsystemLogger("timesync")
|
|
jsonRpcLogger = logging.GetSubsystemLogger("jsonrpc")
|
|
hidRPCLogger = logging.GetSubsystemLogger("hidrpc")
|
|
watchdogLogger = logging.GetSubsystemLogger("watchdog")
|
|
websecureLogger = logging.GetSubsystemLogger("websecure")
|
|
otaLogger = logging.GetSubsystemLogger("ota")
|
|
serialLogger = logging.GetSubsystemLogger("serial")
|
|
terminalLogger = logging.GetSubsystemLogger("terminal")
|
|
cdcACMLogger = logging.GetSubsystemLogger("cdcacm")
|
|
displayLogger = logging.GetSubsystemLogger("display")
|
|
wolLogger = logging.GetSubsystemLogger("wol")
|
|
usbLogger = logging.GetSubsystemLogger("usb")
|
|
tailscaleLogger = logging.GetSubsystemLogger("tailscale")
|
|
// external components
|
|
ginLogger = logging.GetSubsystemLogger("gin")
|
|
)
|