MDK Logo

Feeds

Live event feeds on the dashboard — active incidents and activity logs

Feeds surface streams of operational events on the dashboard. ActiveIncidentsCard renders the current alerts feed; LogsCard (from @mdk/core) renders activity and event logs.

Prerequisites

ActiveIncidentsCard

Dashboard card showing current alerts and incidents with severity indicators.

Import

import { ActiveIncidentsCard } from '@mdk/foundation'
import type { TIncidentRowProps } from '@mdk/foundation'

Props

PropTypeDefaultDescription
labelstring'Active Alerts'Card header label
itemsTIncidentRowProps[][]Array of incident items to display
isLoadingbooleanfalseShow skeleton loading state
skeletonRowsnumber4Number of skeleton rows when loading
emptyMessagestringnoneMessage when no incidents
onItemClick(id: string) => voidnoneCallback when an incident row is clicked
classNamestringnoneAdditional CSS class

TIncidentRowProps

Each incident item requires these properties:

PropTypeDescription
idstringUnique incident identifier
titlestringIncident title
subtitlestringSecondary text (e.g., timestamp or source)
bodystringIncident description
severity'critical' | 'high' | 'medium'Severity level

Basic usage

<ActiveIncidentsCard
  label="Active Alerts"
  items={[
    {
      id: '1',
      title: 'High Temperature Alert',
      subtitle: 'Miner #A2341',
      body: 'Temperature exceeded 85°C threshold',
      severity: 'critical',
    },
    {
      id: '2',
      title: 'Network Connection Lost',
      subtitle: 'Pool: pool.example.com',
      body: 'Connection timeout after 30 seconds',
      severity: 'high',
    },
  ]}
  onItemClick={(id) => console.log('Clicked:', id)}
/>

Loading state

<ActiveIncidentsCard label="Active Alerts" isLoading skeletonRows={4} />

Empty state

<ActiveIncidentsCard
  label="Active Alerts"
  items={[]}
  emptyMessage="No active incidents"
/>

Styling

  • .mdk-active-incidents-card: Root element
  • .mdk-active-incidents-card__header: Header container
  • .mdk-active-incidents-card__label: Header label text
  • .mdk-active-incidents-card__list: Incidents list container
  • .mdk-active-incidents-card__row: Individual incident row
  • .mdk-active-incidents-card__row--clickable: Clickable row modifier
  • .mdk-active-incidents-card__row-title: Incident title
  • .mdk-active-incidents-card__row-subtitle: Incident subtitle
  • .mdk-active-incidents-card__row-body: Incident body text
  • .mdk-active-incidents-card__empty: Empty state container
  • .mdk-active-incidents-card__skeleton-container: Loading skeleton container

LogsCard

LogsCard is a @mdk/core component used on the dashboard to render paginated activity and event log feeds..

Import from @mdk/core:

import { LogsCard } from '@mdk/core'

Next steps

For past alerts to pair with the active incidents feed, see HistoricalAlerts.

On this page