+ {logEntries.map((entry, index) => {entry}
)}
+
+
+
+ );
+}
+
+const validationSchema = Yup.object({
+ logs: Yup.object({
+ folder: Yup.string().required("Required"),
+ "max-history-days": Yup.number().required("Required"),
+ level: Yup.string().required("Required")
+ })
+});
+
+export const LogManagement = withConfigPage(LogManagementLayout, "Logging", "logs", validationSchema);
\ No newline at end of file
diff --git a/src/main/frontend/components/administration/withConfigPage.tsx b/src/main/frontend/components/administration/withConfigPage.tsx
index 7b219b8..a879df4 100644
--- a/src/main/frontend/components/administration/withConfigPage.tsx
+++ b/src/main/frontend/components/administration/withConfigPage.tsx
@@ -16,11 +16,13 @@ export default function withConfigPage(WrappedComponent: React.ComponentType([]);
+ const [nestedConfigDtos, setNestedConfigDtos] = useState({});
const [saveMessage, setSaveMessage] = useState();
useEffect(() => {
ConfigEndpoint.getAll(configPrefix).then((response: any) => {
setConfigDtos(response as ConfigEntryDto[]);
+ setNestedConfigDtos(toNestedConfig(response as ConfigEntryDto[]));
isInitialized.current = true;
});
}, []);
@@ -34,6 +36,7 @@ export default function withConfigPage(WrappedComponent: React.ComponentType
- {(formik: { values: any; isSubmitting: any; }) => (
+ {(formik) => (