import React, { useEffect, useState } from 'react'; import { QueryEditorProps, SelectableValue } from '@grafana/data'; import { InlineField, InlineFieldRow, LoadingPlaceholder, Select } from '@grafana/ui'; import { ProfileTypesCascader, useProfileTypes } from './QueryEditor/ProfileTypesCascader'; import { PhlareDataSource } from './datasource'; import { Query, VariableQuery } from './types'; export function VariableQueryEditor(props: QueryEditorProps) { return ( <> The Prometheus data source plugin provides the following query types for template variables } > props.onChange(option.value)} value={props.value} /> ); } function ProfileTypeRow(props: { datasource: PhlareDataSource; onChange: (val: string) => void; initialValue?: string; }) { const profileTypes = useProfileTypes(props.datasource); const label = props.datasource.backendType === 'phlare' ? 'Profile type' : 'Application'; return ( Select {props.datasource.backendType === 'phlare' ? 'profile type' : 'application'} for which to retrieve available labels } > {profileTypes ? ( ) : ( )} ); }