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

committed by
GitHub

parent
de2c5783fa
commit
af0ece12f9
@ -1,17 +1,19 @@
|
||||
import React, { FC, useMemo } from 'react';
|
||||
import { SelectableValue } from '@grafana/data';
|
||||
import { Select } from '@grafana/ui';
|
||||
import { MetricQuery } from '../types';
|
||||
import { getAlignmentPickerData } from '../functions';
|
||||
import React, { FC, useMemo } from 'react';
|
||||
|
||||
import { SELECT_WIDTH } from '../constants';
|
||||
import { getAlignmentPickerData } from '../functions';
|
||||
import { MetricQuery } from '../types';
|
||||
|
||||
export interface Props {
|
||||
inputId: string;
|
||||
onChange: (query: MetricQuery) => void;
|
||||
query: MetricQuery;
|
||||
templateVariableOptions: Array<SelectableValue<string>>;
|
||||
}
|
||||
|
||||
export const AlignmentFunction: FC<Props> = ({ query, templateVariableOptions, onChange }) => {
|
||||
export const AlignmentFunction: FC<Props> = ({ inputId, query, templateVariableOptions, onChange }) => {
|
||||
const { valueType, metricKind, perSeriesAligner: psa, preprocessor } = query;
|
||||
const { perSeriesAligner, alignOptions } = useMemo(
|
||||
() => getAlignmentPickerData(valueType, metricKind, psa, preprocessor),
|
||||
@ -36,6 +38,7 @@ export const AlignmentFunction: FC<Props> = ({ query, templateVariableOptions, o
|
||||
},
|
||||
]}
|
||||
placeholder="Select Alignment"
|
||||
inputId={inputId}
|
||||
></Select>
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user