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:
@@ -56,7 +56,7 @@ export function mapInternalLinkToExplore(options: LinkToExploreOptions): LinkMod
|
|||||||
? () => {
|
? () => {
|
||||||
onClickFn({
|
onClickFn({
|
||||||
datasourceUid: internalLink.datasourceUid,
|
datasourceUid: internalLink.datasourceUid,
|
||||||
query: interpolatedQuery,
|
queries: [interpolatedQuery],
|
||||||
panelsState: interpolatedPanelsState,
|
panelsState: interpolatedPanelsState,
|
||||||
range,
|
range,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ describe('ExplorePage', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
act(() => {
|
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
|
// Editor renders the new query
|
||||||
|
|||||||
@@ -304,10 +304,12 @@ function useFocusSpanLink(options: {
|
|||||||
? () =>
|
? () =>
|
||||||
options.splitOpenFn({
|
options.splitOpenFn({
|
||||||
datasourceUid: options.datasource?.uid!,
|
datasourceUid: options.datasource?.uid!,
|
||||||
query: {
|
queries: [
|
||||||
...query!,
|
{
|
||||||
query: traceId,
|
...query!,
|
||||||
},
|
query: traceId,
|
||||||
|
},
|
||||||
|
],
|
||||||
panelsState: {
|
panelsState: {
|
||||||
trace: {
|
trace: {
|
||||||
spanId,
|
spanId,
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ describe('explore links utils', () => {
|
|||||||
|
|
||||||
expect(splitfn).toBeCalledWith({
|
expect(splitfn).toBeCalledWith({
|
||||||
datasourceUid: 'uid_1',
|
datasourceUid: 'uid_1',
|
||||||
query: { query: 'query_1' },
|
queries: [{ query: 'query_1' }],
|
||||||
range,
|
range,
|
||||||
panelsState: {
|
panelsState: {
|
||||||
trace: {
|
trace: {
|
||||||
|
|||||||
Reference in New Issue
Block a user