(props: SourceTableProps)
| 258 | } |
| 259 | |
| 260 | export const SourceTable = (props: SourceTableProps) => { |
| 261 | const sourcePath = useBuildSourcePath(); |
| 262 | const navigate = useNavigate(); |
| 263 | const { colors } = useTheme<MaterializeTheme>(); |
| 264 | |
| 265 | return ( |
| 266 | <Table variant="linkable" data-testid="source-table" borderRadius="xl"> |
| 267 | <Thead> |
| 268 | <Tr> |
| 269 | <Th> |
| 270 | <SortToggleButton |
| 271 | label="Name" |
| 272 | column="name" |
| 273 | {...props.sortOptions} |
| 274 | /> |
| 275 | </Th> |
| 276 | <Th width="25%"> |
| 277 | <SortToggleButton |
| 278 | label="Status" |
| 279 | column="status" |
| 280 | {...props.sortOptions} |
| 281 | /> |
| 282 | </Th> |
| 283 | <Th width="25%"> |
| 284 | <SortToggleButton |
| 285 | label="Type" |
| 286 | column="type" |
| 287 | {...props.sortOptions} |
| 288 | /> |
| 289 | </Th> |
| 290 | <Th width={OVERFLOW_BUTTON_WIDTH}></Th> |
| 291 | </Tr> |
| 292 | </Thead> |
| 293 | <Tbody> |
| 294 | {props.sources.map((s) => ( |
| 295 | <Tr |
| 296 | key={s.id} |
| 297 | onClick={() => navigate(sourcePath(s))} |
| 298 | cursor="pointer" |
| 299 | > |
| 300 | <Td {...truncateMaxWidth} py="2"> |
| 301 | <Text |
| 302 | textStyle="text-small" |
| 303 | fontWeight="500" |
| 304 | noOfLines={1} |
| 305 | color={colors.foreground.secondary} |
| 306 | > |
| 307 | {createNamespace(s.databaseName, s.schemaName)} |
| 308 | </Text> |
| 309 | <Text textStyle="text-ui-med" noOfLines={1}> |
| 310 | {s.name} |
| 311 | </Text> |
| 312 | </Td> |
| 313 | <Td>{s.status ? <ConnectorStatusPill connector={s} /> : "-"}</Td> |
| 314 | <Td {...truncateMaxWidth}> |
| 315 | <Text textStyle="text-ui-reg" noOfLines={1}> |
| 316 | {prettyConnectorType(s.type)} |
| 317 | </Text> |
nothing calls this directly
no test coverage detected