mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
* Updated package json but not updated source files * Update eslint plugin * updated files
37 lines
998 B
TypeScript
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.
|
|
</>
|
|
}
|
|
/>
|
|
);
|
|
};
|