typescript
import React from 'react'
import { CheckCircle, AlertTriangle, Info } from 'lucide-react'
interface ActivityItem {
id: string
type: 'success' | 'warning' | 'info'
title: string
description: string
timestamp: string
asset?: string
}
const ActivityTimeline: React.FC = () => {
const activities: ActivityItem[] = [
{
id: '1',
type: 'success',
title: 'Database server restored',
description: 'Backup restoration completed successfully',
timestamp: '2 hours ago',
asset: 'db-prod-01'
},
{
id: '2',
type: 'warning',
title: 'High memory usage detected',
description: 'Web server memory usage above 90% threshold',
timestamp: '4 hours ago',
asset: 'web-staging-02'
},
{
id: '3',
type: 'info',
title: 'New asset added',
description: 'Added new load balancer to inventory',
timestamp: '6 hours ago'
},
{
id: '4',
type: 'success',
title: 'Network switch configured',
description: 'VLAN configuration updated successfully',
timestamp: '1 day ago',
asset: 'switch-dc-03'
}
]
const getActivityIcon = (type: string) => {
switch (type) {
case 'success':
return
{activity.title}
{activity.description}
{activity.asset && ( {activity.asset} )}