From acc7f39e2e9e25381837b7161f1217787c2fa0ba Mon Sep 17 00:00:00 2001 From: Ezequiel Victorero Date: Thu, 28 Aug 2025 12:44:35 -0300 Subject: [PATCH] Saved Queries: Use new queries API (#110185) --- public/app/features/explore/spec/helper/mocks.ts | 2 +- .../spec/helper/testdata/testQueryList.ts | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/app/features/explore/spec/helper/mocks.ts b/public/app/features/explore/spec/helper/mocks.ts index fddd823240a..36593eb894b 100644 --- a/public/app/features/explore/spec/helper/mocks.ts +++ b/public/app/features/explore/spec/helper/mocks.ts @@ -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: { diff --git a/public/app/features/explore/spec/helper/testdata/testQueryList.ts b/public/app/features/explore/spec/helper/testdata/testQueryList.ts index 5d78a28215d..0c9ee0b7dd2 100644 --- a/public/app/features/explore/spec/helper/testdata/testQueryList.ts +++ b/public/app/features/explore/spec/helper/testdata/testQueryList.ts @@ -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',