mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
* Add tempo datasource, mostly copy of jaeger datasource code * Add label to input field * Add logo * Remove access option from configuration * Add white space to field label * Add documentation * Fix link in docs * Update public/app/plugins/datasource/tempo/ConfigEditor.tsx Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com> * Update public/app/plugins/datasource/tempo/QueryField.tsx Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com> * Add data source to the docs menu * Add simple implementation for testDatasource * Wording updates to the docs. Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
36 lines
958 B
TypeScript
36 lines
958 B
TypeScript
import React from 'react';
|
|
import { TempoDatasource, TempoQuery } from './datasource';
|
|
|
|
import { ExploreQueryFieldProps } from '@grafana/data';
|
|
import { LegacyForms } from '@grafana/ui';
|
|
|
|
type Props = ExploreQueryFieldProps<TempoDatasource, TempoQuery>;
|
|
export class TempoQueryField extends React.PureComponent<Props> {
|
|
render() {
|
|
const { query, onChange } = this.props;
|
|
|
|
return (
|
|
<LegacyForms.FormField
|
|
label="Trace ID"
|
|
labelWidth={4}
|
|
inputEl={
|
|
<div className="slate-query-field__wrapper">
|
|
<div className="slate-query-field">
|
|
<input
|
|
style={{ width: '100%' }}
|
|
value={query.query || ''}
|
|
onChange={e =>
|
|
onChange({
|
|
...query,
|
|
query: e.currentTarget.value,
|
|
})
|
|
}
|
|
/>
|
|
</div>
|
|
</div>
|
|
}
|
|
/>
|
|
);
|
|
}
|
|
}
|