The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/public/app/plugins/datasource/stackdriver/components/Alignments.tsx

37 lines
1.0 KiB

import React, { SFC } from 'react';
import _ from 'lodash';
import { StackdriverPicker } from './StackdriverPicker';
export interface Props {
onChange: (metricDescriptor) => void;
templateSrv: any;
alignOptions: any[];
metricDescriptor: {
valueType: string;
metricKind: string;
};
perSeriesAligner: string;
}
export const Alignments: SFC<Props> = ({ perSeriesAligner, templateSrv, onChange, alignOptions }) => {
return (
<React.Fragment>
<div className="gf-form-group">
<div className="gf-form offset-width-9">
<label className="gf-form-label query-keyword width-15">Aligner</label>
<StackdriverPicker
onChange={value => onChange(value)}
selected={perSeriesAligner}
templateVariables={templateSrv.variables}
options={alignOptions}
searchable={true}
placeholder="Select Alignment"
className="width-15"
groupName="Alignment Options"
/>
</div>
</div>
</React.Fragment>
);
};