Refactor events to be more generic (#6320)

* Organize event table to be more generalized

* Add appropriate fields to data

* Move tracked object logic to own function

* Add source type to event queue

* rename enum

* Fix types that are used in webUI

* remove redundant

* Formatting

* fix typing

* Rename enum
This commit is contained in:
Nicolas Mowen
2023-04-30 11:07:14 -06:00
committed by GitHub
parent ca7790ff65
commit ad52e238ce
8 changed files with 221 additions and 120 deletions

View File

@@ -163,7 +163,9 @@ export function EventCard({ camera, event }) {
<div className="text-xs md:text-normal text-gray-300">Start: {format(start, 'HH:mm:ss')}</div>
<div className="text-xs md:text-normal text-gray-300">Duration: {duration}</div>
</div>
<div className="text-lg text-white text-right leading-tight">{(event.top_score * 100).toFixed(1)}%</div>
<div className="text-lg text-white text-right leading-tight">
{((event?.data?.top_score || event.top_score) * 100).toFixed(1)}%
</div>
</div>
</div>
</div>