mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06:00
refactor: add return value for logsSample (#65357)
* refactor: add return value for logsSample * refactor: modify test for new use case
This commit is contained in:
parent
f68fd83951
commit
2c978fb0f0
@ -197,15 +197,9 @@ describe('SupplementaryQueries utils', function () {
|
||||
]);
|
||||
});
|
||||
});
|
||||
it('Does not use a fallback for logs sample', async () => {
|
||||
it('Returns undefined for logs sample', async () => {
|
||||
const testProvider = await setup('no-data-providers', SupplementaryQueryType.LogsSample);
|
||||
await expect(testProvider).toEmitValuesWith((received) => {
|
||||
expect(received).toMatchObject([
|
||||
{
|
||||
state: LoadingState.NotStarted,
|
||||
},
|
||||
]);
|
||||
});
|
||||
await expect(testProvider).toBe(undefined);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -213,6 +213,8 @@ export const getSupplementaryQueryProvider = (
|
||||
),
|
||||
distinct()
|
||||
);
|
||||
} else if (type === SupplementaryQueryType.LogsSample) {
|
||||
return undefined;
|
||||
} else {
|
||||
// Create a fallback to results based logs volume
|
||||
return getSupplementaryQueryFallback(type, explorePanelData, request.targets, datasourceInstance.name);
|
||||
|
Loading…
Reference in New Issue
Block a user