/** * * Copyright 2023-2025 InspectorRAGet Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * **/ 'use client'; import Link from 'next/link'; import { ExpandableTile, TileAboveTheFoldContent, TileBelowTheFoldContent, Tag, DefinitionTooltip, Toggletip, ToggletipButton, ToggletipContent, ToggletipActions, UnorderedList, ListItem, } from '@carbon/react'; import { Microscope, Information } from '@carbon/icons-react'; import { TileData } from '@/src/types'; import { MetricDefinitions, extractMetricDisplayName, } from '@/src/utilities/metrics'; import { calculateDuration } from '@/src/utilities/time'; import styles from './ExampleTile.module.scss'; export default function ExampleTile({ data, disableNavigation = false, expanded = true, }: { data: TileData; disableNavigation?: boolean; expanded?: boolean; }) { const [ durationInDays, durationInHours, durationInMinutes, durationInSeconds, ] = calculateDuration(data.endTimestamp, data.startTimestamp); return (
{disableNavigation ? ( {data.name} ) : ( {data.name} )}
# of tasks
{data.numTasks}
# of annotators
{data.annotators.length}
Metrics

Analytics platform supports three kind of metrics

Go vs No-Go Rubric Intuitive Rubric Detailed Rubric Reference
{[...data.metrics].map((metric) => { return ( {extractMetricDisplayName(metric)} ); })}
Models
{[...data.models].map((model) => { return ( {model.name} ); })}
{durationInDays || durationInHours || durationInMinutes || durationInSeconds ? (
Duration
{durationInDays ? durationInDays + ' days ' : ''} {durationInHours ? durationInHours + ' hours ' : ''} {durationInMinutes ? durationInMinutes + ' mins ' : ''} {durationInSeconds} sec
) : null}
); }