MCPcopy Index your code
hub / github.com/tinyplex/tinybase / MetricsView

Function MetricsView

src/ui-solid-inspector/index.tsx:762–797  ·  view source on GitHub ↗
(props: {readonly metricsId?: Id} & StoreProp)

Source from the content-addressed store, hash-verified

760);
761
762const MetricsView = (props: {readonly metricsId?: Id} & StoreProp) => {
763 const metrics = useMetrics(props.metricsId);
764 const metricIds = useMetricIds(metrics);
765 return (
766 <>
767 {isUndefined(metrics()) ? (
768 EMPTY_STRING
769 ) : (
770 <Details
771 uniqueId={getUniqueId('m', props.metricsId)}
772 title={'Metrics: ' + (props.metricsId ?? DEFAULT)}
773 s={props.s}
774 >
775 {arrayIsEmpty(metricIds()) ? (
776 'No metrics defined'
777 ) : (
778 <table>
779 <thead>
780 <tr>
781 <th>Metric Id</th>
782 <th>Table Id</th>
783 <th>Metric</th>
784 </tr>
785 </thead>
786 <tbody>
787 {arrayMap(metricIds(), (metricId) => (
788 <MetricRow metrics={metrics()} metricId={metricId} />
789 ))}
790 </tbody>
791 </table>
792 )}
793 </Details>
794 )}
795 </>
796 );
797};
798
799const SliceView = (
800 props: {

Callers

nothing calls this directly

Calls 7

useMetricsFunction · 0.90
useMetricIdsFunction · 0.90
isUndefinedFunction · 0.90
getUniqueIdFunction · 0.90
arrayIsEmptyFunction · 0.90
arrayMapFunction · 0.90
metricsFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…