mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-05 14:26:38 +00:00
Add missing docs for humanitec app connection endpoints
This commit is contained in:
+35
-4
@@ -5,6 +5,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
|
||||
import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";
|
||||
import { FilterableSelect, FormControl, Select, SelectItem, Tooltip } from "@app/components/v2";
|
||||
import { HUMANITEC_SYNC_SCOPES } from "@app/helpers/secretSyncs";
|
||||
import {
|
||||
THumanitecConnectionApp,
|
||||
THumanitecConnectionEnvironment,
|
||||
@@ -41,6 +42,7 @@ export const HumanitecSyncFields = () => {
|
||||
onChange={() => {
|
||||
setValue("destinationConfig.org", "");
|
||||
setValue("destinationConfig.app", "");
|
||||
setValue("destinationConfig.env", "");
|
||||
}}
|
||||
/>
|
||||
<Controller
|
||||
@@ -48,11 +50,38 @@ export const HumanitecSyncFields = () => {
|
||||
control={control}
|
||||
defaultValue={HumanitecSyncScope.Application}
|
||||
render={({ field: { value, onChange }, fieldState: { error } }) => (
|
||||
<FormControl errorText={error?.message} isError={Boolean(error?.message)} label="Scope">
|
||||
<FormControl
|
||||
errorText={error?.message}
|
||||
isError={Boolean(error?.message)}
|
||||
label="Scope"
|
||||
tooltipClassName="max-w-lg py-3"
|
||||
tooltipText={
|
||||
<div className="flex flex-col gap-3">
|
||||
<p>
|
||||
Specify how Infisical should manage secrets from Humanitec. The following options
|
||||
are available:
|
||||
</p>
|
||||
<ul className="flex list-disc flex-col gap-3 pl-4">
|
||||
{Object.values(HUMANITEC_SYNC_SCOPES).map(({ name, description }) => {
|
||||
return (
|
||||
<li key={name}>
|
||||
<p className="text-mineshaft-300">
|
||||
<span className="font-medium text-bunker-200">{name}</span>: {description}
|
||||
</p>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<Select
|
||||
value={value}
|
||||
onValueChange={(val) => {
|
||||
onChange(val);
|
||||
setValue("destinationConfig.env", "");
|
||||
setValue("destinationConfig.app", "");
|
||||
setValue("destinationConfig.org", "");
|
||||
}}
|
||||
className="w-full border border-mineshaft-500 capitalize"
|
||||
position="popper"
|
||||
@@ -81,9 +110,11 @@ export const HumanitecSyncFields = () => {
|
||||
isLoading={isOrganizationsPending && Boolean(connectionId)}
|
||||
isDisabled={!connectionId}
|
||||
value={organizations ? (organizations.find((org) => org.id === value) ?? []) : []}
|
||||
onChange={(option) =>
|
||||
onChange((option as SingleValue<THumanitecConnectionOrganization>)?.id ?? null)
|
||||
}
|
||||
onChange={(option) => {
|
||||
onChange((option as SingleValue<THumanitecConnectionOrganization>)?.id ?? null);
|
||||
setValue("destinationConfig.app", "");
|
||||
setValue("destinationConfig.env", "");
|
||||
}}
|
||||
options={organizations}
|
||||
placeholder="Select an organization..."
|
||||
getOptionLabel={(option) => option.name}
|
||||
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
SecretSyncImportBehavior,
|
||||
SecretSyncInitialSyncBehavior
|
||||
} from "@app/hooks/api/secretSyncs";
|
||||
import { HumanitecSyncScope } from "@app/hooks/api/secretSyncs/types/humanitec-sync";
|
||||
|
||||
export const SECRET_SYNC_MAP: Record<SecretSync, { name: string; image: string }> = {
|
||||
[SecretSync.AWSParameterStore]: { name: "AWS Parameter Store", image: "Amazon Web Services.png" },
|
||||
@@ -67,3 +68,19 @@ export const SECRET_SYNC_IMPORT_BEHAVIOR_MAP: Record<
|
||||
description: `Infisical will import any secrets present in the ${destinationName} destination, prioritizing values from ${destinationName} over Infisical when keys conflict.`
|
||||
})
|
||||
};
|
||||
|
||||
export const HUMANITEC_SYNC_SCOPES: Record<
|
||||
HumanitecSyncScope,
|
||||
{ name: string; description: string }
|
||||
> = {
|
||||
[HumanitecSyncScope.Application]: {
|
||||
name: "Application",
|
||||
description:
|
||||
"Infisical will import any secrets present in the selected Humanitec application. This includes all secrets that are not limited to a specific environment."
|
||||
},
|
||||
[HumanitecSyncScope.Environment]: {
|
||||
name: "Environment",
|
||||
description:
|
||||
"Infisical will import any secrets present in the selected Humanitec environment. This includes all secrets that are limited to the selected environment."
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user