| 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 IpaTextArea from "src/components/Form/IpaTextArea"; |
| 8 |
import IpaTextInput from "src/components/Form/IpaTextInput"; |
| 9 |
|
| 10 |
interface PropsToSELinuxOptions { |
| 11 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 12 |
ipaObject: Record<string, any>; |
| 13 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 14 |
recordOnChange: (ipaObject: Record<string, any>) => void; |
| 15 |
metadata: Metadata; |
| 16 |
} |
| 17 |
|
| 18 |
const ConfigSELinuxOptions = (props: PropsToSELinuxOptions) => { |
| 19 |
return ( |
| 20 |
<Form className="pf-v6-u-mb-lg pf-v6-u-mt-lg" isHorizontal> |
| 21 |
<FormGroup |
| 22 |
label="SELinux user map order" |
| 23 |
fieldId="ipaselinuxusermaporder" |
| 24 |
isRequired |
| 25 |
> |
| 26 |
<IpaTextArea |
| 27 |
dataCy="configuration-textbox-ipaselinuxusermaporder" |
| 28 |
name={"ipaselinuxusermaporder"} |
| 29 |
ariaLabel={"SELinux user map order"} |
| 30 |
ipaObject={props.ipaObject} |
| 31 |
onChange={props.recordOnChange} |
| 32 |
objectName="config" |
| 33 |
metadata={props.metadata} |
| 34 |
/> |
| 35 |
</FormGroup> |
| 36 |
<FormGroup |
| 37 |
label="Default SELinux user" |
| 38 |
fieldId="ipaselinuxusermapdefault" |
| 39 |
> |
| 40 |
<IpaTextInput |
| 41 |
dataCy="configuration-textbox-ipaselinuxusermapdefault" |
| 42 |
name={"ipaselinuxusermapdefault"} |
| 43 |
ariaLabel={"Default SELinux user"} |
| 44 |
ipaObject={props.ipaObject} |
| 45 |
onChange={props.recordOnChange} |
| 46 |
objectName="config" |
| 47 |
metadata={props.metadata} |
| 48 |
/> |
| 49 |
</FormGroup> |
| 50 |
</Form> |
| 51 |
); |
| 52 |
}; |
| 53 |
|
| 54 |
export default ConfigSELinuxOptions; |