mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 22:28:25 +00:00
Adjust ui
This commit is contained in:
+33
-31
@@ -1,6 +1,8 @@
|
|||||||
import { Controller, useFormContext } from "react-hook-form";
|
import { Controller, useFormContext } from "react-hook-form";
|
||||||
|
import { faQuestionCircle } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
import { FormControl, Input, Switch, TextArea } from "@app/components/v2";
|
import { FormControl, Input, Switch, TextArea, Tooltip } from "@app/components/v2";
|
||||||
|
|
||||||
export const KubernetesResourceFields = () => {
|
export const KubernetesResourceFields = () => {
|
||||||
const { control, watch } = useFormContext();
|
const { control, watch } = useFormContext();
|
||||||
@@ -23,36 +25,6 @@ export const KubernetesResourceFields = () => {
|
|||||||
</FormControl>
|
</FormControl>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Controller
|
|
||||||
name="connectionDetails.namespace"
|
|
||||||
control={control}
|
|
||||||
render={({ field, fieldState: { error } }) => (
|
|
||||||
<FormControl
|
|
||||||
errorText={error?.message}
|
|
||||||
isError={Boolean(error?.message)}
|
|
||||||
label="Namespace"
|
|
||||||
>
|
|
||||||
<Input placeholder="default" {...field} />
|
|
||||||
</FormControl>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
<Controller
|
|
||||||
name="connectionDetails.skipTLSVerify"
|
|
||||||
control={control}
|
|
||||||
render={({ field: { value, onChange }, fieldState: { error } }) => (
|
|
||||||
<FormControl isError={Boolean(error?.message)} errorText={error?.message}>
|
|
||||||
<Switch
|
|
||||||
className="bg-mineshaft-400/50 shadow-inner data-[state=checked]:bg-green/80"
|
|
||||||
id="skip-tls-verify"
|
|
||||||
thumbClassName="bg-mineshaft-800"
|
|
||||||
isChecked={value}
|
|
||||||
onCheckedChange={onChange}
|
|
||||||
>
|
|
||||||
Skip TLS Verification
|
|
||||||
</Switch>
|
|
||||||
</FormControl>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
<Controller
|
<Controller
|
||||||
name="connectionDetails.caCertificate"
|
name="connectionDetails.caCertificate"
|
||||||
control={control}
|
control={control}
|
||||||
@@ -73,6 +45,36 @@ export const KubernetesResourceFields = () => {
|
|||||||
</FormControl>
|
</FormControl>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
<Controller
|
||||||
|
name="connectionDetails.sslRejectUnauthorized"
|
||||||
|
control={control}
|
||||||
|
render={({ field: { value, onChange }, fieldState: { error } }) => (
|
||||||
|
<FormControl isError={Boolean(error?.message)} errorText={error?.message}>
|
||||||
|
<Switch
|
||||||
|
className="bg-mineshaft-400/50 shadow-inner data-[state=checked]:bg-green/80"
|
||||||
|
id="ssl-reject-unauthorized"
|
||||||
|
thumbClassName="bg-mineshaft-800"
|
||||||
|
isChecked={value}
|
||||||
|
onCheckedChange={onChange}
|
||||||
|
>
|
||||||
|
<p className="w-38">
|
||||||
|
Reject Unauthorized
|
||||||
|
<Tooltip
|
||||||
|
className="max-w-md"
|
||||||
|
content={
|
||||||
|
<p>
|
||||||
|
If enabled, Infisical will only connect to the server if it has a valid,
|
||||||
|
trusted SSL certificate.
|
||||||
|
</p>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faQuestionCircle} size="sm" className="ml-1" />
|
||||||
|
</Tooltip>
|
||||||
|
</p>
|
||||||
|
</Switch>
|
||||||
|
</FormControl>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user