make replicated secrets more intuitive

This commit is contained in:
Maidul Islam
2024-05-30 16:38:01 -04:00
committed by =
parent 41914e0027
commit c67642786f
5 changed files with 29 additions and 13 deletions

View File

@@ -156,8 +156,8 @@ export const CreateSecretImportForm = ({
errorText={error?.message}
helperText={
value
? "Manual control over when updates propagate in approval mode, giving you the flexibility to push changes as needed."
: "Instantaneous updates from the linked source on approval mode, ensuring real-time synchronization."
? "Secrets from the source will be automatically sent to the destination. If approval policies exist at the destination, the secrets will be sent as approval requests instead of being applied immediately."
: "Secrets from the source location will be imported to the selected destination immediately, ignoring any approval policies at the destination."
}
>
<Select
@@ -165,8 +165,8 @@ export const CreateSecretImportForm = ({
onValueChange={(val) => onChange(val === "true")}
className="w-full border border-mineshaft-500"
>
<SelectItem value="false">Linked Mode</SelectItem>
<SelectItem value="true">Replication Mode</SelectItem>
<SelectItem value="false">Ignore secret approval polices</SelectItem>
<SelectItem value="true">Respect secret approval polices</SelectItem>
</Select>
</FormControl>
)}

View File

@@ -24,7 +24,6 @@ import {
IconButton,
SecretInput,
TableContainer,
Tag,
Tooltip
} from "@app/components/v2";
import { ProjectPermissionActions, ProjectPermissionSub, useWorkspace } from "@app/context";
@@ -47,17 +46,17 @@ type Props = {
export const EnvFolderIcon = ({
env,
secretPath,
isReplication
// isReplication
}: {
env: string;
secretPath: string;
isReplication?: boolean;
// isReplication?: boolean;
}) => (
<div className="inline-flex items-center space-x-2">
<div style={{ minWidth: "96px" }}>{env || "-"}</div>
{secretPath && (
<div className="inline-flex items-center space-x-2 border-l border-mineshaft-600 pl-2">
{isReplication && <Tag size="xs">Replication Mode</Tag>}
{/* {isReplication && <Tag size="xs">Replication Mode</Tag>} */}
<FontAwesomeIcon icon={faFolder} className="text-md text-green-700" />
<span>{secretPath}</span>
</div>
@@ -168,7 +167,7 @@ export const SecretImportItem = ({
<EnvFolderIcon
env={importEnv.slug || ""}
secretPath={secretImport?.importPath || ""}
isReplication={isReplication}
// isReplication={isReplication}
/>
</div>
<div className="flex items-center space-x-4 px-4 py-2">