| 1 |
import React from "react"; |
| 2 |
// PatternFly |
| 3 |
import { Form, FormGroup } from "@patternfly/react-core"; |
| 4 |
// Data types |
| 5 |
import { Metadata } from "src/utils/datatypes/globalDataTypes"; |
| 6 |
// Form |
| 7 |
import IpaNumberInput from "src/components/Form/IpaNumberInput"; |
| 8 |
|
| 9 |
interface PropsToSearchOPtions { |
| 10 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 11 |
ipaObject: Record<string, any>; |
| 12 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 13 |
recordOnChange: (ipaObject: Record<string, any>) => void; |
| 14 |
metadata: Metadata; |
| 15 |
} |
| 16 |
|
| 17 |
const ConfigSearchOptions = (props: PropsToSearchOPtions) => { |
| 18 |
return ( |
| 19 |
<Form className="pf-v6-u-mb-lg pf-v6-u-mt-lg" isHorizontal> |
| 20 |
<FormGroup label="Search size limit" fieldId="ipasearchrecordslimit"> |
| 21 |
<IpaNumberInput |
| 22 |
dataCy="configuration-textbox-ipasearchrecordslimit" |
| 23 |
id="ipasearchrecordslimit" |
| 24 |
name="ipasearchrecordslimit" |
| 25 |
aria-label="search size limit" |
| 26 |
ipaObject={props.ipaObject} |
| 27 |
onChange={props.recordOnChange} |
| 28 |
objectName="config" |
| 29 |
metadata={props.metadata} |
| 30 |
numCharsShown={6} |
| 31 |
minValue={-1} |
| 32 |
maxValue={2147483647} |
| 33 |
/> |
| 34 |
</FormGroup> |
| 35 |
<FormGroup label="Search time limit" fieldId="ipasearchtimelimit"> |
| 36 |
<IpaNumberInput |
| 37 |
dataCy="configuration-textbox-ipasearchtimelimit" |
| 38 |
id="ipasearchtimelimit" |
| 39 |
name="ipasearchtimelimit" |
| 40 |
aria-label="search time limit" |
| 41 |
ipaObject={props.ipaObject} |
| 42 |
onChange={props.recordOnChange} |
| 43 |
objectName="config" |
| 44 |
metadata={props.metadata} |
| 45 |
numCharsShown={6} |
| 46 |
minValue={-1} |
| 47 |
maxValue={2147483647} |
| 48 |
/> |
| 49 |
</FormGroup> |
| 50 |
</Form> |
| 51 |
); |
| 52 |
}; |
| 53 |
|
| 54 |
export default ConfigSearchOptions; |