Stats Inspector: Prevent long stats from being hidden (#66866)

* Stats Inspector: Prevent stats from being hidden

* Inspect stats: inline container styles
This commit is contained in:
Matias Chomicki 2023-04-20 17:06:47 +02:00 committed by GitHub
parent b24ba7b7ae
commit c11baa3ead
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,4 @@
import { css } from '@emotion/css';
import React from 'react';
import { PanelData, QueryResultMetaStat, TimeZone } from '@grafana/data';
@ -17,7 +18,6 @@ export const InspectStatsTab = ({ data, timeZone }: InspectStatsTabProps) => {
if (!data.request) {
return null;
}
let stats: QueryResultMetaStat[] = [];
const requestTime = data.request.endTime ? data.request.endTime - data.request.startTime : -1;
@ -64,7 +64,7 @@ export const InspectStatsTab = ({ data, timeZone }: InspectStatsTabProps) => {
const traceIdsStatsTableName = t('dashboard.inspect-stats.data-traceids', 'Trace IDs');
return (
<div aria-label={selectors.components.PanelInspector.Stats.content}>
<div aria-label={selectors.components.PanelInspector.Stats.content} className={containerStyles}>
<InspectStatsTable timeZone={timeZone} name={statsTableName} stats={stats} />
<InspectStatsTable timeZone={timeZone} name={dataStatsTableName} stats={dataStats} />
{config.featureToggles.showTraceId && (
@ -73,3 +73,8 @@ export const InspectStatsTab = ({ data, timeZone }: InspectStatsTabProps) => {
</div>
);
};
const containerStyles = css`
height: 100%;
overflow-y: scroll;
`;