Annotation: use DataFrame[] rather than a single DataFrame (#27587)

This commit is contained in:
Ryan McKinley
2020-09-15 01:43:31 -07:00
committed by GitHub
parent e04e3e7d46
commit 1e4846d443
7 changed files with 21 additions and 25 deletions

View File

@@ -97,7 +97,7 @@ export default class StandardAnnotationQueryEditor extends PureComponent<Props,
if (running || response?.panelData?.state === LoadingState.Loading || !response) {
text = 'loading...';
} else {
const { events, panelData, frame } = response;
const { events, panelData } = response;
if (panelData?.error) {
rowStyle = 'alert-error';
@@ -108,6 +108,8 @@ export default class StandardAnnotationQueryEditor extends PureComponent<Props,
icon = 'exclamation-triangle';
text = 'No events found';
} else {
const frame = panelData?.series[0];
text = `${events.length} events (from ${frame?.fields.length} fields)`;
}
}