grafana/public/app/features/query-library/index.ts
Piotr Jamróz 84ef99c1dc
Explore: Add a query template to query library from query history (#88047)
* Add basic button for adding a query template

* Add hook to create a template

* Handle notifications

* Add tags to invalidate cache

* Generate translations

* Updates types

* Add tests

* Simplify code

* Add a better default title
2024-05-23 11:38:17 +03:00

24 lines
611 B
TypeScript

/**
* This is a temporary place for Query Library API and data types.
* To be exposed via grafana-runtime/data in the future.
*
* Query Library is an experimental feature, the API and components are subject to change
*
* @alpha
*/
import { config } from '@grafana/runtime';
import { queryLibraryApi } from './api/factory';
import { mockData } from './api/mocks';
export const { useAllQueryTemplatesQuery, useAddQueryTemplateMutation } = queryLibraryApi;
export function isQueryLibraryEnabled() {
return config.featureToggles.queryLibrary;
}
export const QueryLibraryMocks = {
data: mockData,
};