mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
prometheus: monaco: allow listing label names + values without a metric (#41233)
* prometheus: monaco: allow listing label names + values without a metric * removed comment
This commit is contained in:
@@ -138,7 +138,11 @@ const MonacoQueryField = (props: Props) => {
|
||||
return Promise.resolve(result);
|
||||
};
|
||||
|
||||
const dataProvider = { getSeries, getHistory, getAllMetricNames };
|
||||
const getAllLabelNames = () => Promise.resolve(lpRef.current.getLabelKeys());
|
||||
|
||||
const getLabelValues = (labelName: string) => lpRef.current.getLabelValues(labelName);
|
||||
|
||||
const dataProvider = { getSeries, getHistory, getAllMetricNames, getAllLabelNames, getLabelValues };
|
||||
const completionProvider = getCompletionProvider(monaco, dataProvider);
|
||||
|
||||
// completion-providers in monaco are not registered directly to editor-instances,
|
||||
|
||||
Reference in New Issue
Block a user