Explore: Replaced deprecated 'query' property with 'queries' in splitOpen (#71484)

* Replace deprecated 'query' field with 'queries'

* Replace another one

* Queries is an array
This commit is contained in:
Haris Rozajac
2023-07-14 07:44:11 -06:00
committed by GitHub
parent dc4cedd298
commit d1ae4e2786
4 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ export function mapInternalLinkToExplore(options: LinkToExploreOptions): LinkMod
? () => {
onClickFn({
datasourceUid: internalLink.datasourceUid,
query: interpolatedQuery,
queries: [interpolatedQuery],
panelsState: interpolatedPanelsState,
range,
});
@@ -178,7 +178,7 @@ describe('ExplorePage', () => {
});
act(() => {
store.dispatch(mainState.splitOpen({ datasourceUid: 'elastic', query: { expr: 'error', refId: 'A' } }));
store.dispatch(mainState.splitOpen({ datasourceUid: 'elastic', queries: [{ expr: 'error', refId: 'A' }] }));
});
// Editor renders the new query
@@ -304,10 +304,12 @@ function useFocusSpanLink(options: {
? () =>
options.splitOpenFn({
datasourceUid: options.datasource?.uid!,
query: {
...query!,
query: traceId,
},
queries: [
{
...query!,
query: traceId,
},
],
panelsState: {
trace: {
spanId,
@@ -111,7 +111,7 @@ describe('explore links utils', () => {
expect(splitfn).toBeCalledWith({
datasourceUid: 'uid_1',
query: { query: 'query_1' },
queries: [{ query: 'query_1' }],
range,
panelsState: {
trace: {