Add retain column to events

This commit is contained in:
Nick Mowen 2022-02-21 08:29:55 -07:00
parent eb2592c0ba
commit 769ff8505f
2 changed files with 4 additions and 0 deletions

View File

@ -9,6 +9,7 @@ const TableHead = () => (
<Th>Label</Th> <Th>Label</Th>
<Th>Score</Th> <Th>Score</Th>
<Th>Zones</Th> <Th>Zones</Th>
<Th>Retain</Th>
<Th>Date</Th> <Th>Date</Th>
<Th>Start</Th> <Th>Start</Th>
<Th>End</Th> <Th>End</Th>

View File

@ -4,6 +4,7 @@ import { useCallback, useState, useMemo } from 'preact/hooks';
import { Tr, Td, Tbody } from '../../../components/Table'; import { Tr, Td, Tbody } from '../../../components/Table';
import Filterable from './filterable'; import Filterable from './filterable';
import Event from '../../Event'; import Event from '../../Event';
import StarRecording from '../../../icons/StarRecording';
import { useSearchString } from '../../../hooks/useSearchString'; import { useSearchString } from '../../../hooks/useSearchString';
import { useClickOutside } from '../../../hooks/useClickOutside'; import { useClickOutside } from '../../../hooks/useClickOutside';
@ -22,6 +23,7 @@ const EventsRow = memo(
label, label,
top_score: score, top_score: score,
zones, zones,
retain_indefinitely
}) => { }) => {
const [viewEvent, setViewEvent] = useState(null); const [viewEvent, setViewEvent] = useState(null);
const { searchString, removeDefaultSearchKeys } = useSearchString(limit); const { searchString, removeDefaultSearchKeys } = useSearchString(limit);
@ -100,6 +102,7 @@ const EventsRow = memo(
))} ))}
</ul> </ul>
</Td> </Td>
<Td>{retain_indefinitely ? 'True' : 'False'}</Td>
<Td>{start.toLocaleDateString()}</Td> <Td>{start.toLocaleDateString()}</Td>
<Td>{start.toLocaleTimeString()}</Td> <Td>{start.toLocaleTimeString()}</Td>
<Td>{end === null ? 'In progress' : end.toLocaleTimeString()}</Td> <Td>{end === null ? 'In progress' : end.toLocaleTimeString()}</Td>