From a6c5c62ec52efc1c05b1bce61ac61673da261052 Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Tue, 9 Jan 2024 16:03:54 -0500 Subject: [PATCH] Issue 239 - Implement host text input settings Implement the Text inputs on the host settings page. Had to implement the entire CI layer, but it will make the other components easier to add. Signed-off-by: Mark Reynolds --- src/components/Form/IpaTextArea.tsx | 27 ++ .../HostsSections/AllowedCreateKeytab.tsx | 14 +- .../HostsSections/AllowedRetrieveKeytab.tsx | 14 +- src/components/HostsSections/HostSettings.tsx | 255 ++++++++---------- .../ManagedBy/ManagedByAddModal.tsx | 2 +- .../tables/DeletedElementsTable.tsx | 4 +- .../RetrieveKeytabHostsTable.tsx | 2 +- src/hooks/useHostSettingsData.tsx | 118 ++++++++ src/pages/Hosts/HostsManagedBy.tsx | 6 +- src/pages/Hosts/HostsSettings.tsx | 90 ++++++- src/pages/Hosts/HostsTable.tsx | 6 +- src/pages/Hosts/HostsTabs.tsx | 30 ++- src/pages/Services/ServicesManagedBy.tsx | 4 +- src/services/rpc.ts | 82 +++++- src/store/Identity/hosts-slice.ts | 8 +- src/utils/datatypes/globalDataTypes.ts | 12 +- src/utils/hostUtils.tsx | 128 +++++++++ 17 files changed, 613 insertions(+), 189 deletions(-) create mode 100644 src/components/Form/IpaTextArea.tsx create mode 100644 src/hooks/useHostSettingsData.tsx create mode 100644 src/utils/hostUtils.tsx diff --git a/src/components/Form/IpaTextArea.tsx b/src/components/Form/IpaTextArea.tsx new file mode 100644 index 00000000..deef4f12 --- /dev/null +++ b/src/components/Form/IpaTextArea.tsx @@ -0,0 +1,27 @@ +import React from "react"; +// PatternFly +import { TextArea } from "@patternfly/react-core"; +import { + IPAParamDefinition, + getParamProperties, + convertToString, +} from "src/utils/ipaObjectUtils"; + +const IpaTextArea = (props: IPAParamDefinition) => { + const { required, readOnly, value, onChange } = getParamProperties(props); + + return ( +