Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

901 B
Raw Blame
import { useValues } from 'kea'

import { dataQualityChecksLogic } from './dataQualityChecksLogic'
import { DataQualityChecksPanel } from './DataQualityChecksPanel'
import { DataQualitySchedule } from './DataQualitySchedule'

interface MetricChecksPanelProps {
    metricId: string
    newCheckDisabledReason?: string
}

export function MetricChecksPanel({ metricId, newCheckDisabledReason }: MetricChecksPanelProps): JSX.Element | null {
    const { checks } = useValues(dataQualityChecksLogic({ subjectType: 'metric', subjectId: metricId }))

    return (
        <DataQualityChecksPanel
            subjectType="metric"
            subjectId={metricId}
            columns={[]}
            hideTitle
            newCheckDisabledReason={newCheckDisabledReason}
            notice={checks.length > 0 ? <DataQualitySchedule subjectType="metric" subjectId={metricId} /> : undefined}
        />
    )
}