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.

1.2 KB
Raw Blame
import { Link } from 'lib/lemon-ui/Link'
import { urls } from 'scenes/urls'

import { DataWarehouseSyncWarning } from '~/queries/schema/schema-general'

import { trimRedundantTail } from './warehouseSyncWarnings'

export function WarehouseSyncWarningList({ warnings }: { warnings: DataWarehouseSyncWarning[] }): JSX.Element {
    return (
        <ul className="list-disc pl-5 max-h-28 overflow-y-auto">
            {warnings.map((warning, index) => (
                <li key={`${warning.table_name}-${warning.schema_name}-${index}`}>
                    <span>{trimRedundantTail(warning.message)}</span>
                    {warning.source_id && (
                        <>
                            {' '}
                            <Link
                                to={urls.dataWarehouseSource(`managed-${warning.source_id}`)}
                                target="_blank"
                                data-attr="warehouse-sync-warning-manage-source"
                            >
                                Manage source
                            </Link>
                        </>
                    )}
                </li>
            ))}
        </ul>
    )
}