Saved Queries: Use new queries API (#110185)

This commit is contained in:
Ezequiel Victorero
2025-08-28 12:44:35 -03:00
committed by GitHub
parent 9cf561f338
commit acc7f39e2e
2 changed files with 9 additions and 9 deletions
@@ -7,7 +7,7 @@ import { getTestQueryList } from './testdata/testQueryList';
// Enterprise and so we cannot import it here.
// We have some tests for testing QL inside Explore. The whole Explore setup is in OSS, and it needs these mocks but the
// test itself is in Enterprise. Ideally we would inject the mocks in the tests somehow.
export const BASE_URL = getAPIBaseURL('querylibrary.grafana.app', 'v0alpha1');
export const BASE_URL = getAPIBaseURL('queries.grafana.app', 'v1beta1');
export const mockData = {
all: {
@@ -1,14 +1,14 @@
export const getTestQueryList = () => ({
kind: 'QueryTemplateList',
apiVersion: 'querylibrary.grafana.app/v0alpha1',
kind: 'QueryList',
apiVersion: 'queries.grafana.app/v1beta1',
metadata: {
resourceVersion: '1783293408052252672',
remainingItemCount: 0,
},
items: [
{
kind: 'QueryTemplate',
apiVersion: 'querylibrary.grafana.app/v0alpha1',
kind: 'Query',
apiVersion: 'queries.grafana.app/v1beta1',
metadata: {
name: 'AElastic2nkf9',
generateName: 'AElastic',
@@ -54,8 +54,8 @@ export const getTestQueryList = () => ({
},
},
{
kind: 'QueryTemplate',
apiVersion: 'querylibrary.grafana.app/v0alpha1',
kind: 'Query',
apiVersion: 'queries.grafana.app/v1beta1',
metadata: {
name: 'ALoki296ta',
generateName: 'ALoki',
@@ -121,8 +121,8 @@ export const getTestQueryList = () => ({
},
},
{
kind: 'QueryTemplate',
apiVersion: 'querylibrary.grafana.app/v0alpha1',
kind: 'Query',
apiVersion: 'queries.grafana.app/v1beta1',
metadata: {
name: 'ALoki296tj',
generateName: 'ALoki',