mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 08:28:52 +00:00
Add MongoDB integration and documentation updates
- Enhanced MongoDB connection handling in backend with improved host validation. - Updated documentation to include MongoDB connection options and API references. - Added new images for MongoDB connection forms and processes. - Implemented MongoDB connection form in the frontend with necessary adjustments.
This commit is contained in:
+1
-9
@@ -1,4 +1,4 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { useState } from "react";
|
||||
import { Controller, FormProvider, useForm } from "react-hook-form";
|
||||
import { faQuestionCircle } from "@fortawesome/free-solid-svg-icons";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
@@ -84,19 +84,11 @@ export const MongoDBConnectionForm = ({ appConnection, onSubmit }: Props) => {
|
||||
handleSubmit,
|
||||
watch,
|
||||
control,
|
||||
setValue,
|
||||
formState: { isSubmitting, isDirty }
|
||||
} = form;
|
||||
|
||||
const host = watch("credentials.host");
|
||||
const sslEnabled = watch("credentials.sslEnabled");
|
||||
|
||||
useEffect(() => {
|
||||
if (host && host.includes("+srv") && !sslEnabled) {
|
||||
setValue("credentials.sslEnabled", true, { shouldDirty: true });
|
||||
}
|
||||
}, [host, sslEnabled, setValue]);
|
||||
|
||||
return (
|
||||
<FormProvider {...form}>
|
||||
<form onSubmit={handleSubmit(onSubmit)}>
|
||||
|
||||
+1
-1
@@ -307,4 +307,4 @@ export const RedisConnectionForm = ({ appConnection, onSubmit }: Props) => {
|
||||
</form>
|
||||
</FormProvider>
|
||||
);
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user