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

Signed-off-by: tharun <rajendrantharun@live.com>
This commit is contained in:
Tharun Rajendran 2022-01-24 14:52:06 +05:30 committed by GitHub
parent 641e34e341
commit 732c2ebb37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,8 +44,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;
}