grafana/public/app/plugins/datasource/loki/configuration/MaxLinesField.tsx
Torkel Ödegaard 1d689888b0
Prettier: Upgrade to 2 (#30387)
* Updated package json but not updated source files

* Update eslint plugin

* updated files
2021-01-20 07:59:48 +01:00

37 lines
998 B
TypeScript

import React from 'react';
import { LegacyForms } from '@grafana/ui';
const { FormField } = LegacyForms;
type Props = {
value: string;
onChange: (value: string) => void;
};
export const MaxLinesField = (props: Props) => {
const { value, onChange } = props;
return (
<FormField
label="Maximum lines"
labelWidth={11}
inputWidth={20}
inputEl={
<input
type="number"
className="gf-form-input width-8 gf-form-input--has-help-icon"
value={value}
onChange={(event) => onChange(event.currentTarget.value)}
spellCheck={false}
placeholder="1000"
/>
}
tooltip={
<>
Loki queries must contain a limit of the maximum number of lines returned (default: 1000). Increase this limit
to have a bigger result set for ad-hoc analysis. Decrease this limit if your browser becomes sluggish when
displaying the log results.
</>
}
/>
);
};