Files
usda-vision/vision-system-remote/src/widgets/SystemHealthWidget.tsx
salirezav 6b0738839b Remove deprecated files and scripts to streamline the codebase
- Deleted unused API test files, RTSP diagnostic scripts, and development utility scripts to reduce clutter.
- Removed outdated database schema and modularization proposal documents to maintain focus on current architecture.
- Cleaned up configuration files and logging scripts that are no longer in use, enhancing project maintainability.
2025-11-02 10:07:59 -05:00

27 lines
787 B
TypeScript

import React from 'react'
import { StatusWidget } from './StatusWidget'
import { formatUptime } from '../services/api'
import type { SystemStatus } from '../services/api'
interface SystemHealthWidgetProps {
systemStatus: SystemStatus | null
}
export const SystemHealthWidget: React.FC<SystemHealthWidgetProps> = ({ systemStatus }) => {
const isOnline = systemStatus?.system_started ?? false
const uptime = systemStatus?.uptime_seconds ?? 0
return (
<StatusWidget
title="System Status"
status={isOnline}
statusText={isOnline ? 'Online' : 'Offline'}
subtitle={uptime > 0 ? `Uptime: ${formatUptime(uptime)}` : undefined}
icon={
<div className={`w-3 h-3 rounded-full ${isOnline ? 'bg-green-500' : 'bg-red-500'}`} />
}
/>
)
}