mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 12:32:11 +08:00

* add history links for monaco completion provider folder * add history links for monaco query field folder * add history links for components folder * add history links for configuration folder * add history links for dashboard json folder * add history links for gcopypaste folder * add history link for variableMigration * add history link for querybuilder/components/metrics-modal folder * add history link for querybuilder/components/promqail folder * add history links for querybuilder/components folder * add history links for querybuilder/hooks folder * add history links for querybuilder/shared folder * add history links for querybuilder folder * add history links for querycache folder * add history links for src folder * use frontend package and custom auth in module.ts * remove files and fix import issues * remove usePrometheusFrontendPackage * remove extra files * update betterer * remove extra files after rebase * fix betterer for rebase * fix e2e flakiness
23 lines
955 B
TypeScript
23 lines
955 B
TypeScript
// Core Grafana history https://github.com/grafana/grafana/blob/v11.0.0-preview/public/app/plugins/datasource/prometheus/components/monaco-query-field/MonacoQueryFieldProps.ts
|
|
import { HistoryItem } from '@grafana/data';
|
|
|
|
import { PrometheusDatasource } from '../../datasource';
|
|
import type PromQlLanguageProvider from '../../language_provider';
|
|
import { PromQuery } from '../../types';
|
|
|
|
// we need to store this in a separate file,
|
|
// because we have an async-wrapper around,
|
|
// the react-component, and it needs the same
|
|
// props as the sync-component.
|
|
export type Props = {
|
|
initialValue: string;
|
|
languageProvider: PromQlLanguageProvider;
|
|
history: Array<HistoryItem<PromQuery>>;
|
|
placeholder: string;
|
|
onRunQuery: (value: string) => void;
|
|
onBlur: (value: string) => void;
|
|
// onChange will never initiate a query, it just denotes that a query value has been changed
|
|
onChange: (value: string) => void;
|
|
datasource: PrometheusDatasource;
|
|
};
|