mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 01:23:32 -06:00
Prometheus: report metrics browser toggle click interaction (#54546)
* report metrics browser toggle click interaction Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
This commit is contained in:
parent
dd38ff7cc8
commit
d19a125ada
@ -2,15 +2,16 @@ import { LanguageMap, languages as prismLanguages } from 'prismjs';
|
||||
import React, { ReactNode } from 'react';
|
||||
import { Plugin } from 'slate';
|
||||
|
||||
import { QueryEditorProps, QueryHint, isDataFrame, toLegacyResponseData, TimeRange, CoreApp } from '@grafana/data';
|
||||
import { CoreApp, isDataFrame, QueryEditorProps, QueryHint, TimeRange, toLegacyResponseData } from '@grafana/data';
|
||||
import { reportInteraction } from '@grafana/runtime/src';
|
||||
import {
|
||||
SlatePrism,
|
||||
TypeaheadInput,
|
||||
TypeaheadOutput,
|
||||
BracesPlugin,
|
||||
DOMUtil,
|
||||
SuggestionsState,
|
||||
Icon,
|
||||
SlatePrism,
|
||||
SuggestionsState,
|
||||
TypeaheadInput,
|
||||
TypeaheadOutput,
|
||||
} from '@grafana/ui';
|
||||
import { LocalStorageValueProvider } from 'app/core/components/LocalStorageValueProvider';
|
||||
import {
|
||||
@ -21,7 +22,7 @@ import {
|
||||
|
||||
import { PrometheusDatasource } from '../datasource';
|
||||
import { roundMsToMin } from '../language_utils';
|
||||
import { PromQuery, PromOptions } from '../types';
|
||||
import { PromOptions, PromQuery } from '../types';
|
||||
|
||||
import { PrometheusMetricsBrowser } from './PrometheusMetricsBrowser';
|
||||
import { MonacoQueryFieldWrapper } from './monaco-query-field/MonacoQueryFieldWrapper';
|
||||
@ -219,6 +220,11 @@ class PromQueryField extends React.PureComponent<PromQueryFieldProps, PromQueryF
|
||||
|
||||
onClickChooserButton = () => {
|
||||
this.setState((state) => ({ labelBrowserVisible: !state.labelBrowserVisible }));
|
||||
|
||||
reportInteraction('user_grafana_prometheus_metrics_browser_clicked', {
|
||||
editorMode: this.state.labelBrowserVisible ? 'metricViewClosed' : 'metricViewOpen',
|
||||
app: this.props?.app ?? '',
|
||||
});
|
||||
};
|
||||
|
||||
onClickHintFix = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user