({
metricsId,
s,
}: {readonly metricsId?: Id} & StoreProp)
| 18 | ); |
| 19 | |
| 20 | export const MetricsView = ({ |
| 21 | metricsId, |
| 22 | s, |
| 23 | }: {readonly metricsId?: Id} & StoreProp) => { |
| 24 | const metrics = useMetrics(metricsId); |
| 25 | const metricIds = useMetricIds(metrics); |
| 26 | return isUndefined(metrics) ? null : ( |
| 27 | <Details |
| 28 | uniqueId={getUniqueId('m', metricsId)} |
| 29 | title={'Metrics: ' + (metricsId ?? DEFAULT)} |
| 30 | s={s} |
| 31 | > |
| 32 | {arrayIsEmpty(metricIds) ? ( |
| 33 | 'No metrics defined' |
| 34 | ) : ( |
| 35 | <table> |
| 36 | <thead> |
| 37 | <th>Metric Id</th> |
| 38 | <th>Table Id</th> |
| 39 | <th>Metric</th> |
| 40 | </thead> |
| 41 | <tbody> |
| 42 | {arrayMap(metricIds, (metricId) => ( |
| 43 | <MetricRow metrics={metrics} metricId={metricId} key={metricId} /> |
| 44 | ))} |
| 45 | </tbody> |
| 46 | </table> |
| 47 | )} |
| 48 | </Details> |
| 49 | ); |
| 50 | }; |
nothing calls this directly
no test coverage detected
searching dependent graphs…