import { Minimize2 } from 'lucide-react'; import { BasicTableSettings, RefreshableTableSettings, } from '@@/datatables/types'; import { ExpandableDatatable } from '@@/datatables/ExpandableDatatable'; import { TableSettingsMenu } from '@@/datatables'; import { TableSettingsMenuAutoRefresh } from '@@/datatables/TableSettingsMenuAutoRefresh'; import { TextTip } from '@@/Tip/TextTip'; import { NodePlacementRowData } from '../types'; import { SubRow } from './PlacementsDatatableSubRow'; import { columns } from './columns'; interface TableSettings extends BasicTableSettings, RefreshableTableSettings {} type Props = { isLoading: boolean; dataset: NodePlacementRowData[]; hasPlacementWarning: boolean; tableState: TableSettings & { setSearch: (value: string) => void; search: string; }; }; export function PlacementsDatatable({ isLoading, dataset, hasPlacementWarning, tableState, }: Props) { return ( !row.original.acceptsApplication} title="Placement constraints/preferences" titleIcon={Minimize2} dataset={dataset} settingsManager={tableState} getRowId={(row) => row.name} columns={columns} disableSelect description={ hasPlacementWarning ? ( Based on the placement rules, the application pod can't be scheduled on any nodes. ) : ( The placement table helps you understand whether or not this application can be deployed on a specific node. ) } renderTableSettings={() => ( )} emptyContentLabel="No node available." renderSubRow={(row) => ( )} /> ); }