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/loki/configuration/MaxLinesField.tsx

37 lines
999 B

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.
</>
}
/>
);
};