WebUI: Show label & sub labels values next to the score (#7121)

* Refactor event label and sub-label score display in Events.jsx to include the event label and sub-label percentage

* Revert "Refactor event label and sub-label score display in Events.jsx to include the event label and sub-label percentage"

This reverts commit 87c23adf1e.

* Refactor event label and sub label score display in Events component
This commit is contained in:
Sergey Krashevich 2023-07-14 14:25:53 +03:00 committed by GitHub
parent b909ff4ecb
commit 6d34f2229b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -630,10 +630,10 @@ export default function Events({ path, ...props }) {
<Score className="w-5 h-5 mr-2 inline" />
{(event?.data?.top_score || event.top_score || 0) == 0
? null
: `Label: ${((event?.data?.top_score || event.top_score) * 100).toFixed(0)}%`}
: `${event.label}: ${((event?.data?.top_score || event.top_score) * 100).toFixed(0)}%`}
{(event?.data?.sub_label_score || 0) == 0
? null
: `, Sub Label: ${(event?.data?.sub_label_score * 100).toFixed(0)}%`}
: `, ${event.sub_label}: ${(event?.data?.sub_label_score * 100).toFixed(0)}%`}
</div>
</div>
<div class="hidden sm:flex flex-col justify-end mr-2">