@@ -6,13 +6,13 @@ import { TimeOps } from "@device-ui/lib/algo/time_ops";
66import { ConnectionHandler } from "@device-ui/lib/device/connection_handler" ;
77import { FanoutConnectionHandler } from "@device-ui/lib/device/fanout_connection_handler" ;
88
9- import "@device-ui/ui/preact/device_status_component .css" ;
9+ import "@device-ui/ui/preact/system_status_component .css" ;
1010
11- export type DeviceStatusComponentProps = {
12- // Telemetry fetcher to receive latest telemetry data.
11+ export type SystemStatusComponentProps = {
12+ // Telemetry store to receive latest telemetry data.
1313 telemetryStore : DataStore ;
1414
15- // Registration fetcher to receive latest registration data.
15+ // Registration store to receive latest registration data.
1616 registrationStore : DataStore ;
1717
1818 // Connection handler to receive the device connection status.
@@ -42,7 +42,7 @@ class RegistrationData {
4242 ) { }
4343}
4444
45- type DeviceStatusComponentState = {
45+ type SystemStatusComponentState = {
4646 expanded : boolean ;
4747 connected : boolean ;
4848 telemetry : TelemetryData | null ;
@@ -69,11 +69,11 @@ function formatResetReason(reason: string): string {
6969 return reasonMap [ reason ] || reason ;
7070}
7171
72- export class DeviceStatusComponent
73- extends Component < DeviceStatusComponentProps , DeviceStatusComponentState >
72+ export class SystemStatusComponent
73+ extends Component < SystemStatusComponentProps , SystemStatusComponentState >
7474 implements ObjectMonitor , ConnectionHandler
7575{
76- constructor ( props : DeviceStatusComponentProps ) {
76+ constructor ( props : SystemStatusComponentProps ) {
7777 super ( props ) ;
7878
7979 this . state = {
@@ -91,21 +91,21 @@ export class DeviceStatusComponent
9191 error = this . props . telemetryStore . add ( this ) ;
9292 if ( error ) {
9393 console . error (
94- `device_status_component : failed to register for telemetry changes: ${ error } ` ,
94+ `system_status_component : failed to register for telemetry changes: ${ error } ` ,
9595 ) ;
9696 }
9797
9898 error = this . props . registrationStore . add ( this ) ;
9999 if ( error ) {
100100 console . error (
101- `device_status_component : failed to register for registration changes: ${ error } ` ,
101+ `system_status_component : failed to register for registration changes: ${ error } ` ,
102102 ) ;
103103 }
104104
105105 error = this . props . connectionHandler . add ( this ) ;
106106 if ( error ) {
107107 console . error (
108- `device_status_component : failed to register for connection changes: ${ error } ` ,
108+ `system_status_component : failed to register for connection changes: ${ error } ` ,
109109 ) ;
110110 }
111111 }
@@ -116,21 +116,21 @@ export class DeviceStatusComponent
116116 error = this . props . telemetryStore . remove ( this ) ;
117117 if ( error ) {
118118 console . error (
119- `device_status_component : failed to unregister for telemetry changes: ${ error } ` ,
119+ `system_status_component : failed to unregister for telemetry changes: ${ error } ` ,
120120 ) ;
121121 }
122122
123123 error = this . props . registrationStore . remove ( this ) ;
124124 if ( error ) {
125125 console . error (
126- `device_status_component : failed to unregister for registration changes: ${ error } ` ,
126+ `system_status_component : failed to unregister for registration changes: ${ error } ` ,
127127 ) ;
128128 }
129129
130130 error = this . props . connectionHandler . remove ( this ) ;
131131 if ( error ) {
132132 console . error (
133- `device_status_component : failed to unregister for connection changes: ${ error } ` ,
133+ `system_status_component : failed to unregister for connection changes: ${ error } ` ,
134134 ) ;
135135 }
136136
@@ -146,12 +146,12 @@ export class DeviceStatusComponent
146146 render ( ) {
147147 if ( ! this . state . telemetry && ! this . state . registration ) {
148148 return (
149- < div className = "device -status-card" >
150- < div className = "device -status-header" >
151- < div className = "device -status-title-row" >
152- < h3 className = "device -status-title" > Device Status</ h3 >
149+ < div className = "system -status-card" >
150+ < div className = "system -status-header" >
151+ < div className = "system -status-title-row" >
152+ < h3 className = "system -status-title" > System Status</ h3 >
153153 </ div >
154- < p className = "device -status-loading" > Loading device data...</ p >
154+ < p className = "system -status-loading" > Loading device data...</ p >
155155 </ div >
156156 </ div >
157157 ) ;
@@ -161,14 +161,14 @@ export class DeviceStatusComponent
161161 const statusClass = `status-${ deviceStatus . status } ` ;
162162
163163 return (
164- < div className = "device -status-card" >
164+ < div className = "system -status-card" >
165165 { /* Header - always visible */ }
166166 < div
167- className = { `device -status-header ${ this . state . expanded ? "expanded" : "" } ` }
167+ className = { `system -status-header ${ this . state . expanded ? "expanded" : "" } ` }
168168 onClick = { this . toggleExpanded }
169169 >
170- < div className = "device -status-title-row" >
171- < h3 className = "device -status-title" > Device Status</ h3 >
170+ < div className = "system -status-title-row" >
171+ < h3 className = "system -status-title" > System Status</ h3 >
172172 < div
173173 className = { `expand-arrow ${ this . state . expanded ? "expanded" : "" } ` }
174174 />
@@ -208,7 +208,7 @@ export class DeviceStatusComponent
208208
209209 { /* Expanded details */ }
210210 { this . state . expanded && (
211- < div className = "device -status-details" >
211+ < div className = "system -status-details" >
212212 < div className = "details-grid" >
213213 { this . state . telemetry && (
214214 < >
@@ -277,12 +277,12 @@ export class DeviceStatusComponent
277277 notifyChanged ( ) {
278278 const rawTelemetryData = this . props . telemetryStore . getData ( ) ;
279279 const telemetryData = rawTelemetryData
280- ? DeviceStatusComponent . formatTelemetryData ( rawTelemetryData )
280+ ? SystemStatusComponent . formatTelemetryData ( rawTelemetryData )
281281 : null ;
282282
283283 const rawRegistrationData = this . props . registrationStore . getData ( ) ;
284284 const registrationData = rawRegistrationData
285- ? DeviceStatusComponent . formatRegistrationData ( rawRegistrationData )
285+ ? SystemStatusComponent . formatRegistrationData ( rawRegistrationData )
286286 : null ;
287287
288288 this . setState ( {
@@ -361,7 +361,7 @@ export class DeviceStatusComponent
361361 } , 1500 ) ;
362362 } catch ( error ) {
363363 console . error (
364- "device_status_component : failed to copy device ID:" ,
364+ "system_status_component : failed to copy device ID:" ,
365365 error ,
366366 ) ;
367367 }
0 commit comments