Explore: show scalar data result in a table instead of graph (#44362) (#44366)

Signed-off-by: tharun <rajendrantharun@live.com>
(cherry picked from commit 732c2ebb37)

Co-authored-by: Tharun Rajendran <rajendrantharun@live.com>
This commit is contained in:
Grot (@grafanabot)
2022-01-24 10:37:24 +01:00
committed by GitHub
co-authored by Tharun Rajendran
parent f5abd72785
commit eccd87a564
@@ -43,8 +43,11 @@ interface TimeAndValue {
}
const isTableResult = (dataFrame: DataFrame, options: DataQueryRequest<PromQuery>): boolean => {
// We want to process instant results in Explore as table
if ((options.app === CoreApp.Explore && dataFrame.meta?.custom?.resultType) === 'vector') {
// We want to process vector and scalar results in Explore as table
if (
options.app === CoreApp.Explore &&
(dataFrame.meta?.custom?.resultType === 'vector' || dataFrame.meta?.custom?.resultType === 'scalar')
) {
return true;
}