mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* 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
24 lines
611 B
TypeScript
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,
|
|
};
|