mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Performance: Standardize lodash imports to use destructured members
Changes lodash imports of the form `import x from 'lodash/x'` to
`import { x } from 'lodash'` to reduce bundle size.
* Remove unnecessary _ import from Graph component
* Enforce lodash import style
* Fix remaining lodash imports
30 lines
767 B
TypeScript
30 lines
767 B
TypeScript
// Libraries
|
|
import React, { memo } from 'react';
|
|
|
|
// Types
|
|
import { ExploreQueryFieldProps } from '@grafana/data';
|
|
import { LokiDatasource } from '../datasource';
|
|
import { LokiQuery, LokiOptions } from '../types';
|
|
import { LokiQueryField } from './LokiQueryField';
|
|
|
|
type Props = ExploreQueryFieldProps<LokiDatasource, LokiQuery, LokiOptions>;
|
|
|
|
export function LokiExploreQueryEditor(props: Props) {
|
|
const { range, query, data, datasource, history, onChange, onRunQuery } = props;
|
|
|
|
return (
|
|
<LokiQueryField
|
|
datasource={datasource}
|
|
query={query}
|
|
onChange={onChange}
|
|
onBlur={() => {}}
|
|
onRunQuery={onRunQuery}
|
|
history={history}
|
|
data={data}
|
|
range={range}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export default memo(LokiExploreQueryEditor);
|