Loading...
;\n }\n if (isError) {\n return (\n \n
\n {!isEmpty(commonLabels) && (\n
\n
\n Common labels\n \n \n \n \n \n
\n )}\n {isEmpty(frameSubset) ? (\n <>\n
\n {emptyStateMessage}\n {totalRecordsCount > 0 && (\n \n )}\n
\n >\n ) : (\n <>\n
\n \n
\n {hasMoreInstances && (\n
\n \n \n {`Only showing ${frameSubset.length} out of ${dataFrames.length} instances. Click on the labels to narrow down the results`}\n \n
\n )}\n
(logsRef.current = recordRefs)}\n onLabelClick={onLogRecordLabelClick}\n />\n >\n )}\n \n );\n};\n\nfunction useFrameSubset(frames: DataFrame[]) {\n return useMemo(() => {\n const frameSubset = take(frames, MAX_TIMELINE_SERIES);\n const frameSubsetTimestamps = sortBy(uniq(frameSubset.flatMap((frame) => frame.fields[0].values)));\n\n const minTs = Math.min(...frameSubsetTimestamps);\n const maxTs = Math.max(...frameSubsetTimestamps);\n\n const rangeStart = dateTime(minTs);\n const rangeStop = dateTime(maxTs);\n\n const frameTimeRange: TimeRange = {\n from: rangeStart,\n to: rangeStop,\n raw: {\n from: rangeStart,\n to: rangeStop,\n },\n };\n\n return { frameSubset, frameSubsetTimestamps, frameTimeRange };\n }, [frames]);\n}\n\ninterface SearchFieldInputProps extends Omit