Condense table

This commit is contained in:
David Corbitt
2023-08-15 00:26:05 -07:00
parent 11bfb5d5e4
commit bb9c3a9e61

View File

@@ -41,8 +41,8 @@ export const TableHeader = ({ showCheckbox }: { showCheckbox?: boolean }) => {
<Thead> <Thead>
<Tr> <Tr>
{showCheckbox && ( {showCheckbox && (
<Th> <Th pr={0}>
<HStack w={8}> <HStack minW={16}>
<Checkbox <Checkbox
isChecked={allSelected} isChecked={allSelected}
onChange={() => { onChange={() => {
@@ -56,7 +56,7 @@ export const TableHeader = ({ showCheckbox }: { showCheckbox?: boolean }) => {
</HStack> </HStack>
</Th> </Th>
)} )}
<Th>Time</Th> <Th>Sent At</Th>
<Th>Model</Th> <Th>Model</Th>
<Th isNumeric>Duration</Th> <Th isNumeric>Duration</Th>
<Th isNumeric>Input tokens</Th> <Th isNumeric>Input tokens</Th>
@@ -79,7 +79,7 @@ export const TableRow = ({
showCheckbox?: boolean; showCheckbox?: boolean;
}) => { }) => {
const isError = loggedCall.modelResponse?.statusCode !== 200; const isError = loggedCall.modelResponse?.statusCode !== 200;
const timeAgo = dayjs(loggedCall.requestedAt).fromNow(); const requestedAt = dayjs(loggedCall.requestedAt).format("MMMM D h:mm A");
const fullTime = dayjs(loggedCall.requestedAt).toString(); const fullTime = dayjs(loggedCall.requestedAt).toString();
const durationCell = ( const durationCell = (
@@ -104,6 +104,7 @@ export const TableRow = ({
sx={{ sx={{
"> td": { borderBottom: "none" }, "> td": { borderBottom: "none" },
}} }}
fontSize="sm"
> >
{showCheckbox && ( {showCheckbox && (
<Td> <Td>
@@ -113,7 +114,7 @@ export const TableRow = ({
<Td> <Td>
<Tooltip label={fullTime} placement="top"> <Tooltip label={fullTime} placement="top">
<Box whiteSpace="nowrap" minW="120px"> <Box whiteSpace="nowrap" minW="120px">
{timeAgo} {requestedAt}
</Box> </Box>
</Tooltip> </Tooltip>
</Td> </Td>