- {formatUptime(systemInfo.uptime)}
+ {formatUptime(systemInfo?.uptime ?? 0)}
Since last restart
@@ -269,9 +269,9 @@ export default function AdminSystemPage() {
- {systemInfo.cpu.usage.toFixed(1)}%
+ {systemInfo?.cpu?.usage?.toFixed(1) ?? '0'}%
- {systemInfo.cpu.cores} cores
+ {systemInfo?.cpu?.cores ?? 0} cores
@@ -282,9 +282,9 @@ export default function AdminSystemPage() {
- {systemInfo.memory.percentage.toFixed(1)}%
+ {systemInfo?.memory?.percentage?.toFixed(1) ?? '0'}%
- {formatBytes(systemInfo.memory.used)} / {formatBytes(systemInfo.memory.total)}
+ {formatBytes(systemInfo?.memory?.used ?? 0)} / {formatBytes(systemInfo?.memory?.total ?? 0)}
@@ -295,9 +295,9 @@ export default function AdminSystemPage() {
- {systemInfo.disk.percentage.toFixed(1)}%
+ {systemInfo?.disk?.percentage?.toFixed(1) ?? '0'}%
- {formatBytes(systemInfo.disk.used)} / {formatBytes(systemInfo.disk.total)}
+ {formatBytes(systemInfo?.disk?.used ?? 0)} / {formatBytes(systemInfo?.disk?.total ?? 0)}
@@ -312,19 +312,19 @@ export default function AdminSystemPage() {
Environment:
- {systemInfo.environment}
+ {systemInfo?.environment ?? 'N/A'}
Version:
- {systemInfo.version}
+ {systemInfo?.version ?? 'N/A'}
Node.js:
- {systemInfo.nodeVersion}
+ {systemInfo?.nodeVersion ?? 'N/A'}
Platform:
- {systemInfo.platform}
+ {systemInfo?.platform ?? 'N/A'}
@@ -336,7 +336,7 @@ export default function AdminSystemPage() {
- {systemInfo.network.interfaces.map((iface, index) => (
+ {systemInfo?.network?.interfaces?.map((iface, index) => (
{iface.name}
{iface.address}
@@ -373,9 +373,9 @@ export default function AdminSystemPage() {
{service.name}
- Uptime: {formatUptime(service.uptime)} |
- Memory: {formatBytes(service.memory)} |
- CPU: {service.cpu.toFixed(1)}%
+ Uptime: {formatUptime(service.uptime)} |
+ Memory: {formatBytes(service.memory)} |
+ CPU: {service.cpu?.toFixed(1) ?? '0'}%
Last restart: {new Date(service.lastRestart).toLocaleString()}