import React from 'react'; import { FieldSet, InlineField } from '@grafana/ui'; import { NumberInput } from 'app/core/components/OptionsUI/NumberInput'; import { SQLConnectionLimits } from '../../types'; interface Props { onPropertyChanged: (property: keyof T, value?: number) => void; labelWidth: number; jsonData: SQLConnectionLimits; } export const ConnectionLimits = (props: Props) => { const { onPropertyChanged, labelWidth, jsonData } = props; const onJSONDataNumberChanged = (property: keyof SQLConnectionLimits) => { return (number?: number) => { if (onPropertyChanged) { onPropertyChanged(property, number); } }; }; return (
The maximum number of open connections to the database.If Max idle connections is greater than 0 and the Max open connections is less than Max idle connections, then Max idle connections will be reduced to match the Max open connections limit. If set to 0, there is no limit on the number of open connections. } labelWidth={labelWidth} label="Max open" > The maximum number of connections in the idle connection pool.If Max open connections is greater than 0 but less than the Max idle connections, then the Max idle connections will be reduced to match the Max open connections limit. If set to 0, no idle connections are retained. } labelWidth={labelWidth} label="Max idle" >
); };