mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
revert change, and enforce table format when in explore (#50616)
This commit is contained in:
parent
b0ae4d460e
commit
913ac82108
@ -20,6 +20,7 @@ import {
|
|||||||
DataQueryRequest,
|
DataQueryRequest,
|
||||||
PreferredVisualisationType,
|
PreferredVisualisationType,
|
||||||
DataFrameType,
|
DataFrameType,
|
||||||
|
CoreApp,
|
||||||
} from '@grafana/data';
|
} from '@grafana/data';
|
||||||
import { FetchResponse, getDataSourceSrv, getTemplateSrv } from '@grafana/runtime';
|
import { FetchResponse, getDataSourceSrv, getTemplateSrv } from '@grafana/runtime';
|
||||||
|
|
||||||
@ -47,7 +48,10 @@ interface TimeAndValue {
|
|||||||
|
|
||||||
const isTableResult = (dataFrame: DataFrame, options: DataQueryRequest<PromQuery>): boolean => {
|
const isTableResult = (dataFrame: DataFrame, options: DataQueryRequest<PromQuery>): boolean => {
|
||||||
// We want to process vector and scalar results in Explore as table
|
// We want to process vector and scalar results in Explore as table
|
||||||
if (dataFrame.meta?.custom?.resultType === 'vector' || dataFrame.meta?.custom?.resultType === 'scalar') {
|
if (
|
||||||
|
options.app === CoreApp.Explore &&
|
||||||
|
(dataFrame.meta?.custom?.resultType === 'vector' || dataFrame.meta?.custom?.resultType === 'scalar')
|
||||||
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user