mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore/Prometheus: Update default query type option to "Both" (#28935)
* Update default option to 'both' * Update public/app/plugins/datasource/prometheus/components/PromExploreExtraField.tsx Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com> * Fix running of queries for both * Update wording Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
This commit is contained in:
@@ -57,7 +57,8 @@ export const PromExploreQueryEditor: FC<Props> = (props: Props) => {
|
||||
data={data}
|
||||
ExtraFieldElement={
|
||||
<PromExploreExtraField
|
||||
queryType={query.range && query.instant ? 'both' : query.instant ? 'instant' : 'range'}
|
||||
// Select "both" as default option when Explore is opened. In legacy requests, range and instant can be undefined. In this case, we want to run queries with "both".
|
||||
queryType={query.range === query.instant ? 'both' : query.instant ? 'instant' : 'range'}
|
||||
stepValue={query.interval || ''}
|
||||
onQueryTypeChange={onQueryTypeChange}
|
||||
onStepChange={onStepChange}
|
||||
|
||||
Reference in New Issue
Block a user