@@ -17,6 +17,8 @@ interface NetworkConfigSectionProps {
1717 setWifiPsk : ( value : string ) => void ;
1818 ntpServer : string ;
1919 setNtpServer : ( value : string ) => void ;
20+ rsyslogServer : string ;
21+ setRsyslogServer : ( value : string ) => void ;
2022 addressMode : number ;
2123 setAddressMode : ( value : number ) => void ;
2224 // Static IP config
@@ -42,6 +44,8 @@ const NetworkConfigSection: React.FC<NetworkConfigSectionProps> = ({
4244 setWifiPsk,
4345 ntpServer,
4446 setNtpServer,
47+ rsyslogServer,
48+ setRsyslogServer,
4549 addressMode,
4650 setAddressMode,
4751 ipv4Address,
@@ -60,7 +64,7 @@ const NetworkConfigSection: React.FC<NetworkConfigSectionProps> = ({
6064
6165 // Track initial values for change detection
6266 const initialValuesRef = useRef ( {
63- wifiEnabled, wifiSsid, wifiPsk, ntpServer, addressMode,
67+ wifiEnabled, wifiSsid, wifiPsk, ntpServer, rsyslogServer , addressMode,
6468 ipv4Address, ipv4Gateway, ipv4Subnet, ipv4Dns
6569 } ) ;
6670
@@ -72,13 +76,14 @@ const NetworkConfigSection: React.FC<NetworkConfigSectionProps> = ({
7276 wifiSsid !== initial . wifiSsid ||
7377 wifiPsk !== initial . wifiPsk ||
7478 ntpServer !== initial . ntpServer ||
79+ rsyslogServer !== initial . rsyslogServer ||
7580 addressMode !== initial . addressMode ||
7681 ipv4Address !== initial . ipv4Address ||
7782 ipv4Gateway !== initial . ipv4Gateway ||
7883 ipv4Subnet !== initial . ipv4Subnet ||
7984 ipv4Dns !== initial . ipv4Dns
8085 ) ;
81- } , [ wifiEnabled , wifiSsid , wifiPsk , ntpServer , addressMode ,
86+ } , [ wifiEnabled , wifiSsid , wifiPsk , ntpServer , rsyslogServer , addressMode ,
8287 ipv4Address , ipv4Gateway , ipv4Subnet , ipv4Dns ] ) ;
8388
8489 // Reset to initial values (for SaveBar dismiss)
@@ -88,22 +93,23 @@ const NetworkConfigSection: React.FC<NetworkConfigSectionProps> = ({
8893 setWifiSsid ( initial . wifiSsid ) ;
8994 setWifiPsk ( initial . wifiPsk ) ;
9095 setNtpServer ( initial . ntpServer ) ;
96+ setRsyslogServer ( initial . rsyslogServer ) ;
9197 setAddressMode ( initial . addressMode ) ;
9298 setIpv4Address ( initial . ipv4Address ) ;
9399 setIpv4Gateway ( initial . ipv4Gateway ) ;
94100 setIpv4Subnet ( initial . ipv4Subnet ) ;
95101 setIpv4Dns ( initial . ipv4Dns ) ;
96- } , [ setWifiEnabled , setWifiSsid , setWifiPsk , setNtpServer , setAddressMode ,
102+ } , [ setWifiEnabled , setWifiSsid , setWifiPsk , setNtpServer , setRsyslogServer , setAddressMode ,
97103 setIpv4Address , setIpv4Gateway , setIpv4Subnet , setIpv4Dns ] ) ;
98104
99105 // Update initial values after successful save
100106 const handleSave = useCallback ( async ( ) => {
101107 await onSave ( ) ;
102108 initialValuesRef . current = {
103- wifiEnabled, wifiSsid, wifiPsk, ntpServer, addressMode,
109+ wifiEnabled, wifiSsid, wifiPsk, ntpServer, rsyslogServer , addressMode,
104110 ipv4Address, ipv4Gateway, ipv4Subnet, ipv4Dns
105111 } ;
106- } , [ onSave , wifiEnabled , wifiSsid , wifiPsk , ntpServer , addressMode ,
112+ } , [ onSave , wifiEnabled , wifiSsid , wifiPsk , ntpServer , rsyslogServer , addressMode ,
107113 ipv4Address , ipv4Gateway , ipv4Subnet , ipv4Dns ] ) ;
108114
109115 // Register with SaveBar
@@ -326,6 +332,24 @@ const NetworkConfigSection: React.FC<NetworkConfigSectionProps> = ({
326332 style = { { width : '400px' } }
327333 />
328334 </ div >
335+
336+ { /* Rsyslog Server */ }
337+ < div className = "setting-item" >
338+ < label htmlFor = "rsyslogServer" >
339+ { t ( 'network_config.rsyslog_server' ) }
340+ < span className = "setting-description" > { t ( 'network_config.rsyslog_server_description' ) } </ span >
341+ </ label >
342+ < input
343+ id = "rsyslogServer"
344+ type = "text"
345+ value = { rsyslogServer }
346+ onChange = { ( e ) => setRsyslogServer ( e . target . value ) }
347+ placeholder = "192.168.1.100:514"
348+ maxLength = { 33 }
349+ className = "setting-input"
350+ style = { { width : '400px' } }
351+ />
352+ </ div >
329353 </ div >
330354 ) ;
331355} ;
0 commit comments