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.
This commit is contained in:
26
vision-system-remote/src/widgets/SystemHealthWidget.tsx
Normal file
26
vision-system-remote/src/widgets/SystemHealthWidget.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
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'}`} />
|
||||
}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user