mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
Default to flamegraph (#56733)
This commit is contained in:
parent
7c10082c57
commit
78061260fb
@ -114,6 +114,7 @@ describe('addPanelToDashboard', () => {
|
||||
${'logsFrames'} | ${'logs'}
|
||||
${'graphFrames'} | ${'timeseries'}
|
||||
${'nodeGraphFrames'} | ${'nodeGraph'}
|
||||
${'flameGraphFrames'} | ${'flamegraph'}
|
||||
${'traceFrames'} | ${'traces'}
|
||||
`(
|
||||
'Sets visualization to $expectedPanel if there are $frameType frames',
|
||||
|
@ -63,8 +63,10 @@ const hasRefId = (refId: DataFrame['refId']) => (frame: DataFrame) => frame.refI
|
||||
|
||||
function getPanelType(queries: DataQuery[], queryResponse: ExplorePanelData) {
|
||||
for (const { refId } of queries.filter(isVisible)) {
|
||||
// traceview is not supported in dashboards, skipping it for now.
|
||||
const hasQueryRefId = hasRefId(refId);
|
||||
if (queryResponse.flameGraphFrames.some(hasQueryRefId)) {
|
||||
return 'flamegraph';
|
||||
}
|
||||
if (queryResponse.graphFrames.some(hasQueryRefId)) {
|
||||
return 'timeseries';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user