mirror of
https://github.com/grafana/grafana.git
synced 2025-09-25 17:44:33 +08:00
CloudMonitoring: Fix fastpass issues (#44277)
This commit is contained in:

committed by
GitHub

parent
de2c5783fa
commit
af0ece12f9
@ -1,13 +1,14 @@
|
||||
import React, { PureComponent } from 'react';
|
||||
import { css } from '@emotion/css';
|
||||
import { QueryEditorProps, toOption } from '@grafana/data';
|
||||
import { Button, Select } from '@grafana/ui';
|
||||
import { MetricQueryEditor, SLOQueryEditor, QueryEditorRow } from './';
|
||||
import { CloudMonitoringQuery, MetricQuery, QueryType, SLOQuery, EditorMode } from '../types';
|
||||
import { SELECT_WIDTH, QUERY_TYPES } from '../constants';
|
||||
import React, { PureComponent } from 'react';
|
||||
|
||||
import { QUERY_TYPES, SELECT_WIDTH } from '../constants';
|
||||
import CloudMonitoringDatasource from '../datasource';
|
||||
import { CloudMonitoringQuery, EditorMode, MetricQuery, QueryType, SLOQuery } from '../types';
|
||||
import { MetricQueryEditor, QueryEditorRow, SLOQueryEditor } from './';
|
||||
import { defaultQuery } from './MetricQueryEditor';
|
||||
import { defaultQuery as defaultSLOQuery } from './SLO/SLOQueryEditor';
|
||||
import CloudMonitoringDatasource from '../datasource';
|
||||
|
||||
export type Props = QueryEditorProps<CloudMonitoringDatasource, CloudMonitoringQuery>;
|
||||
|
||||
@ -73,6 +74,7 @@ export class QueryEditor extends PureComponent<Props> {
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
htmlFor={`${query.refId}-query-type`}
|
||||
>
|
||||
<Select
|
||||
menuShouldPortal
|
||||
@ -83,6 +85,7 @@ export class QueryEditor extends PureComponent<Props> {
|
||||
onChange({ ...query, sloQuery, queryType: value! });
|
||||
onRunQuery();
|
||||
}}
|
||||
inputId={`${query.refId}-query-type`}
|
||||
/>
|
||||
</QueryEditorRow>
|
||||
|
||||
@ -102,6 +105,7 @@ export class QueryEditor extends PureComponent<Props> {
|
||||
|
||||
{queryType === QueryType.SLO && (
|
||||
<SLOQueryEditor
|
||||
refId={query.refId}
|
||||
variableOptionGroup={variableOptionGroup}
|
||||
customMetaData={customMetaData}
|
||||
onChange={(query: SLOQuery) => this.onQueryChange('sloQuery', query)}
|
||||
|
Reference in New Issue
Block a user