Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
improvement(integrations): port native provider creation pages to V3 (S13) (#8616)
Andrew Huang1409af2b8e97
diff --git a/frontend/src/pages/secret-manager/integrations/GcpSecretManagerConfigurePage/GcpSecretManagerConfigurePage.tsx b/frontend/src/pages/secret-manager/integrations/GcpSecretManagerConfigurePage/GcpSecretManagerConfigurePage.tsxindex ad680bfe85..bcb9fa4ed1 100644--- a/frontend/src/pages/secret-manager/integrations/GcpSecretManagerConfigurePage/GcpSecretManagerConfigurePage.tsx+++ b/frontend/src/pages/secret-manager/integrations/GcpSecretManagerConfigurePage/GcpSecretManagerConfigurePage.tsx@@ -1,7 +1,7 @@import { useEffect, useState } from "react";import { Helmet } from "react-helmet";import { Controller, useForm } from "react-hook-form";-import { faArrowUpRightFromSquare, faBookOpen, faBugs } from "@fortawesome/free-solid-svg-icons";+import { faBugs } from "@fortawesome/free-solid-svg-icons";import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { zodResolver } from "@hookform/resolvers/zod";import { useNavigate, useSearch } from "@tanstack/react-router";@@ -11,20 +11,35 @@ import { z } from "zod";import {Button,Card,+ CardContent,+ CardDescription,+ CardFooter,+ CardHeader,CardTitle,- FormControl,+ Dialog,+ DialogBody,+ DialogClose,+ DialogContent,+ DialogFooter,+ DialogHeader,+ DialogTitle,+ DocumentationLinkBadge,+ Field,+ FieldError,+ FieldLabel,Input,- Modal,- ModalContent,+ SecretPathInput,Select,+ SelectContent,SelectItem,- Switch,- Tab,- TabList,- TabPanel,- Tabs-} from "@app/components/v2";-import { SecretPathInput } from "@app/components/v2/SecretPathInput";+ SelectTrigger,+ SelectValue,+ Tabs,+ TabsContent,+ TabsList,+ TabsTrigger,+ Toggle+} from "@app/components/v3";import { ROUTE_PATHS } from "@app/const/routes";import { useOrganization, useProject } from "@app/context";import { usePopUp } from "@app/hooks";@@ -178,232 +193,297 @@ export const GcpSecretManagerConfigurePage = () => {})}className="flex h-full w-full flex-col items-center justify-center">- <Card className="max-w-lg rounded-md border border-border-control">+ <Card className="w-full max-w-lg"><Helmet><title>Set Up GCP Secret Manager Integration</title></Helmet>- <CardTitle- className="mb-2 px-6 text-left text-xl"- subTitle="Select which environment or folder in Infisical you want to sync to GCP Secret Manager."- >- <div className="flex flex-row items-center">- <div className="flex items-center pb-0.5">- <img- src="/images/integrations/Google Cloud Platform.png"- height={30}- width={30}- alt="GCP logo"- />- </div>- <span className="ml-1.5">GCP Secret Manager Integration </span>- <a- target="_blank"- rel="noopener noreferrer"- href="https://infisical.com/docs/integrations/cloud/gcp-secret-manager"- >- <div className="mb-1 ml-2 inline-block cursor-default rounded-md bg-warning/20 px-1.5 pt-[0.04rem] pb-[0.03rem] text-sm text-warning opacity-80 hover:opacity-100">- <FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />- Docs- <FontAwesomeIcon- icon={faArrowUpRightFromSquare}- className="text-xxs mb-[0.07rem] ml-1.5"- />- </div>- </a>- </div>- </CardTitle>- <Tabs defaultValue={TabSections.Connection} className="px-6">- <TabList>- <div className="flex w-full flex-row border-b border-border-control">- <Tab value={TabSections.Connection}>Connection</Tab>- <Tab value={TabSections.Options}>Options</Tab>- </div>- </TabList>- <TabPanel value={TabSections.Connection}>- <motion.div- key="panel-1"- transition={{ duration: 0.15 }}- initial={{ opacity: 0, translateX: 30 }}- animate={{ opacity: 1, translateX: 0 }}- exit={{ opacity: 0, translateX: 30 }}- >- <Controller- control={control}- name="selectedSourceEnvironment"- render={({ field: { onChange, ...field }, fieldState: { error } }) => (- <FormControl- label="Project Environment"- errorText={error?.message}- isError={Boolean(error)}- >- <Select- defaultValue={field.value}- {...field}- onValueChange={(e) => onChange(e)}- className="w-full"- >- {currentProject?.environments.map((sourceEnvironment) => (- <SelectItem- value={sourceEnvironment.slug}- key={`source-environment-${sourceEnvironment.slug}`}- >- {sourceEnvironment.name}- </SelectItem>- ))}- </Select>- </FormControl>- )}- />- <Controller- control={control}- defaultValue=""- name="secretPath"- render={({ field, fieldState: { error } }) => (- <FormControl- label="Secrets Path"- isError={Boolean(error)}- errorText={error?.message}- >- <SecretPathInput- {...field}- environment={selectedSourceEnvironment}- placeholder="/"- />- </FormControl>- )}- />- <Controller- control={control}- name="targetAppId"- render={({ field: { onChange, ...field }, fieldState: { error } }) => {- return (- <FormControl- label="GCP Project"- errorText={error?.message}- isError={Boolean(error)}- >+ <CardHeader>+ <CardTitle>+ <img+ src="/images/integrations/Google Cloud Platform.png"+ height={30}+ width={30}+ alt="GCP logo"+ />+ GCP Secret Manager Integration+ <DocumentationLinkBadge href="https://infisical.com/docs/integrations/cloud/gcp-secret-manager" />+ </CardTitle>+ <CardDescription>+ Select which environment or folder in Infisical you want to sync to GCP Secret Manager.+ </CardDescription>+ </CardHeader>+ <CardContent>+ <Tabs defaultValue={TabSections.Connection}>+ <TabsList variant="project">+ <TabsTrigger value={TabSections.Connection}>Connection</TabsTrigger>+ <TabsTrigger value={TabSections.Options}>Options</TabsTrigger>+ </TabsList>+ <TabsContent value={TabSections.Connection}>+ <motion.div+ key="panel-1"+ className="flex flex-col gap-4"+ transition={{ duration: 0.15 }}+ initial={{ opacity: 0, translateX: 30 }}+ animate={{ opacity: 1, translateX: 0 }}+ exit={{ opacity: 0, translateX: 30 }}+ >+ <Controller+ control={control}+ name="selectedSourceEnvironment"+ render={({ field: { onChange, ...field }, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="GcpSecretManagerConfigurePage-field-1">+ Project Environment+ </FieldLabel><Select- {...field}- onValueChange={(e) => {- if (e === "") return;- onChange(e);- }}- className="w-full"+ defaultValue={field.value}+ value={field.value}+ name={field.name}+ onValueChange={(e) => onChange(e)}>- {integrationAuthApps.length > 0 ? (- integrationAuthApps.map((integrationAuthApp) => (+ <SelectTrigger+ id="GcpSecretManagerConfigurePage-field-1"+ aria-describedby="GcpSecretManagerConfigurePage-field-1-feedback"+ isError={Boolean(error)}+ className="w-full"+ ref={field.ref}+ onBlur={field.onBlur}+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {currentProject?.environments.map((sourceEnvironment) => (<SelectItem- value={String(integrationAuthApp.appId as string)}- key={`target-app-${String(integrationAuthApp.appId)}`}+ value={sourceEnvironment.slug}+ key={`source-environment-${sourceEnvironment.slug}`}>- {integrationAuthApp.name}+ {sourceEnvironment.name}</SelectItem>- ))- ) : (- <SelectItem value="none" key="target-app-none">- No projects found- </SelectItem>- )}+ ))}+ </SelectContent></Select>- </FormControl>- );- }}- />- </motion.div>- </TabPanel>- <TabPanel value={TabSections.Options}>- <motion.div- key="panel-1"- transition={{ duration: 0.15 }}- initial={{ opacity: 0, translateX: -30 }}- animate={{ opacity: 1, translateX: 0 }}- exit={{ opacity: 0, translateX: 30 }}- >- <Controller- control={control}- name="secretPrefix"- render={({ field, fieldState: { error } }) => (- <FormControl- label="Secret Prefix"- isError={Boolean(error)}- errorText={error?.message}- >- <Input {...field} placeholder="INFISICAL_" />- </FormControl>- )}- />- <Controller- control={control}- name="secretSuffix"- render={({ field, fieldState: { error } }) => (- <FormControl- label="Secret Suffix"- isError={Boolean(error)}- errorText={error?.message}- >- <Input {...field} placeholder="_INFISICAL" />- </FormControl>- )}- />- <div className="mt-8 mb-[2.36rem]">+ {Boolean(error) && (+ <FieldError id="GcpSecretManagerConfigurePage-field-1-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>+ )}+ /><Controllercontrol={control}- name="shouldLabel"- render={({ field: { onChange, value } }) => (- <Switch- id="label-gcp"- onCheckedChange={(isChecked) => onChange(isChecked)}- isChecked={value}- >- Label in GCP Secret Manager- </Switch>+ defaultValue=""+ name="secretPath"+ render={({ field, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="GcpSecretManagerConfigurePage-field-2">+ Secrets Path+ </FieldLabel>+ <SecretPathInput+ id="GcpSecretManagerConfigurePage-field-2"+ aria-describedby="GcpSecretManagerConfigurePage-field-2-feedback"+ isError={Boolean(error)}+ {...field}+ environment={selectedSourceEnvironment}+ placeholder="/"+ />+ {Boolean(error) && (+ <FieldError id="GcpSecretManagerConfigurePage-field-2-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>)}/>- </div>- {shouldLabel && (- <div className="mt-8">- <Controller- control={control}- name="labelName"- render={({ field, fieldState: { error } }) => (- <FormControl- label="Label Name"+ <Controller+ control={control}+ name="targetAppId"+ render={({ field: { onChange, ...field }, fieldState: { error } }) => {+ return (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="GcpSecretManagerConfigurePage-field-3">+ GCP Project+ </FieldLabel>+ <Select+ value={field.value}+ name={field.name}+ onValueChange={(e) => {+ if (e === "") return;+ onChange(e);+ }}+ >+ <SelectTrigger+ id="GcpSecretManagerConfigurePage-field-3"+ aria-describedby="GcpSecretManagerConfigurePage-field-3-feedback"+ isError={Boolean(error)}+ className="w-full"+ ref={field.ref}+ onBlur={field.onBlur}+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {integrationAuthApps.length > 0 ? (+ integrationAuthApps.map((integrationAuthApp) => (+ <SelectItem+ value={String(integrationAuthApp.appId as string)}+ key={`target-app-${String(integrationAuthApp.appId)}`}+ >+ {integrationAuthApp.name}+ </SelectItem>+ ))+ ) : (+ <SelectItem value="none" key="target-app-none">+ No projects found+ </SelectItem>+ )}+ </SelectContent>+ </Select>+ {Boolean(error) && (+ <FieldError id="GcpSecretManagerConfigurePage-field-3-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>+ );+ }}+ />+ </motion.div>+ </TabsContent>+ <TabsContent value={TabSections.Options}>+ <motion.div+ key="panel-1"+ className="flex flex-col gap-4"+ transition={{ duration: 0.15 }}+ initial={{ opacity: 0, translateX: -30 }}+ animate={{ opacity: 1, translateX: 0 }}+ exit={{ opacity: 0, translateX: 30 }}+ >+ <Controller+ control={control}+ name="secretPrefix"+ render={({ field, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="GcpSecretManagerConfigurePage-field-4">+ Secret Prefix+ </FieldLabel>+ <Input+ id="GcpSecretManagerConfigurePage-field-4"+ aria-describedby="GcpSecretManagerConfigurePage-field-4-feedback"isError={Boolean(error)}- errorText={error?.message}- >- <Input {...field} placeholder="managed-by" />- </FormControl>- )}- />- <Controller- control={control}- name="labelValue"- render={({ field, fieldState: { error } }) => (- <FormControl- label="Label Name"+ {...field}+ placeholder="INFISICAL_"+ />+ {Boolean(error) && (+ <FieldError id="GcpSecretManagerConfigurePage-field-4-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>+ )}+ />+ <Controller+ control={control}+ name="secretSuffix"+ render={({ field, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="GcpSecretManagerConfigurePage-field-5">+ Secret Suffix+ </FieldLabel>+ <Input+ id="GcpSecretManagerConfigurePage-field-5"+ aria-describedby="GcpSecretManagerConfigurePage-field-5-feedback"isError={Boolean(error)}- errorText={error?.message}- >- <Input {...field} placeholder="infisical" />- </FormControl>- )}- />- </div>- )}- </motion.div>- </TabPanel>- </Tabs>- <Button- colorSchema="primary"- variant="outline_bg"- className="mr-6 mb-8 ml-auto w-min"- size="sm"- type="submit"- isLoading={isLoading}- isDisabled={integrationAuthApps.length === 0}- >- Create Integration- </Button>+ {...field}+ placeholder="_INFISICAL"+ />+ {Boolean(error) && (+ <FieldError id="GcpSecretManagerConfigurePage-field-5-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>+ )}+ />+ <Controller+ control={control}+ name="shouldLabel"+ render={({ field: { onChange, value } }) => (+ <Field orientation="horizontal">+ <FieldLabel htmlFor="label-gcp">Label in GCP Secret Manager</FieldLabel>+ <Toggle+ id="label-gcp"+ onCheckedChange={(isChecked) => onChange(isChecked)}+ checked={value}+ />+ </Field>+ )}+ />+ {shouldLabel && (+ <div className="flex flex-col gap-4">+ <Controller+ control={control}+ name="labelName"+ render={({ field, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="GcpSecretManagerConfigurePage-field-6">+ Label Name+ </FieldLabel>+ <Input+ id="GcpSecretManagerConfigurePage-field-6"+ aria-describedby="GcpSecretManagerConfigurePage-field-6-feedback"+ isError={Boolean(error)}+ {...field}+ placeholder="managed-by"+ />+ {Boolean(error) && (+ <FieldError id="GcpSecretManagerConfigurePage-field-6-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>+ )}+ />+ <Controller+ control={control}+ name="labelValue"+ render={({ field, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="GcpSecretManagerConfigurePage-field-7">+ Label Name+ </FieldLabel>+ <Input+ id="GcpSecretManagerConfigurePage-field-7"+ aria-describedby="GcpSecretManagerConfigurePage-field-7-feedback"+ isError={Boolean(error)}+ {...field}+ placeholder="infisical"+ />+ {Boolean(error) && (+ <FieldError id="GcpSecretManagerConfigurePage-field-7-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>+ )}+ />+ </div>+ )}+ </motion.div>+ </TabsContent>+ </Tabs>+ </CardContent>+ <CardFooter className="justify-end border-t pt-4">+ <Button+ size="sm"+ type="submit"+ isPending={isLoading}+ isDisabled={integrationAuthApps.length === 0}+ variant="project"+ >+ Create Integration+ </Button>+ </CardFooter></Card>{/* <div className="border-t border-border-faint w-full max-w-md mt-6"/><div className="flex flex-col bg-surface-raised border border-border-control w-full p-4 max-w-lg mt-6 rounded-md">@@ -417,34 +497,37 @@ export const GcpSecretManagerConfigurePage = () => {To avoid overwriting existing secrets in GCP Secret Manager, you may consider adding a secret prefix/suffix and/or enabling labeling in the options tab.</span></div> */}- <Modal- isOpen={popUp.confirmIntegration?.isOpen}+ <Dialog+ open={popUp.confirmIntegration?.isOpen}onOpenChange={(isOpen) => handlePopUpToggle("confirmIntegration", isOpen)}>- <ModalContent- title="Heads Up"- footerContent={- <div className="flex items-center space-x-2">- <Button onClick={() => onFormSubmit(popUp.confirmIntegration?.data as FormData)}>- Continue Anyway- </Button>- <Button- onClick={() => handlePopUpClose("confirmIntegration")}- variant="outline_bg"- colorSchema="secondary"- >+ <DialogContent isPending={isLoading}>+ <DialogHeader>+ <DialogTitle>Heads Up</DialogTitle>+ </DialogHeader>+ <DialogBody>+ <p>You're about to overwrite any existing secrets in GCP Secret Manager.</p>+ <p className="mt-4">+ To avoid this behavior, you may consider adding a secret prefix/suffix or enabling+ labeling in the options tab.+ </p>+ </DialogBody>+ <DialogFooter>+ <DialogClose asChild>+ <Button onClick={() => handlePopUpClose("confirmIntegration")} variant="ghost">Cancel</Button>- </div>- }- >- <p>You're about to overwrite any existing secrets in GCP Secret Manager.</p>- <p className="mt-4">- To avoid this behavior, you may consider adding a secret prefix/suffix or enabling- labeling in the options tab.- </p>- </ModalContent>- </Modal>+ </DialogClose>+ <Button+ onClick={() => onFormSubmit(popUp.confirmIntegration?.data as FormData)}+ variant="project"+ isPending={isLoading}+ >+ Continue Anyway+ </Button>+ </DialogFooter>+ </DialogContent>+ </Dialog></form>) : (<div className="flex h-full w-full items-center justify-center">diff --git a/frontend/src/pages/secret-manager/integrations/HashicorpVaultAuthorizePage/HashicorpVaultAuthorizePage.tsx b/frontend/src/pages/secret-manager/integrations/HashicorpVaultAuthorizePage/HashicorpVaultAuthorizePage.tsxindex c46213bb0e..610c07a311 100644--- a/frontend/src/pages/secret-manager/integrations/HashicorpVaultAuthorizePage/HashicorpVaultAuthorizePage.tsx+++ b/frontend/src/pages/secret-manager/integrations/HashicorpVaultAuthorizePage/HashicorpVaultAuthorizePage.tsx@@ -1,12 +1,23 @@import { Helmet } from "react-helmet";import { Controller, useForm } from "react-hook-form";-import { faArrowUpRightFromSquare, faBookOpen } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { zodResolver } from "@hookform/resolvers/zod";import { useNavigate } from "@tanstack/react-router";import { z } from "zod";-import { Button, Card, CardBody, CardTitle, FormControl, Input } from "@app/components/v2";+import {+ Button,+ Card,+ CardContent,+ CardDescription,+ CardFooter,+ CardHeader,+ CardTitle,+ DocumentationLinkBadge,+ Field,+ FieldError,+ FieldLabel,+ Input+} from "@app/components/v3";import { useOrganization, useProject } from "@app/context";import { useSaveIntegrationAccessToken } from "@app/hooks/api";@@ -64,116 +75,139 @@ export const HashicorpVaultAuthorizePage = () => {<Helmet><title>Authorize Vault Integration</title></Helmet>- <Card className="mb-12 max-w-lg rounded-md border border-border-control">- <CardTitle- className="px-6 text-left text-xl"- subTitle="After connecting to Vault, you will be prompted to set up an integration for a particular Infisical project and environment."- >- <div className="flex flex-row items-center">- <div className="inline-flex items-center">+ <form onSubmit={handleSubmit(handleFormSubmit)} noValidate className="w-full max-w-lg">+ <Card>+ <CardHeader>+ <CardTitle><imgsrc="/images/integrations/Vault.png"height={30}width={30}alt="HCP Vault logo"/>- </div>- <span className="ml-2.5">HashiCorp Vault Integration</span>- <a- href="https://infisical.com/docs/integrations/cloud/hashicorp-vault"- target="_blank"- rel="noopener noreferrer"- >- <div className="mb-1 ml-2 inline-block cursor-default rounded-md bg-warning/20 px-1.5 pt-[0.04rem] pb-[0.03rem] text-sm text-warning opacity-80 hover:opacity-100">- <FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />- Docs- <FontAwesomeIcon- icon={faArrowUpRightFromSquare}- className="text-xxs mb-[0.07rem] ml-1.5"- />- </div>- </a>- </div>- </CardTitle>- <CardBody className="px-6 pt-0 pb-6">- <form onSubmit={handleSubmit(handleFormSubmit)} noValidate>+ HashiCorp Vault Integration+ <DocumentationLinkBadge href="https://infisical.com/docs/integrations/cloud/hashicorp-vault" />+ </CardTitle>+ <CardDescription>+ After connecting to Vault, you will be prompted to set up an integration for a+ particular Infisical project and environment.+ </CardDescription>+ </CardHeader>+ <CardContent className="flex flex-col gap-4"><Controllercontrol={control}name="vaultURL"render={({ field, fieldState: { error } }) => (- <FormControl- label="Vault Cluster URL"- errorText={error?.message}- isError={Boolean(error)}- isRequired- >- <Input autoCorrect="off" spellCheck={false} placeholder="" {...field} />- </FormControl>+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="HashicorpVaultAuthorizePage-field-1">+ Vault Cluster URL+ <span className="text-danger">*</span>+ </FieldLabel>+ <Input+ id="HashicorpVaultAuthorizePage-field-1"+ aria-required+ aria-describedby="HashicorpVaultAuthorizePage-field-1-feedback"+ isError={Boolean(error)}+ autoCorrect="off"+ spellCheck={false}+ placeholder=""+ {...field}+ />+ {Boolean(error) && (+ <FieldError id="HashicorpVaultAuthorizePage-field-1-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>)}/><Controllercontrol={control}name="vaultNamespace"render={({ field, fieldState: { error } }) => (- <FormControl- label="Vault Namespace"- errorText={error?.message}- isError={Boolean(error)}- isRequired={false}- >+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="HashicorpVaultAuthorizePage-field-2">+ Vault Namespace+ </FieldLabel><Input+ id="HashicorpVaultAuthorizePage-field-2"+ aria-describedby="HashicorpVaultAuthorizePage-field-2-feedback"+ isError={Boolean(error)}autoCorrect="off"spellCheck={false}placeholder="admin/education"{...field}/>- </FormControl>+ {Boolean(error) && (+ <FieldError id="HashicorpVaultAuthorizePage-field-2-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>)}/><Controllercontrol={control}name="vaultRoleID"render={({ field, fieldState: { error } }) => (- <FormControl- label="Vault RoleID"- errorText={error?.message}- isError={Boolean(error)}- isRequired- >+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="HashicorpVaultAuthorizePage-field-3">+ Vault RoleID+ <span className="text-danger">*</span>+ </FieldLabel><Input+ id="HashicorpVaultAuthorizePage-field-3"+ aria-required+ aria-describedby="HashicorpVaultAuthorizePage-field-3-feedback"+ isError={Boolean(error)}autoCorrect="off"spellCheck={false}placeholder="aaaaaaa-bbbb-cccc-dddd-aaaaaaaaaaa"{...field}/>- </FormControl>+ {Boolean(error) && (+ <FieldError id="HashicorpVaultAuthorizePage-field-3-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>)}/><Controllercontrol={control}name="vaultSecretID"render={({ field, fieldState: { error } }) => (- <FormControl- label="Vault SecretID"- errorText={error?.message}- isError={Boolean(error)}- isRequired- >+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="HashicorpVaultAuthorizePage-field-4">+ Vault SecretID+ <span className="text-danger">*</span>+ </FieldLabel><Input+ id="HashicorpVaultAuthorizePage-field-4"+ aria-required+ aria-describedby="HashicorpVaultAuthorizePage-field-4-feedback"+ isError={Boolean(error)}autoCorrect="off"spellCheck={false}placeholder="aaaaaaa-bbbb-cccc-dddd-aaaaaaaaaaa"{...field}/>- </FormControl>+ {Boolean(error) && (+ <FieldError id="HashicorpVaultAuthorizePage-field-4-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>)}/>- <Button type="submit" isLoading={isSubmitting}>+ </CardContent>+ <CardFooter className="justify-end border-t pt-4">+ <Button type="submit" isPending={isSubmitting} variant="project">Connect to Vault</Button>- </form>- </CardBody>- </Card>+ </CardFooter>+ </Card>+ </form></div>);};diff --git a/frontend/src/pages/secret-manager/integrations/HashicorpVaultConfigurePage/HashicorpVaultConfigurePage.tsx b/frontend/src/pages/secret-manager/integrations/HashicorpVaultConfigurePage/HashicorpVaultConfigurePage.tsxindex 4e4d057278..2958faa75c 100644--- a/frontend/src/pages/secret-manager/integrations/HashicorpVaultConfigurePage/HashicorpVaultConfigurePage.tsx+++ b/frontend/src/pages/secret-manager/integrations/HashicorpVaultConfigurePage/HashicorpVaultConfigurePage.tsx@@ -1,27 +1,36 @@import { useMemo } from "react";import { Helmet } from "react-helmet";import { Controller, useForm } from "react-hook-form";-import {- faArrowUpRightFromSquare,- faBookOpen,- faBugs,- faCircleInfo-} from "@fortawesome/free-solid-svg-icons";+import { faBugs } from "@fortawesome/free-solid-svg-icons";import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { zodResolver } from "@hookform/resolvers/zod";import { useNavigate, useSearch } from "@tanstack/react-router";+import { InfoIcon } from "lucide-react";import { z } from "zod";import {+ Alert,+ AlertDescription,+ AlertTitle,Button,Card,- CardBody,+ CardContent,+ CardDescription,+ CardFooter,+ CardHeader,CardTitle,- FormControl,+ DocumentationLinkBadge,+ Field,+ FieldDescription,+ FieldError,+ FieldLabel,Input,Select,- SelectItem-} from "@app/components/v2";+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue+} from "@app/components/v3";import { ROUTE_PATHS } from "@app/const/routes";import { useOrganization, useProject } from "@app/context";import { isValidPath } from "@app/helpers/string";@@ -110,68 +119,64 @@ export const HashicorpVaultConfigurePage = () => {};return integrationAuth ? (- <div className="flex h-full w-full flex-col items-center justify-center">+ <div className="flex h-full w-full flex-col items-center justify-center gap-6"><Helmet><title>Set Up Vault Integration</title></Helmet>- <Card className="max-w-lg rounded-md border border-border-control">- <CardTitle- className="px-6 text-left text-xl"- subTitle="Select which environment or folder in Infisical you want to sync to which path in HashiCorp Vault."- >- <div className="flex flex-row items-center">- <div className="inline-flex items-center">+ <form onSubmit={handleSubmit(handleFormSubmit)} noValidate className="w-full max-w-lg">+ <Card>+ <CardHeader>+ <CardTitle><imgsrc="/images/integrations/Vault.png"height={30}width={30}alt="HCP Vault logo"/>- </div>- <span className="ml-2.5">HashiCorp Vault Integration</span>- <a- href="https://infisical.com/docs/integrations/cloud/hashicorp-vault"- target="_blank"- rel="noopener noreferrer"- >- <div className="mb-1 ml-2 inline-block cursor-default rounded-md bg-warning/20 px-1.5 pt-[0.04rem] pb-[0.03rem] text-sm text-warning opacity-80 hover:opacity-100">- <FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />- Docs- <FontAwesomeIcon- icon={faArrowUpRightFromSquare}- className="text-xxs mb-[0.07rem] ml-1.5"- />- </div>- </a>- </div>- </CardTitle>- <CardBody>- <form onSubmit={handleSubmit(handleFormSubmit)} noValidate>+ HashiCorp Vault Integration+ <DocumentationLinkBadge href="https://infisical.com/docs/integrations/cloud/hashicorp-vault" />+ </CardTitle>+ <CardDescription>+ Select which environment or folder in Infisical you want to sync to which path in+ HashiCorp Vault.+ </CardDescription>+ </CardHeader>+ <CardContent className="flex flex-col gap-4"><Controllercontrol={control}name="selectedSourceEnvironment"render={({ field, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error)}- isRequired- label="Project Environment"- >- <Select- value={field.value}- onValueChange={field.onChange}- className="w-full border border-border-strong"- >- {currentProject?.environments.map((sourceEnvironment) => (- <SelectItem- value={sourceEnvironment.slug}- key={`vault-environment-${sourceEnvironment.slug}`}- >- {sourceEnvironment.name}- </SelectItem>- ))}+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="HashicorpVaultConfigurePage-field-1">+ Project Environment+ <span className="text-danger">*</span>+ </FieldLabel>+ <Select value={field.value} onValueChange={field.onChange}>+ <SelectTrigger+ id="HashicorpVaultConfigurePage-field-1"+ aria-describedby="HashicorpVaultConfigurePage-field-1-feedback"+ isError={Boolean(error)}+ className="w-full"+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {currentProject?.environments.map((sourceEnvironment) => (+ <SelectItem+ value={sourceEnvironment.slug}+ key={`vault-environment-${sourceEnvironment.slug}`}+ >+ {sourceEnvironment.name}+ </SelectItem>+ ))}+ </SelectContent></Select>- </FormControl>+ {Boolean(error) && (+ <FieldError id="HashicorpVaultConfigurePage-field-1-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>)}/>@@ -179,15 +184,32 @@ export const HashicorpVaultConfigurePage = () => {control={control}name="secretPath"render={({ field, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error)}- isRequired- label="Secrets Path"- helperText="A path to your secrets in Infisical."- >- <Input {...field} autoCorrect="off" spellCheck={false} placeholder="/" />- </FormControl>+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="HashicorpVaultConfigurePage-field-2">+ Secrets Path+ <span className="text-danger">*</span>+ </FieldLabel>+ <Input+ id="HashicorpVaultConfigurePage-field-2"+ aria-required+ aria-describedby="HashicorpVaultConfigurePage-field-2-feedback"+ isError={Boolean(error)}+ {...field}+ autoCorrect="off"+ spellCheck={false}+ placeholder="/"+ />+ {!error && (+ <FieldDescription id="HashicorpVaultConfigurePage-field-2-feedback">+ A path to your secrets in Infisical.+ </FieldDescription>+ )}+ {Boolean(error) && (+ <FieldError id="HashicorpVaultConfigurePage-field-2-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>)}/>@@ -195,15 +217,32 @@ export const HashicorpVaultConfigurePage = () => {control={control}name="vaultEnginePath"render={({ field, fieldState: { error } }) => (- <FormControl- label="Vault KV Secrets Engine Path"- errorText={error?.message}- isError={Boolean(error)}- helperText="A path where your KV Secrets Engine is enabled."- isRequired- >- <Input autoCorrect="off" spellCheck={false} {...field} placeholder="kv" />- </FormControl>+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="HashicorpVaultConfigurePage-field-3">+ Vault KV Secrets Engine Path+ <span className="text-danger">*</span>+ </FieldLabel>+ <Input+ id="HashicorpVaultConfigurePage-field-3"+ aria-required+ aria-describedby="HashicorpVaultConfigurePage-field-3-feedback"+ isError={Boolean(error)}+ autoCorrect="off"+ spellCheck={false}+ {...field}+ placeholder="kv"+ />+ {!error && (+ <FieldDescription id="HashicorpVaultConfigurePage-field-3-feedback">+ A path where your KV Secrets Engine is enabled.+ </FieldDescription>+ )}+ {Boolean(error) && (+ <FieldError id="HashicorpVaultConfigurePage-field-3-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>)}/>@@ -211,40 +250,50 @@ export const HashicorpVaultConfigurePage = () => {control={control}name="vaultSecretPath"render={({ field, fieldState: { error } }) => (- <FormControl- label="Vault Secret(s) Path"- errorText={error?.message}- isError={Boolean(error)}- helperText="A path for storing secrets within the KV Secrets Engine."- isRequired- >+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="HashicorpVaultConfigurePage-field-4">+ Vault Secret(s) Path+ <span className="text-danger">*</span>+ </FieldLabel><Input+ id="HashicorpVaultConfigurePage-field-4"+ aria-required+ aria-describedby="HashicorpVaultConfigurePage-field-4-feedback"+ isError={Boolean(error)}autoCorrect="off"spellCheck={false}{...field}placeholder="machine/dev"/>- </FormControl>+ {!error && (+ <FieldDescription id="HashicorpVaultConfigurePage-field-4-feedback">+ A path for storing secrets within the KV Secrets Engine.+ </FieldDescription>+ )}+ {Boolean(error) && (+ <FieldError id="HashicorpVaultConfigurePage-field-4-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>)}/>-- <Button type="submit" isLoading={isSubmitting}>+ </CardContent>+ <CardFooter className="justify-end border-t pt-4">+ <Button type="submit" isPending={isSubmitting} variant="project">Create Integration</Button>- </form>- </CardBody>- </Card>- <div className="mt-6 w-full max-w-md border-t border-border-faint" />- <div className="mt-6 flex w-full max-w-lg flex-col rounded-md border border-border-control bg-surface-raised p-4">- <div className="flex flex-row items-center">- <FontAwesomeIcon icon={faCircleInfo} className="text-xl text-foreground-secondary" />{" "}- <span className="text-md ml-3 text-foreground">Pro Tip</span>- </div>- <span className="mt-4 text-sm text-label">+ </CardFooter>+ </Card>+ </form>+ <Alert variant="info" className="w-full max-w-lg">+ <InfoIcon />+ <AlertTitle>Pro Tip</AlertTitle>+ <AlertDescription>After creating an integration, your secrets will start syncing immediately. This mightcause an unexpected override of current secrets in Vault with secrets from Infisical.- </span>- </div>+ </AlertDescription>+ </Alert></div>) : (<div className="flex h-full w-full items-center justify-center">diff --git a/frontend/src/pages/secret-manager/integrations/HasuraCloudAuthorizePage/HasuraCloudAuthorizePage.tsx b/frontend/src/pages/secret-manager/integrations/HasuraCloudAuthorizePage/HasuraCloudAuthorizePage.tsxindex a983018a1e..ca37eb11a6 100644--- a/frontend/src/pages/secret-manager/integrations/HasuraCloudAuthorizePage/HasuraCloudAuthorizePage.tsx+++ b/frontend/src/pages/secret-manager/integrations/HasuraCloudAuthorizePage/HasuraCloudAuthorizePage.tsx@@ -1,13 +1,24 @@import { useState } from "react";import { Helmet } from "react-helmet";import { Controller, useForm } from "react-hook-form";-import { faArrowUpRightFromSquare, faBookOpen } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { zodResolver } from "@hookform/resolvers/zod";import { useNavigate } from "@tanstack/react-router";import { z } from "zod";-import { Button, Card, CardTitle, FormControl, Input } from "@app/components/v2";+import {+ Button,+ Card,+ CardContent,+ CardDescription,+ CardFooter,+ CardHeader,+ CardTitle,+ DocumentationLinkBadge,+ Field,+ FieldError,+ FieldLabel,+ Input+} from "@app/components/v3";import { useOrganization, useProject } from "@app/context";import { useSaveIntegrationAccessToken } from "@app/hooks/api";@@ -62,63 +73,54 @@ export const HasuraCloudAuthorizePage = () => {<Helmet><title>Authorize {APP_NAME} Integration</title></Helmet>- <Card className="mb-12 max-w-lg rounded-md border border-border-control">- <CardTitle- className="px-6 text-left text-xl"- subTitle="After adding your access token, you will be prompted to set up an integration for a particular Infisical project and environment."- >- <div className="flex flex-row items-center">- <div className="flex items-center pb-0.5">+ <form onSubmit={handleSubmit(onFormSubmit)} className="w-full max-w-lg">+ <Card>+ <CardHeader>+ <CardTitle><imgsrc="/images/integrations/Hasura.svg"height={30}width={30}alt={`${APP_NAME} logo`}/>- </div>- <span className="ml-2.5">{APP_NAME} Integration </span>- <a- target="_blank"- rel="noopener noreferrer"- href="https://infisical.com/docs/integrations/cloud/hasura-cloud"- >- <div className="mb-1 ml-2 inline-block cursor-default rounded-md bg-warning/20 px-1.5 pt-[0.04rem] pb-[0.03rem] text-sm text-warning opacity-80 hover:opacity-100">- <FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />- Docs- <FontAwesomeIcon- icon={faArrowUpRightFromSquare}- className="text-xxs mb-[0.07rem] ml-1.5"- />- </div>- </a>- </div>- </CardTitle>- <form onSubmit={handleSubmit(onFormSubmit)} className="px-6 pb-8 text-right">- <Controller- control={control}- name="accessToken"- render={({ field, fieldState: { error } }) => (- <FormControl- label={`${APP_NAME} Access Token`}- errorText={error?.message}- isError={Boolean(error)}- >- <Input {...field} placeholder="" />- </FormControl>- )}- />- <Button- colorSchema="primary"- variant="outline_bg"- className="mt-2 w-min"- size="sm"- type="submit"- isLoading={isLoading}- >- Connect to {APP_NAME}- </Button>- </form>- </Card>+ {APP_NAME} Integration+ <DocumentationLinkBadge href="https://infisical.com/docs/integrations/cloud/hasura-cloud" />+ </CardTitle>+ <CardDescription>+ After adding your access token, you will be prompted to set up an integration for a+ particular Infisical project and environment.+ </CardDescription>+ </CardHeader>+ <CardContent className="flex flex-col gap-4">+ <Controller+ control={control}+ name="accessToken"+ render={({ field, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="HasuraCloudAuthorizePage-field-1">{`${APP_NAME} Access Token`}</FieldLabel>+ <Input+ id="HasuraCloudAuthorizePage-field-1"+ aria-describedby="HasuraCloudAuthorizePage-field-1-feedback"+ isError={Boolean(error)}+ {...field}+ placeholder=""+ />+ {Boolean(error) && (+ <FieldError id="HasuraCloudAuthorizePage-field-1-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>+ )}+ />+ </CardContent>+ <CardFooter className="justify-end border-t pt-4">+ <Button size="sm" type="submit" isPending={isLoading} variant="project">+ Connect to {APP_NAME}+ </Button>+ </CardFooter>+ </Card>+ </form></div>);};diff --git a/frontend/src/pages/secret-manager/integrations/HasuraCloudConfigurePage/HasuraCloudConfigurePage.tsx b/frontend/src/pages/secret-manager/integrations/HasuraCloudConfigurePage/HasuraCloudConfigurePage.tsxindex 455a5b4452..987320794c 100644--- a/frontend/src/pages/secret-manager/integrations/HasuraCloudConfigurePage/HasuraCloudConfigurePage.tsx+++ b/frontend/src/pages/secret-manager/integrations/HasuraCloudConfigurePage/HasuraCloudConfigurePage.tsx@@ -1,13 +1,30 @@import { Helmet } from "react-helmet";import { Controller, useForm } from "react-hook-form";-import { faArrowUpRightFromSquare, faBookOpen, faBugs } from "@fortawesome/free-solid-svg-icons";+import { faBugs } from "@fortawesome/free-solid-svg-icons";import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { zodResolver } from "@hookform/resolvers/zod";import { useNavigate, useSearch } from "@tanstack/react-router";import { z } from "zod";-import { Button, Card, CardTitle, FormControl, Select, SelectItem } from "@app/components/v2";-import { SecretPathInput } from "@app/components/v2/SecretPathInput";+import {+ Button,+ Card,+ CardContent,+ CardDescription,+ CardFooter,+ CardHeader,+ CardTitle,+ DocumentationLinkBadge,+ Field,+ FieldError,+ FieldLabel,+ SecretPathInput,+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue+} from "@app/components/v3";import { ROUTE_PATHS } from "@app/const/routes";import { useOrganization, useProject } from "@app/context";import { useCreateIntegration } from "@app/hooks/api";@@ -89,116 +106,133 @@ export const HasuraCloudConfigurePage = () => {<Helmet><title>Set Up {APP_NAME} Integration</title></Helmet>- <Card className="max-w-lg rounded-md border border-border-control">- <CardTitle- className="px-6 text-left text-xl"- subTitle={`Choose which environment or folder in Infisical you want to sync to ${APP_NAME} environment variables.`}- >- <div className="flex flex-row items-center">- <div className="flex items-center pb-0.5">+ <form onSubmit={handleSubmit(onFormSubmit)} className="w-full max-w-lg">+ <Card>+ <CardHeader>+ <CardTitle><imgsrc="/images/integrations/Hasura.svg"height={30}width={30}alt={`${APP_NAME} logo`}/>- </div>- <span className="ml-2.5">{APP_NAME} Integration </span>- <a- target="_blank"- rel="noopener noreferrer"- href="https://infisical.com/docs/integrations/cloud/hasura-cloud"- >- <div className="mb-1 ml-2 inline-block cursor-default rounded-md bg-warning/20 px-1.5 pt-[0.04rem] pb-[0.03rem] text-sm text-warning opacity-80 hover:opacity-100">- <FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />- Docs- <FontAwesomeIcon- icon={faArrowUpRightFromSquare}- className="text-xxs mb-[0.07rem] ml-1.5"- />- </div>- </a>- </div>- </CardTitle>-- <form onSubmit={handleSubmit(onFormSubmit)} className="flex w-full flex-col px-6">- <Controller- control={control}- name="sourceEnvironment"- render={({ field, fieldState: { error } }) => (- <FormControl- label="Project Environment"- errorText={error?.message}- isError={Boolean(error)}- >- <Select- className="w-full border border-border-strong"- value={field.value}- onValueChange={(val) => {- field.onChange(val);- }}- >- {currentProject?.environments.map((sourceEnvironment) => (- <SelectItem- value={sourceEnvironment.slug}- key={`source-environment-${sourceEnvironment.slug}`}+ {APP_NAME} Integration+ <DocumentationLinkBadge href="https://infisical.com/docs/integrations/cloud/hasura-cloud" />+ </CardTitle>+ <CardDescription>{`Choose which environment or folder in Infisical you want to sync to ${APP_NAME} environment variables.`}</CardDescription>+ </CardHeader>+ <CardContent className="flex flex-col gap-4">+ <Controller+ control={control}+ name="sourceEnvironment"+ render={({ field, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="HasuraCloudConfigurePage-field-1">+ Project Environment+ </FieldLabel>+ <Select+ value={field.value}+ onValueChange={(val) => {+ field.onChange(val);+ }}+ >+ <SelectTrigger+ id="HasuraCloudConfigurePage-field-1"+ aria-describedby="HasuraCloudConfigurePage-field-1-feedback"+ isError={Boolean(error)}+ className="w-full">- {sourceEnvironment.name}- </SelectItem>- ))}- </Select>- </FormControl>- )}- />+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {currentProject?.environments.map((sourceEnvironment) => (+ <SelectItem+ value={sourceEnvironment.slug}+ key={`source-environment-${sourceEnvironment.slug}`}+ >+ {sourceEnvironment.name}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ {Boolean(error) && (+ <FieldError id="HasuraCloudConfigurePage-field-1-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>+ )}+ />- <Controller- control={control}- name="secretPath"- render={({ field, fieldState: { error } }) => (- <FormControl label="Secrets Path" errorText={error?.message} isError={Boolean(error)}>- <SecretPathInput {...field} environment={selectedSourceEnvironment} />- </FormControl>- )}- />+ <Controller+ control={control}+ name="secretPath"+ render={({ field, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="HasuraCloudConfigurePage-field-2">Secrets Path</FieldLabel>+ <SecretPathInput+ id="HasuraCloudConfigurePage-field-2"+ aria-describedby="HasuraCloudConfigurePage-field-2-feedback"+ isError={Boolean(error)}+ {...field}+ environment={selectedSourceEnvironment}+ />+ {Boolean(error) && (+ <FieldError id="HasuraCloudConfigurePage-field-2-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>+ )}+ />- <Controller- control={control}- name="appId"- render={({ field, fieldState: { error } }) => (- <FormControl- label="Hasura Cloud Project"- errorText={error?.message}- isError={Boolean(error)}- >- <Select- className="w-full border border-border-strong"- value={field.value}- isDisabled={integrationAuthApps?.length === 0}- onValueChange={(val) => {- field.onChange(val);- }}- >- {integrationAuthApps?.map((project) => (- <SelectItem value={project.appId ?? ""} key={`project-id-${project.appId}`}>- {project.name}- </SelectItem>- ))}- </Select>- </FormControl>- )}- />-- <Button- type="submit"- colorSchema="secondary"- variant="outline_bg"- className="mt-2 mb-6 ml-auto"- isLoading={isSubmitting}- >- Create Integration- </Button>- </form>- </Card>+ <Controller+ control={control}+ name="appId"+ render={({ field, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="HasuraCloudConfigurePage-field-3">+ Hasura Cloud Project+ </FieldLabel>+ <Select+ value={field.value}+ onValueChange={(val) => {+ field.onChange(val);+ }}+ disabled={integrationAuthApps?.length === 0}+ >+ <SelectTrigger+ id="HasuraCloudConfigurePage-field-3"+ aria-describedby="HasuraCloudConfigurePage-field-3-feedback"+ isError={Boolean(error)}+ className="w-full"+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {integrationAuthApps?.map((project) => (+ <SelectItem value={project.appId ?? ""} key={`project-id-${project.appId}`}>+ {project.name}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ {Boolean(error) && (+ <FieldError id="HasuraCloudConfigurePage-field-3-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>+ )}+ />+ </CardContent>+ <CardFooter className="justify-end border-t pt-4">+ <Button type="submit" isPending={isSubmitting} variant="project">+ Create Integration+ </Button>+ </CardFooter>+ </Card>+ </form></div>) : (<div className="flex h-full w-full items-center justify-center">diff --git a/frontend/src/pages/secret-manager/integrations/HerokuConfigurePage/HerokuConfigurePage.tsx b/frontend/src/pages/secret-manager/integrations/HerokuConfigurePage/HerokuConfigurePage.tsxindex 96c163fce0..8b8c22c2ab 100644--- a/frontend/src/pages/secret-manager/integrations/HerokuConfigurePage/HerokuConfigurePage.tsx+++ b/frontend/src/pages/secret-manager/integrations/HerokuConfigurePage/HerokuConfigurePage.tsx@@ -1,14 +1,31 @@-import { useEffect, useState } from "react";+import { useEffect } from "react";import { Helmet } from "react-helmet";import { Controller, useForm } from "react-hook-form";-import { faArrowUpRightFromSquare, faBookOpen, faBugs } from "@fortawesome/free-solid-svg-icons";+import { faBugs } from "@fortawesome/free-solid-svg-icons";import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { zodResolver } from "@hookform/resolvers/zod";import { useNavigate, useSearch } from "@tanstack/react-router";import { z } from "zod";-import { Button, Card, CardTitle, FormControl, Select, SelectItem } from "@app/components/v2";-import { SecretPathInput } from "@app/components/v2/SecretPathInput";+import {+ Button,+ Card,+ CardContent,+ CardDescription,+ CardFooter,+ CardHeader,+ CardTitle,+ DocumentationLinkBadge,+ Field,+ FieldError,+ FieldLabel,+ SecretPathInput,+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue+} from "@app/components/v3";import { ROUTE_PATHS } from "@app/const/routes";import { useOrganization, useProject } from "@app/context";import { useCreateIntegration } from "@app/hooks/api";@@ -52,7 +69,7 @@ export const HerokuConfigurePage = () => {const selectedSourceEnvironment = watch("selectedSourceEnvironment");- const { mutateAsync } = useCreateIntegration();+ const { mutateAsync, isPending: isLoading } = useCreateIntegration();// const { mutateAsync: mutateAsyncEnv } = useCreateWsEnvironment();const integrationAuthId = useSearch({@@ -66,8 +83,6 @@ export const HerokuConfigurePage = () => {integrationAuthId: (integrationAuthId as string) ?? ""});- const [isLoading, setIsLoading] = useState(false);-useEffect(() => {if (integrationAuthApps) {if (integrationAuthApps.length > 0) {@@ -82,8 +97,6 @@ export const HerokuConfigurePage = () => {try {if (!integrationAuth?.id) return;- setIsLoading(true);-await mutateAsync({integrationAuthId: integrationAuth?.id,isActive: true,@@ -95,7 +108,6 @@ export const HerokuConfigurePage = () => {}});- setIsLoading(false);navigate({to: "/organizations/$orgId/projects/secret-management/$projectId/integrations",params: {@@ -116,141 +128,186 @@ export const HerokuConfigurePage = () => {<Helmet><title>Set Up Heroku Integration</title></Helmet>- <Card className="max-w-lg rounded-md border border-border-control p-0">- <CardTitle- className="px-6 text-left text-xl"- subTitle="Select which environment or folder in Infisical you want to sync to Heroku's environment variables."- >- <div className="flex flex-row items-center">- <div className="flex items-center">+ <form onSubmit={handleSubmit(onFormSubmit)} className="w-full max-w-lg">+ <Card>+ <CardHeader>+ <CardTitle><img src="/images/integrations/Heroku.png" height={30} width={30} alt="Heroku logo" />- </div>- <span className="ml-2">Heroku Integration </span>- <a- href="https://infisical.com/docs/integrations/cloud/heroku"- target="_blank"- rel="noopener noreferrer"- >- <div className="mb-1 ml-2 inline-block cursor-default rounded-md bg-warning/20 px-1.5 pt-[0.04rem] pb-[0.03rem] text-sm text-warning opacity-80 hover:opacity-100">- <FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />- Docs- <FontAwesomeIcon- icon={faArrowUpRightFromSquare}- className="text-xxs mb-[0.07rem] ml-1.5"- />- </div>- </a>- </div>- </CardTitle>- <form onSubmit={handleSubmit(onFormSubmit)} className="px-6">- <Controller- control={control}- name="selectedSourceEnvironment"- render={({ field: { onChange, ...field }, fieldState: { error } }) => (- <FormControl- label="Project Environment"- errorText={error?.message}- isError={Boolean(error)}- >- <Select- defaultValue={field.value}- {...field}- onValueChange={(e) => onChange(e)}- className="w-full"- >- {currentProject?.environments.map((sourceEnvironment) => (- <SelectItem- value={sourceEnvironment.slug}- key={`source-environment-${sourceEnvironment.slug}`}- >- {sourceEnvironment.name}- </SelectItem>- ))}- </Select>- </FormControl>- )}- />- <Controller- control={control}- defaultValue=""- name="secretPath"- render={({ field, fieldState: { error } }) => (- <FormControl label="Secrets Path" isError={Boolean(error)} errorText={error?.message}>- <SecretPathInput- {...field}- placeholder="/"- environment={selectedSourceEnvironment}- />- </FormControl>- )}- />- <Controller- control={control}- name="targetApp"- render={({ field: { onChange, ...field }, fieldState: { error } }) => {- return (- <FormControl label="Heroku App" errorText={error?.message} isError={Boolean(error)}>+ Heroku Integration+ <DocumentationLinkBadge href="https://infisical.com/docs/integrations/cloud/heroku" />+ </CardTitle>+ <CardDescription>+ Select which environment or folder in Infisical you want to sync to Heroku's+ environment variables.+ </CardDescription>+ </CardHeader>+ <CardContent className="flex flex-col gap-4">+ <Controller+ control={control}+ name="selectedSourceEnvironment"+ render={({ field: { onChange, ...field }, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="HerokuConfigurePage-field-1">Project Environment</FieldLabel><Select- {...field}- onValueChange={(e) => {- if (e === "") return;- onChange(e);- }}- className="w-full"+ defaultValue={field.value}+ value={field.value}+ name={field.name}+ onValueChange={(e) => onChange(e)}>- {integrationAuthApps.length > 0 ? (- integrationAuthApps.map((integrationAuthApp) => (+ <SelectTrigger+ id="HerokuConfigurePage-field-1"+ aria-describedby="HerokuConfigurePage-field-1-feedback"+ isError={Boolean(error)}+ className="w-full"+ ref={field.ref}+ onBlur={field.onBlur}+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {currentProject?.environments.map((sourceEnvironment) => (<SelectItem- value={String(integrationAuthApp.name as string)}- key={`target-app-${String(integrationAuthApp.appId)}`}+ value={sourceEnvironment.slug}+ key={`source-environment-${sourceEnvironment.slug}`}>- {integrationAuthApp.name}+ {sourceEnvironment.name}</SelectItem>- ))- ) : (- <SelectItem value="none" key="target-app-none">- No apps found- </SelectItem>+ ))}+ </SelectContent>+ </Select>+ {Boolean(error) && (+ <FieldError id="HerokuConfigurePage-field-1-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>+ )}+ />+ <Controller+ control={control}+ defaultValue=""+ name="secretPath"+ render={({ field, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="HerokuConfigurePage-field-2">Secrets Path</FieldLabel>+ <SecretPathInput+ id="HerokuConfigurePage-field-2"+ aria-describedby="HerokuConfigurePage-field-2-feedback"+ isError={Boolean(error)}+ {...field}+ placeholder="/"+ environment={selectedSourceEnvironment}+ />+ {Boolean(error) && (+ <FieldError id="HerokuConfigurePage-field-2-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>+ )}+ />+ <Controller+ control={control}+ name="targetApp"+ render={({ field: { onChange, ...field }, fieldState: { error } }) => {+ return (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="HerokuConfigurePage-field-3">Heroku App</FieldLabel>+ <Select+ value={field.value}+ name={field.name}+ onValueChange={(e) => {+ if (e === "") return;+ onChange(e);+ }}+ >+ <SelectTrigger+ id="HerokuConfigurePage-field-3"+ aria-describedby="HerokuConfigurePage-field-3-feedback"+ isError={Boolean(error)}+ className="w-full"+ ref={field.ref}+ onBlur={field.onBlur}+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {integrationAuthApps.length > 0 ? (+ integrationAuthApps.map((integrationAuthApp) => (+ <SelectItem+ value={String(integrationAuthApp.name as string)}+ key={`target-app-${String(integrationAuthApp.appId)}`}+ >+ {integrationAuthApp.name}+ </SelectItem>+ ))+ ) : (+ <SelectItem value="none" key="target-app-none">+ No apps found+ </SelectItem>+ )}+ </SelectContent>+ </Select>+ {Boolean(error) && (+ <FieldError id="HerokuConfigurePage-field-3-feedback">+ {error?.message}+ </FieldError>)}+ </Field>+ );+ }}+ />+ <Controller+ control={control}+ name="initialSyncBehavior"+ render={({ field: { onChange, ...field }, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="HerokuConfigurePage-field-4">+ Initial Sync Behavior+ </FieldLabel>+ <Select value={field.value} name={field.name} onValueChange={(e) => onChange(e)}>+ <SelectTrigger+ id="HerokuConfigurePage-field-4"+ aria-describedby="HerokuConfigurePage-field-4-feedback"+ isError={Boolean(error)}+ className="w-full"+ ref={field.ref}+ onBlur={field.onBlur}+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {initialSyncBehaviors.map((b) => {+ return (+ <SelectItem value={b.value} key={`sync-behavior-${b.value}`}>+ {b.label}+ </SelectItem>+ );+ })}+ </SelectContent></Select>- </FormControl>- );- }}- />- <Controller- control={control}- name="initialSyncBehavior"- render={({ field: { onChange, ...field }, fieldState: { error } }) => (- <FormControl- label="Initial Sync Behavior"- errorText={error?.message}- isError={Boolean(error)}- >- <Select {...field} onValueChange={(e) => onChange(e)} className="w-full">- {initialSyncBehaviors.map((b) => {- return (- <SelectItem value={b.value} key={`sync-behavior-${b.value}`}>- {b.label}- </SelectItem>- );- })}- </Select>- </FormControl>- )}- />- <Button- colorSchema="primary"- variant="outline_bg"- className="mt-2 mb-6 ml-auto"- size="sm"- type="submit"- isLoading={isLoading}- isDisabled={integrationAuthApps.length === 0}- >- Create Integration- </Button>- </form>- </Card>+ {Boolean(error) && (+ <FieldError id="HerokuConfigurePage-field-4-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>+ )}+ />+ </CardContent>+ <CardFooter className="justify-end border-t pt-4">+ <Button+ size="sm"+ type="submit"+ isPending={isLoading}+ isDisabled={integrationAuthApps.length === 0}+ variant="project"+ >+ Create Integration+ </Button>+ </CardFooter>+ </Card>+ </form>{/* {integrationType === "App" && <><div className="mt-6 w-full max-w-md border-t border-border-faint" /><div className="mt-6 flex w-full max-w-lg flex-col rounded-md border border-border-control bg-surface-raised p-4">diff --git a/frontend/src/pages/secret-manager/integrations/LaravelForgeAuthorizePage/LaravelForgeAuthorizePage.tsx b/frontend/src/pages/secret-manager/integrations/LaravelForgeAuthorizePage/LaravelForgeAuthorizePage.tsxindex 2d36c41633..f529dc4b4d 100644--- a/frontend/src/pages/secret-manager/integrations/LaravelForgeAuthorizePage/LaravelForgeAuthorizePage.tsx+++ b/frontend/src/pages/secret-manager/integrations/LaravelForgeAuthorizePage/LaravelForgeAuthorizePage.tsx@@ -1,20 +1,30 @@import { useState } from "react";import { useNavigate } from "@tanstack/react-router";-import { Button, Card, CardTitle, FormControl, Input } from "@app/components/v2";+import {+ Button,+ Card,+ CardContent,+ CardFooter,+ CardHeader,+ CardTitle,+ Field,+ FieldError,+ FieldLabel,+ Input+} from "@app/components/v3";import { useOrganization, useProject } from "@app/context";import { useSaveIntegrationAccessToken } from "@app/hooks/api";export const LaravelForgeAuthorizePage = () => {const navigate = useNavigate();- const { mutateAsync } = useSaveIntegrationAccessToken();+ const { mutateAsync, isPending: isLoading } = useSaveIntegrationAccessToken();const { currentOrg } = useOrganization();const { currentProject } = useProject();const [apiKey, setApiKey] = useState("");const [apiKeyErrorText, setApiKeyErrorText] = useState("");const [serverId, setServerId] = useState("");const [serverIdErrorText, setServerIdErrorText] = useState("");- const [isLoading, setIsLoading] = useState(false);const handleButtonClick = async () => {try {@@ -31,8 +41,6 @@ export const LaravelForgeAuthorizePage = () => {return;}- setIsLoading(true);-const integrationAuth = await mutateAsync({workspaceId: currentProject.id,integration: "laravel-forge",@@ -40,8 +48,6 @@ export const LaravelForgeAuthorizePage = () => {accessToken: apiKey});- setIsLoading(false);-navigate({to: "/organizations/$orgId/projects/secret-management/$projectId/integrations/laravel-forge/create",params: {@@ -59,38 +65,53 @@ export const LaravelForgeAuthorizePage = () => {return (<div className="flex h-full w-full items-center justify-center">- <Card className="max-w-md rounded-md p-8">- <CardTitle className="text-center">Laravel Forge Integration</CardTitle>- <FormControl- label="Laravel Forge Access Token"- errorText={apiKeyErrorText}- isError={apiKeyErrorText !== ""}- >- <Input- placeholder="Access Token"- value={apiKey}- onChange={(e) => setApiKey(e.target.value)}- />- </FormControl>- <FormControl- label="Laravel Forge Server ID"- errorText={serverIdErrorText}- isError={serverIdErrorText !== ""}- >- <Input- placeholder="123456"- value={serverId}- onChange={(e) => setServerId(e.target.value)}- />- </FormControl>- <Button- onClick={handleButtonClick}- colorSchema="secondary"- className="mt-4"- isLoading={isLoading}- >- Connect to Laravel Forge- </Button>+ <Card className="w-full max-w-lg">+ <CardHeader>+ <CardTitle>Laravel Forge Integration</CardTitle>+ </CardHeader>+ <CardContent className="flex flex-col gap-4">+ <Field data-invalid={apiKeyErrorText !== ""}>+ <FieldLabel htmlFor="LaravelForgeAuthorizePage-field-1">+ Laravel Forge Access Token+ </FieldLabel>+ <Input+ id="LaravelForgeAuthorizePage-field-1"+ aria-describedby="LaravelForgeAuthorizePage-field-1-feedback"+ isError={apiKeyErrorText !== ""}+ placeholder="Access Token"+ value={apiKey}+ onChange={(e) => setApiKey(e.target.value)}+ />+ {apiKeyErrorText !== "" && (+ <FieldError id="LaravelForgeAuthorizePage-field-1-feedback">+ {apiKeyErrorText}+ </FieldError>+ )}+ </Field>+ <Field data-invalid={serverIdErrorText !== ""}>+ <FieldLabel htmlFor="LaravelForgeAuthorizePage-field-2">+ Laravel Forge Server ID+ </FieldLabel>+ <Input+ id="LaravelForgeAuthorizePage-field-2"+ aria-describedby="LaravelForgeAuthorizePage-field-2-feedback"+ isError={serverIdErrorText !== ""}+ placeholder="123456"+ value={serverId}+ onChange={(e) => setServerId(e.target.value)}+ />+ {serverIdErrorText !== "" && (+ <FieldError id="LaravelForgeAuthorizePage-field-2-feedback">+ {serverIdErrorText}+ </FieldError>+ )}+ </Field>+ </CardContent>+ <CardFooter className="justify-end border-t pt-4">+ <Button onClick={handleButtonClick} isPending={isLoading} variant="project">+ Connect to Laravel Forge+ </Button>+ </CardFooter></Card></div>);diff --git a/frontend/src/pages/secret-manager/integrations/LaravelForgeConfigurePage/LaravelForgeConfigurePage.tsx b/frontend/src/pages/secret-manager/integrations/LaravelForgeConfigurePage/LaravelForgeConfigurePage.tsxindex 685a459c84..a3c75c3ba1 100644--- a/frontend/src/pages/secret-manager/integrations/LaravelForgeConfigurePage/LaravelForgeConfigurePage.tsx+++ b/frontend/src/pages/secret-manager/integrations/LaravelForgeConfigurePage/LaravelForgeConfigurePage.tsx@@ -4,12 +4,19 @@ import { useNavigate, useSearch } from "@tanstack/react-router";import {Button,Card,+ CardContent,+ CardFooter,+ CardHeader,CardTitle,- FormControl,+ Field,+ FieldLabel,Input,Select,- SelectItem-} from "@app/components/v2";+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue+} from "@app/components/v3";import { ROUTE_PATHS } from "@app/const/routes";import { useOrganization, useProject } from "@app/context";import { useCreateIntegration } from "@app/hooks/api";@@ -21,7 +28,7 @@ import { IntegrationsListPageTabs } from "@app/types/integrations";export const LaravelForgeConfigurePage = () => {const navigate = useNavigate();- const { mutateAsync } = useCreateIntegration();+ const { mutateAsync, isPending: isLoading } = useCreateIntegration();const { currentOrg } = useOrganization();const { currentProject } = useProject();const integrationAuthId = useSearch({@@ -39,7 +46,6 @@ export const LaravelForgeConfigurePage = () => {);const [targetApp, setTargetApp] = useState("");const [secretPath, setSecretPath] = useState("/");- const [isLoading, setIsLoading] = useState(false);useEffect(() => {if (integrationAuthApps) {@@ -55,8 +61,6 @@ export const LaravelForgeConfigurePage = () => {try {if (!integrationAuth?.id) return;- setIsLoading(true);-await mutateAsync({integrationAuthId: integrationAuth?.id,isActive: true,@@ -69,8 +73,6 @@ export const LaravelForgeConfigurePage = () => {secretPath});- setIsLoading(false);-navigate({to: "/organizations/$orgId/projects/secret-management/$projectId/integrations",params: {@@ -88,63 +90,89 @@ export const LaravelForgeConfigurePage = () => {return integrationAuth && selectedSourceEnvironment && integrationAuthApps && targetApp ? (<div className="flex h-full w-full items-center justify-center">- <Card className="max-w-md rounded-md p-8">- <CardTitle className="text-center">Laravel Forge Integration</CardTitle>- <FormControl label="Project Environment" className="mt-4">- <Select- value={selectedSourceEnvironment}- onValueChange={(val) => setSelectedSourceEnvironment(val)}- className="w-full border border-border-strong"- >- {currentProject?.environments.map((sourceEnvironment) => (- <SelectItem- value={sourceEnvironment.slug}- key={`source-environment-${sourceEnvironment.slug}`}+ <Card className="w-full max-w-lg">+ <CardHeader>+ <CardTitle>Laravel Forge Integration</CardTitle>+ </CardHeader>+ <CardContent className="flex flex-col gap-4">+ <Field>+ <FieldLabel htmlFor="LaravelForgeConfigurePage-field-1">Project Environment</FieldLabel>+ <Select+ value={selectedSourceEnvironment}+ onValueChange={(val) => setSelectedSourceEnvironment(val)}+ >+ <SelectTrigger+ id="LaravelForgeConfigurePage-field-1"+ aria-describedby="LaravelForgeConfigurePage-field-1-feedback"+ className="w-full"+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {currentProject?.environments.map((sourceEnvironment) => (+ <SelectItem+ value={sourceEnvironment.slug}+ key={`source-environment-${sourceEnvironment.slug}`}+ >+ {sourceEnvironment.name}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ </Field>+ <Field>+ <FieldLabel htmlFor="LaravelForgeConfigurePage-field-2">Secrets Path</FieldLabel>+ <Input+ id="LaravelForgeConfigurePage-field-2"+ aria-describedby="LaravelForgeConfigurePage-field-2-feedback"+ value={secretPath}+ onChange={(evt) => setSecretPath(evt.target.value)}+ placeholder="Provide a path, default is /"+ />+ </Field>+ <Field>+ <FieldLabel htmlFor="LaravelForgeConfigurePage-field-3">Laravel Forge Sites</FieldLabel>+ <Select+ value={targetApp}+ onValueChange={(val) => setTargetApp(val)}+ disabled={integrationAuthApps.length === 0}+ >+ <SelectTrigger+ id="LaravelForgeConfigurePage-field-3"+ aria-describedby="LaravelForgeConfigurePage-field-3-feedback"+ className="w-full">- {sourceEnvironment.name}- </SelectItem>- ))}- </Select>- </FormControl>- <FormControl label="Secrets Path">- <Input- value={secretPath}- onChange={(evt) => setSecretPath(evt.target.value)}- placeholder="Provide a path, default is /"- />- </FormControl>- <FormControl label="Laravel Forge Sites" className="mt-4">- <Select- value={targetApp}- onValueChange={(val) => setTargetApp(val)}- className="w-full border border-border-strong"+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {integrationAuthApps.length > 0 ? (+ integrationAuthApps.map((integrationAuthApp) => (+ <SelectItem+ value={integrationAuthApp.name}+ key={`target-app-${integrationAuthApp.name}`}+ >+ {integrationAuthApp.name}+ </SelectItem>+ ))+ ) : (+ <SelectItem value="none" key="target-app-none">+ No sites found+ </SelectItem>+ )}+ </SelectContent>+ </Select>+ </Field>+ </CardContent>+ <CardFooter className="justify-end border-t pt-4">+ <Button+ onClick={handleButtonClick}+ isPending={isLoading}isDisabled={integrationAuthApps.length === 0}+ variant="project">- {integrationAuthApps.length > 0 ? (- integrationAuthApps.map((integrationAuthApp) => (- <SelectItem- value={integrationAuthApp.name}- key={`target-app-${integrationAuthApp.name}`}- >- {integrationAuthApp.name}- </SelectItem>- ))- ) : (- <SelectItem value="none" key="target-app-none">- No sites found- </SelectItem>- )}- </Select>- </FormControl>- <Button- onClick={handleButtonClick}- colorSchema="secondary"- className="mt-4"- isLoading={isLoading}- isDisabled={integrationAuthApps.length === 0}- >- Create Integration- </Button>+ Create Integration+ </Button>+ </CardFooter></Card></div>) : (diff --git a/frontend/src/pages/secret-manager/integrations/NetlifyConfigurePage/NetlifyConfigurePage.tsx b/frontend/src/pages/secret-manager/integrations/NetlifyConfigurePage/NetlifyConfigurePage.tsxindex 60f0649bbd..be1aca1dd7 100644--- a/frontend/src/pages/secret-manager/integrations/NetlifyConfigurePage/NetlifyConfigurePage.tsx+++ b/frontend/src/pages/secret-manager/integrations/NetlifyConfigurePage/NetlifyConfigurePage.tsx@@ -4,12 +4,19 @@ import { useNavigate, useSearch } from "@tanstack/react-router";import {Button,Card,+ CardContent,+ CardFooter,+ CardHeader,CardTitle,- FormControl,+ Field,+ FieldLabel,Input,Select,- SelectItem-} from "@app/components/v2";+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue+} from "@app/components/v3";import { ROUTE_PATHS } from "@app/const/routes";import { useOrganization, useProject } from "@app/context";import { useCreateIntegration } from "@app/hooks/api";@@ -28,7 +35,7 @@ const netlifyEnvironments = [export const NetlifyConfigurePage = () => {const navigate = useNavigate();- const { mutateAsync } = useCreateIntegration();+ const { mutateAsync, isPending: isLoading } = useCreateIntegration();const { currentOrg } = useOrganization();const { currentProject } = useProject();const integrationAuthId = useSearch({@@ -47,7 +54,6 @@ export const NetlifyConfigurePage = () => {const [targetApp, setTargetApp] = useState("");const [targetEnvironment, setTargetEnvironment] = useState(netlifyEnvironments[0].slug);const [secretPath, setSecretPath] = useState("/");- const [isLoading, setIsLoading] = useState(false);useEffect(() => {if (integrationAuthApps) {@@ -61,8 +67,6 @@ export const NetlifyConfigurePage = () => {const handleButtonClick = async () => {try {- setIsLoading(true);-if (!integrationAuth?.id) return;await mutateAsync({@@ -77,7 +81,6 @@ export const NetlifyConfigurePage = () => {secretPath});- setIsLoading(false);navigate({to: "/organizations/$orgId/projects/secret-management/$projectId/integrations",params: {@@ -99,79 +102,111 @@ export const NetlifyConfigurePage = () => {targetApp &&targetEnvironment ? (<div className="flex h-full w-full items-center justify-center">- <Card className="max-w-md rounded-md p-8">- <CardTitle className="text-center">Netlify Integration</CardTitle>- <FormControl label="Project Environment">- <Select- value={selectedSourceEnvironment}- onValueChange={(val) => setSelectedSourceEnvironment(val)}- className="w-full border border-border-strong"- >- {currentProject?.environments.map((sourceEnvironment) => (- <SelectItem- value={sourceEnvironment.slug}- key={`source-environment-${sourceEnvironment.slug}`}+ <Card className="w-full max-w-lg">+ <CardHeader>+ <CardTitle>Netlify Integration</CardTitle>+ </CardHeader>+ <CardContent className="flex flex-col gap-4">+ <Field>+ <FieldLabel htmlFor="NetlifyConfigurePage-field-1">Project Environment</FieldLabel>+ <Select+ value={selectedSourceEnvironment}+ onValueChange={(val) => setSelectedSourceEnvironment(val)}+ >+ <SelectTrigger+ id="NetlifyConfigurePage-field-1"+ aria-describedby="NetlifyConfigurePage-field-1-feedback"+ className="w-full"+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {currentProject?.environments.map((sourceEnvironment) => (+ <SelectItem+ value={sourceEnvironment.slug}+ key={`source-environment-${sourceEnvironment.slug}`}+ >+ {sourceEnvironment.name}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ </Field>+ <Field>+ <FieldLabel htmlFor="NetlifyConfigurePage-field-2">Secrets Path</FieldLabel>+ <Input+ id="NetlifyConfigurePage-field-2"+ aria-describedby="NetlifyConfigurePage-field-2-feedback"+ value={secretPath}+ onChange={(evt) => setSecretPath(evt.target.value)}+ placeholder="Provide a path, default is /"+ />+ </Field>+ <Field>+ <FieldLabel htmlFor="NetlifyConfigurePage-field-3">Netlify Site</FieldLabel>+ <Select+ value={targetApp}+ onValueChange={(val) => setTargetApp(val)}+ disabled={integrationAuthApps.length === 0}+ >+ <SelectTrigger+ id="NetlifyConfigurePage-field-3"+ aria-describedby="NetlifyConfigurePage-field-3-feedback"+ className="w-full">- {sourceEnvironment.name}- </SelectItem>- ))}- </Select>- </FormControl>- <FormControl label="Secrets Path">- <Input- value={secretPath}- onChange={(evt) => setSecretPath(evt.target.value)}- placeholder="Provide a path, default is /"- />- </FormControl>- <FormControl label="Netlify Site">- <Select- value={targetApp}- onValueChange={(val) => setTargetApp(val)}- className="w-full border border-border-strong"+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {integrationAuthApps.length > 0 ? (+ integrationAuthApps.map((integrationAuthApp) => (+ <SelectItem+ value={integrationAuthApp.name}+ key={`target-app-${integrationAuthApp.name}`}+ >+ {integrationAuthApp.name}+ </SelectItem>+ ))+ ) : (+ <SelectItem value="none" key="target-app-none">+ No sites found+ </SelectItem>+ )}+ </SelectContent>+ </Select>+ </Field>+ <Field>+ <FieldLabel htmlFor="NetlifyConfigurePage-field-4">Netlify Context</FieldLabel>+ <Select value={targetEnvironment} onValueChange={(val) => setTargetEnvironment(val)}>+ <SelectTrigger+ id="NetlifyConfigurePage-field-4"+ aria-describedby="NetlifyConfigurePage-field-4-feedback"+ className="w-full"+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {netlifyEnvironments.map((netlifyEnvironment) => (+ <SelectItem+ value={netlifyEnvironment.slug}+ key={`target-environment-${netlifyEnvironment.slug}`}+ >+ {netlifyEnvironment.name}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ </Field>+ </CardContent>+ <CardFooter className="justify-end border-t pt-4">+ <Button+ onClick={handleButtonClick}+ isPending={isLoading}isDisabled={integrationAuthApps.length === 0}+ variant="project">- {integrationAuthApps.length > 0 ? (- integrationAuthApps.map((integrationAuthApp) => (- <SelectItem- value={integrationAuthApp.name}- key={`target-app-${integrationAuthApp.name}`}- >- {integrationAuthApp.name}- </SelectItem>- ))- ) : (- <SelectItem value="none" key="target-app-none">- No sites found- </SelectItem>- )}- </Select>- </FormControl>- <FormControl label="Netlify Context">- <Select- value={targetEnvironment}- onValueChange={(val) => setTargetEnvironment(val)}- className="w-full border border-border-strong"- >- {netlifyEnvironments.map((netlifyEnvironment) => (- <SelectItem- value={netlifyEnvironment.slug}- key={`target-environment-${netlifyEnvironment.slug}`}- >- {netlifyEnvironment.name}- </SelectItem>- ))}- </Select>- </FormControl>- <Button- onClick={handleButtonClick}- colorSchema="secondary"- className="mt-4"- isLoading={isLoading}- isDisabled={integrationAuthApps.length === 0}- >- Create Integration- </Button>+ Create Integration+ </Button>+ </CardFooter></Card></div>) : (diff --git a/frontend/src/pages/secret-manager/integrations/NorthflankAuthorizePage/NorthflankAuthorizePage.tsx b/frontend/src/pages/secret-manager/integrations/NorthflankAuthorizePage/NorthflankAuthorizePage.tsxindex 4eba76d599..cf5924dc94 100644--- a/frontend/src/pages/secret-manager/integrations/NorthflankAuthorizePage/NorthflankAuthorizePage.tsx+++ b/frontend/src/pages/secret-manager/integrations/NorthflankAuthorizePage/NorthflankAuthorizePage.tsx@@ -1,18 +1,28 @@import { useState } from "react";import { useNavigate } from "@tanstack/react-router";-import { Button, Card, CardTitle, FormControl, Input } from "@app/components/v2";+import {+ Button,+ Card,+ CardContent,+ CardFooter,+ CardHeader,+ CardTitle,+ Field,+ FieldError,+ FieldLabel,+ Input+} from "@app/components/v3";import { useOrganization, useProject } from "@app/context";import { useSaveIntegrationAccessToken } from "@app/hooks/api";export const NorthflankAuthorizePage = () => {const navigate = useNavigate();- const { mutateAsync } = useSaveIntegrationAccessToken();+ const { mutateAsync, isPending: isLoading } = useSaveIntegrationAccessToken();const { currentProject } = useProject();const { currentOrg } = useOrganization();const [apiKey, setApiKey] = useState("");const [apiKeyErrorText, setApiKeyErrorText] = useState("");- const [isLoading, setIsLoading] = useState(false);const handleButtonClick = async () => {try {@@ -22,16 +32,12 @@ export const NorthflankAuthorizePage = () => {return;}- setIsLoading(true);-const integrationAuth = await mutateAsync({workspaceId: currentProject.id,integration: "northflank",accessToken: apiKey});- setIsLoading(false);-navigate({to: "/organizations/$orgId/projects/secret-management/$projectId/integrations/northflank/create",params: {@@ -49,23 +55,33 @@ export const NorthflankAuthorizePage = () => {return (<div className="flex h-full w-full items-center justify-center">- <Card className="max-w-md rounded-md p-8">- <CardTitle className="text-center">Northflank Integration</CardTitle>- <FormControl- label="Northflank API Token"- errorText={apiKeyErrorText}- isError={apiKeyErrorText !== ""}- >- <Input placeholder="" value={apiKey} onChange={(e) => setApiKey(e.target.value)} />- </FormControl>- <Button- onClick={handleButtonClick}- colorSchema="secondary"- className="mt-4"- isLoading={isLoading}- >- Connect to Northflank- </Button>+ <Card className="w-full max-w-lg">+ <CardHeader>+ <CardTitle>Northflank Integration</CardTitle>+ </CardHeader>+ <CardContent className="flex flex-col gap-4">+ <Field data-invalid={apiKeyErrorText !== ""}>+ <FieldLabel htmlFor="NorthflankAuthorizePage-field-1">Northflank API Token</FieldLabel>+ <Input+ id="NorthflankAuthorizePage-field-1"+ aria-describedby="NorthflankAuthorizePage-field-1-feedback"+ isError={apiKeyErrorText !== ""}+ placeholder=""+ value={apiKey}+ onChange={(e) => setApiKey(e.target.value)}+ />+ {apiKeyErrorText !== "" && (+ <FieldError id="NorthflankAuthorizePage-field-1-feedback">+ {apiKeyErrorText}+ </FieldError>+ )}+ </Field>+ </CardContent>+ <CardFooter className="justify-end border-t pt-4">+ <Button onClick={handleButtonClick} isPending={isLoading} variant="project">+ Connect to Northflank+ </Button>+ </CardFooter></Card></div>);diff --git a/frontend/src/pages/secret-manager/integrations/NorthflankConfigurePage/NorthflankConfigurePage.tsx b/frontend/src/pages/secret-manager/integrations/NorthflankConfigurePage/NorthflankConfigurePage.tsxindex 5bafdb37d4..c79f412736 100644--- a/frontend/src/pages/secret-manager/integrations/NorthflankConfigurePage/NorthflankConfigurePage.tsx+++ b/frontend/src/pages/secret-manager/integrations/NorthflankConfigurePage/NorthflankConfigurePage.tsx@@ -4,12 +4,19 @@ import { useNavigate, useSearch } from "@tanstack/react-router";import {Button,Card,+ CardContent,+ CardFooter,+ CardHeader,CardTitle,- FormControl,+ Field,+ FieldLabel,Input,Select,- SelectItem-} from "@app/components/v2";+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue+} from "@app/components/v3";import { ROUTE_PATHS } from "@app/const/routes";import { useOrganization, useProject } from "@app/context";import { useCreateIntegration } from "@app/hooks/api";@@ -22,7 +29,7 @@ import { IntegrationsListPageTabs } from "@app/types/integrations";export const NorthflankConfigurePage = () => {const navigate = useNavigate();- const { mutateAsync } = useCreateIntegration();+ const { mutateAsync, isPending: isLoading } = useCreateIntegration();const { currentOrg } = useOrganization();const { currentProject } = useProject();const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState(@@ -32,8 +39,6 @@ export const NorthflankConfigurePage = () => {const [targetAppId, setTargetAppId] = useState("");const [targetSecretGroupId, setTargetSecretGroupId] = useState<string>("");- const [isLoading, setIsLoading] = useState(false);-const integrationAuthId = useSearch({from: ROUTE_PATHS.SecretManager.Integratons.NorthflankConfigurePage.id,select: (el) => el.integrationAuthId@@ -76,8 +81,6 @@ export const NorthflankConfigurePage = () => {try {if (!integrationAuth?.id) return;- setIsLoading(true);-await mutateAsync({integrationAuthId: integrationAuth?.id,isActive: true,@@ -90,8 +93,6 @@ export const NorthflankConfigurePage = () => {secretPath});- setIsLoading(false);-navigate({to: "/organizations/$orgId/projects/secret-management/$projectId/integrations",params: {@@ -109,88 +110,125 @@ export const NorthflankConfigurePage = () => {return integrationAuth && selectedSourceEnvironment && integrationAuthApps && targetAppId ? (<div className="flex h-full w-full items-center justify-center">- <Card className="max-w-md rounded-md p-8">- <CardTitle className="text-center">Northflank Integration</CardTitle>- <FormControl label="Project Environment" className="mt-4">- <Select- value={selectedSourceEnvironment}- onValueChange={(val) => setSelectedSourceEnvironment(val)}- className="w-full border border-border-strong"- >- {currentProject?.environments.map((sourceEnvironment) => (- <SelectItem- value={sourceEnvironment.slug}- key={`source-environment-${sourceEnvironment.slug}`}- >- {sourceEnvironment.name}- </SelectItem>- ))}- </Select>- </FormControl>- <FormControl label="Secrets Path">- <Input- value={secretPath}- onChange={(evt) => setSecretPath(evt.target.value)}- placeholder="Provide a path, default is /"- />- </FormControl>- <FormControl label="Northflank Project" className="mt-4">- <Select- value={targetAppId}- onValueChange={(val) => setTargetAppId(val)}- className="w-full border border-border-strong"- isDisabled={integrationAuthApps.length === 0}- >- {integrationAuthApps.length > 0 ? (- integrationAuthApps.map((integrationAuthApp) => (- <SelectItem- value={integrationAuthApp.appId as string}- key={`target-environment-${integrationAuthApp.name}`}- >- {integrationAuthApp.name}- </SelectItem>- ))- ) : (- <SelectItem value="none" key="target-app-none">- No projects found- </SelectItem>- )}- </Select>- </FormControl>- {targetSecretGroupId !== "" && integrationAuthSecretGroups && (- <FormControl label="Secret Group" className="mt-4">+ <Card className="w-full max-w-lg">+ <CardHeader>+ <CardTitle>Northflank Integration</CardTitle>+ </CardHeader>+ <CardContent className="flex flex-col gap-4">+ <Field>+ <FieldLabel htmlFor="NorthflankConfigurePage-field-1">Project Environment</FieldLabel><Select- value={targetSecretGroupId}- onValueChange={(val) => setTargetSecretGroupId(val)}- className="w-full border border-border-strong"- isDisabled={integrationAuthSecretGroups.length === 0}+ value={selectedSourceEnvironment}+ onValueChange={(val) => setSelectedSourceEnvironment(val)}>- {integrationAuthSecretGroups.length > 0 ? (- integrationAuthSecretGroups.map((secretGroup: any) => (+ <SelectTrigger+ id="NorthflankConfigurePage-field-1"+ aria-describedby="NorthflankConfigurePage-field-1-feedback"+ className="w-full"+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {currentProject?.environments.map((sourceEnvironment) => (<SelectItem- value={secretGroup.groupId}- key={`target-secret-group-${secretGroup.groupId}`}+ value={sourceEnvironment.slug}+ key={`source-environment-${sourceEnvironment.slug}`}>- {secretGroup.name}+ {sourceEnvironment.name}</SelectItem>- ))- ) : (- <SelectItem value="none" key="target-secret-group-none">- No secret groups found- </SelectItem>- )}+ ))}+ </SelectContent></Select>- </FormControl>- )}- <Button- onClick={handleButtonClick}- colorSchema="secondary"- className="mt-4"- isLoading={isLoading}- isDisabled={integrationAuthApps.length === 0 || integrationAuthSecretGroups?.length === 0}- >- Create Integration- </Button>+ </Field>+ <Field>+ <FieldLabel htmlFor="NorthflankConfigurePage-field-2">Secrets Path</FieldLabel>+ <Input+ id="NorthflankConfigurePage-field-2"+ aria-describedby="NorthflankConfigurePage-field-2-feedback"+ value={secretPath}+ onChange={(evt) => setSecretPath(evt.target.value)}+ placeholder="Provide a path, default is /"+ />+ </Field>+ <Field>+ <FieldLabel htmlFor="NorthflankConfigurePage-field-3">Northflank Project</FieldLabel>+ <Select+ value={targetAppId}+ onValueChange={(val) => setTargetAppId(val)}+ disabled={integrationAuthApps.length === 0}+ >+ <SelectTrigger+ id="NorthflankConfigurePage-field-3"+ aria-describedby="NorthflankConfigurePage-field-3-feedback"+ className="w-full"+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {integrationAuthApps.length > 0 ? (+ integrationAuthApps.map((integrationAuthApp) => (+ <SelectItem+ value={integrationAuthApp.appId as string}+ key={`target-environment-${integrationAuthApp.name}`}+ >+ {integrationAuthApp.name}+ </SelectItem>+ ))+ ) : (+ <SelectItem value="none" key="target-app-none">+ No projects found+ </SelectItem>+ )}+ </SelectContent>+ </Select>+ </Field>+ {targetSecretGroupId !== "" && integrationAuthSecretGroups && (+ <Field>+ <FieldLabel htmlFor="NorthflankConfigurePage-field-4">Secret Group</FieldLabel>+ <Select+ value={targetSecretGroupId}+ onValueChange={(val) => setTargetSecretGroupId(val)}+ disabled={integrationAuthSecretGroups.length === 0}+ >+ <SelectTrigger+ id="NorthflankConfigurePage-field-4"+ aria-describedby="NorthflankConfigurePage-field-4-feedback"+ className="w-full"+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {integrationAuthSecretGroups.length > 0 ? (+ integrationAuthSecretGroups.map((secretGroup: any) => (+ <SelectItem+ value={secretGroup.groupId}+ key={`target-secret-group-${secretGroup.groupId}`}+ >+ {secretGroup.name}+ </SelectItem>+ ))+ ) : (+ <SelectItem value="none" key="target-secret-group-none">+ No secret groups found+ </SelectItem>+ )}+ </SelectContent>+ </Select>+ </Field>+ )}+ </CardContent>+ <CardFooter className="justify-end border-t pt-4">+ <Button+ onClick={handleButtonClick}+ isPending={isLoading}+ isDisabled={+ integrationAuthApps.length === 0 || integrationAuthSecretGroups?.length === 0+ }+ variant="project"+ >+ Create Integration+ </Button>+ </CardFooter></Card></div>) : (diff --git a/frontend/src/pages/secret-manager/integrations/OctopusDeployAuthorizePage/OctopusDeployAuthorizePage.tsx b/frontend/src/pages/secret-manager/integrations/OctopusDeployAuthorizePage/OctopusDeployAuthorizePage.tsxindex e2b990278e..12a480004f 100644--- a/frontend/src/pages/secret-manager/integrations/OctopusDeployAuthorizePage/OctopusDeployAuthorizePage.tsx+++ b/frontend/src/pages/secret-manager/integrations/OctopusDeployAuthorizePage/OctopusDeployAuthorizePage.tsx@@ -1,12 +1,23 @@import { Helmet } from "react-helmet";import { Controller, useForm } from "react-hook-form";-import { faArrowUpRightFromSquare, faBookOpen } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { zodResolver } from "@hookform/resolvers/zod";import { useNavigate } from "@tanstack/react-router";import { z } from "zod";-import { Button, Card, CardTitle, FormControl, Input } from "@app/components/v2";+import {+ Button,+ Card,+ CardContent,+ CardDescription,+ CardFooter,+ CardHeader,+ CardTitle,+ DocumentationLinkBadge,+ Field,+ FieldError,+ FieldLabel,+ Input+} from "@app/components/v3";import { useOrganization, useProject } from "@app/context";import { removeTrailingSlash } from "@app/helpers/string";import { useSaveIntegrationAccessToken } from "@app/hooks/api";@@ -55,80 +66,79 @@ export const OctopusDeployAuthorizePage = () => {<Helmet><title>Authorize Octopus Deploy Integration</title></Helmet>- <Card className="mb-12 max-w-lg rounded-md border border-border-control">- <CardTitle- className="px-6 text-left text-xl"- subTitle="After adding your credentials, you will be prompted to set up an integration for a particular environment and secret path."- >- <div className="flex flex-row items-center">- <div className="inline-flex items-center pb-0.5">- <img- src="/images/integrations/Octopus Deploy.png"- height={30}- width={30}- alt="Octopus Deploy logo"- />- </div>- <span className="ml-1.5">Octopus Deploy Integration</span>- <a- href="https://infisical.com/docs/integrations/cloud/octopus-deploy"- target="_blank"- rel="noopener noreferrer"- >- <div className="mb-1 ml-2 inline-block cursor-default rounded-md bg-warning/20 px-1.5 pt-[0.04rem] pb-[0.03rem] text-sm text-warning opacity-80 hover:opacity-100">- <FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />- Docs- <FontAwesomeIcon- icon={faArrowUpRightFromSquare}- className="text-xxs mb-[0.07rem] ml-1.5"+ <Card className="w-full max-w-lg">+ <CardHeader>+ <CardTitle>+ <img+ src="/images/integrations/Octopus Deploy.png"+ height={30}+ width={30}+ alt="Octopus Deploy logo"+ />+ Octopus Deploy Integration+ <DocumentationLinkBadge href="https://infisical.com/docs/integrations/cloud/octopus-deploy" />+ </CardTitle>+ <CardDescription>+ After adding your credentials, you will be prompted to set up an integration for a+ particular environment and secret path.+ </CardDescription>+ </CardHeader>+ <CardContent className="flex flex-col gap-4">+ <Controller+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="OctopusDeployAuthorizePage-field-1">+ Octopus Deploy Instance URL+ </FieldLabel>+ <Input+ id="OctopusDeployAuthorizePage-field-1"+ aria-describedby="OctopusDeployAuthorizePage-field-1-feedback"+ isError={Boolean(error)}+ value={value}+ onChange={onChange}+ placeholder="https://xxxx.octopus.app"/>- </div>- </a>- </div>- </CardTitle>- <Controller- render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- label="Octopus Deploy Instance URL"- errorText={error?.message}- isError={Boolean(error)}- className="px-6"- >- <Input value={value} onChange={onChange} placeholder="https://xxxx.octopus.app" />- </FormControl>- )}- name="instanceUrl"- control={control}- />- <Controller- render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- label="Octopus Deploy API Key"- errorText={error?.message}- isError={Boolean(error)}- className="px-6"- >- <Input- value={value}- onChange={onChange}- placeholder="API-XXXXXXXXXXXXXXXXXXXXXXXX"- type="password"- />- </FormControl>- )}- name="apiKey"- control={control}- />- <Button- type="submit"- colorSchema="primary"- variant="outline_bg"- className="mt-2 mr-6 mb-6 ml-auto w-min"- isLoading={isPending}- isDisabled={isPending}- >- Connect to Octopus Deploy- </Button>+ {Boolean(error) && (+ <FieldError id="OctopusDeployAuthorizePage-field-1-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>+ )}+ name="instanceUrl"+ control={control}+ />+ <Controller+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="OctopusDeployAuthorizePage-field-2">+ Octopus Deploy API Key+ </FieldLabel>+ <Input+ id="OctopusDeployAuthorizePage-field-2"+ aria-describedby="OctopusDeployAuthorizePage-field-2-feedback"+ isError={Boolean(error)}+ value={value}+ onChange={onChange}+ placeholder="API-XXXXXXXXXXXXXXXXXXXXXXXX"+ type="password"+ />+ {Boolean(error) && (+ <FieldError id="OctopusDeployAuthorizePage-field-2-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>+ )}+ name="apiKey"+ control={control}+ />+ </CardContent>+ <CardFooter className="justify-end border-t pt-4">+ <Button type="submit" isPending={isPending} isDisabled={isPending} variant="project">+ Connect to Octopus Deploy+ </Button>+ </CardFooter></Card></form>);diff --git a/frontend/src/pages/secret-manager/integrations/OctopusDeployConfigurePage/OctopusDeployConfigurePage.tsx b/frontend/src/pages/secret-manager/integrations/OctopusDeployConfigurePage/OctopusDeployConfigurePage.tsxindex 3e9dd26c50..ab212f029d 100644--- a/frontend/src/pages/secret-manager/integrations/OctopusDeployConfigurePage/OctopusDeployConfigurePage.tsx+++ b/frontend/src/pages/secret-manager/integrations/OctopusDeployConfigurePage/OctopusDeployConfigurePage.tsx@@ -6,9 +6,21 @@ import { useNavigate, useSearch } from "@tanstack/react-router";import { z } from "zod";import { createNotification } from "@app/components/notifications";-import { Button, Card, CardTitle, FilterableSelect, FormControl } from "@app/components/v2";-import { SecretPathInput } from "@app/components/v2/SecretPathInput";-import { Spinner } from "@app/components/v3";+import {+ Button,+ Card,+ CardContent,+ CardFooter,+ CardHeader,+ CardTitle,+ Combobox,+ Field,+ FieldError,+ FieldLabel,+ FieldSeparator,+ SecretPathInput,+ Spinner+} from "@app/components/v3";import { ROUTE_PATHS } from "@app/const/routes";import { useOrganization, useProject } from "@app/context";import { useCreateIntegration, useGetIntegrationAuthApps } from "@app/hooks/api";@@ -163,97 +175,123 @@ export const OctopusDeployConfigurePage = () => {onSubmit={handleSubmit(onSubmit)}className="flex h-full w-full items-center justify-center">- <Card className="max-w-4xl rounded-md p-8 pt-4">- <CardTitle className="text-center">- <SiOctopusdeploy size="1.2rem" className="mr-2 mb-1 inline-block" />- Octopus Deploy Integration- </CardTitle>- <div className="grid grid-cols-2 gap-4">+ <Card className="w-full max-w-4xl">+ <CardHeader>+ <CardTitle>+ <SiOctopusdeploy size="1.2rem" />+ Octopus Deploy Integration+ </CardTitle>+ </CardHeader>+ <CardContent className="grid grid-cols-2 gap-4"><Controllercontrol={control}name="sourceEnvironment"render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error)}- label="Project Environment"- >- <FilterableSelect+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="OctopusDeployConfigurePage-field-1">+ Project Environment+ </FieldLabel>+ <Combobox+ id="OctopusDeployConfigurePage-field-1"+ aria-describedby="OctopusDeployConfigurePage-field-1-feedback"+ isError={Boolean(error)}getOptionValue={(option) => option.slug}value={value}getOptionLabel={(option) => option.name}- onChange={onChange}+ onValueChange={onChange}options={currentProject?.environments}+ isClearable={false}+ includeMissingSelectedOptions={false}placeholder="Select a project environment"isDisabled={!currentProject?.environments.length}/>- </FormControl>+ {Boolean(error) && (+ <FieldError id="OctopusDeployConfigurePage-field-1-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>)}/><Controllercontrol={control}name="secretPath"render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} label="Secrets Path">+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="OctopusDeployConfigurePage-field-2">Secrets Path</FieldLabel><SecretPathInput+ id="OctopusDeployConfigurePage-field-2"+ aria-describedby="OctopusDeployConfigurePage-field-2-feedback"+ isError={Boolean(error)}placeholder="/"environment={sourceEnv?.slug}value={value}onChange={onChange}/>- </FormControl>+ </Field>)}/>- <div className="col-span-2 flex w-full flex-row items-center pb-2">- <div className="w-full border-t border-border-strong" />- <span className="mx-2 text-xs whitespace-nowrap text-muted">Sync To</span>- <div className="w-full border-t border-border-strong" />- </div>+ <FieldSeparator className="col-span-2">Sync To</FieldSeparator><Controllercontrol={control}name="targetSpace"render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error)}- label="Octopus Deploy Space"- >- <FilterableSelect+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="OctopusDeployConfigurePage-field-3">+ Octopus Deploy Space+ </FieldLabel>+ <Combobox+ id="OctopusDeployConfigurePage-field-3"+ aria-describedby="OctopusDeployConfigurePage-field-3-feedback"+ isError={Boolean(error)}getOptionValue={(option) => option.Id}value={value}getOptionLabel={(option) => option.Name}- onChange={onChange}+ onValueChange={onChange}options={octopusDeploySpaces}+ isClearable={false}+ includeMissingSelectedOptions={false}placeholder={octopusDeploySpaces?.length ? "Select a space..." : "No spaces found..."}isDisabled={!octopusDeploySpaces?.length}/>- </FormControl>+ {Boolean(error) && (+ <FieldError id="OctopusDeployConfigurePage-field-3-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>)}/><Controllercontrol={control}name="targetResource"render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error)}- className="capitalize"- label={`Octopus Deploy ${currentScope}`}- >- <FilterableSelect+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="OctopusDeployConfigurePage-field-4">{`Octopus Deploy ${currentScope}`}</FieldLabel>+ <Combobox+ id="OctopusDeployConfigurePage-field-4"+ aria-describedby="OctopusDeployConfigurePage-field-4-feedback"+ isError={Boolean(error)}getOptionValue={(option) => option.appId!}value={value}getOptionLabel={(option) => option.name}- onChange={onChange}+ onValueChange={onChange}options={octopusDeployResources}+ isClearable={false}+ includeMissingSelectedOptions={false}placeholder={octopusDeployResources?.length ? "Select a project..." : "No projects found..."}isDisabled={!octopusDeployResources?.length}/>- </FormControl>+ {Boolean(error) && (+ <FieldError id="OctopusDeployConfigurePage-field-4-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>)}/>@@ -261,20 +299,23 @@ export const OctopusDeployConfigurePage = () => {control={control}name="targetEnvironments"render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error)}- label="Octopus Deploy Environments"- isOptional- >- <FilterableSelect- isMulti+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="OctopusDeployConfigurePage-field-5">+ Octopus Deploy Environments+ <span className="text-xs text-accent italic">- Optional</span>+ </FieldLabel>+ <Combobox+ id="OctopusDeployConfigurePage-field-5"+ aria-describedby="OctopusDeployConfigurePage-field-5-feedback"+ isError={Boolean(error)}+ multiplegetOptionValue={(option) => option.Name}value={value}getOptionLabel={(option) => option.Name}- onChange={onChange}+ onValueChange={onChange}isLoading={isOctopusDeployScopeValuesLoading}options={octopusDeployScopeValues?.Environments}+ includeMissingSelectedOptions={false}placeholder={octopusDeployScopeValues?.Environments?.length? "Select environments..."@@ -282,27 +323,35 @@ export const OctopusDeployConfigurePage = () => {}isDisabled={!octopusDeployScopeValues?.Environments?.length}/>- </FormControl>+ {Boolean(error) && (+ <FieldError id="OctopusDeployConfigurePage-field-5-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>)}/><Controllercontrol={control}name="targetRoles"render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error)}- label="Octopus Deploy Target Tags"- isOptional- >- <FilterableSelect- isMulti+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="OctopusDeployConfigurePage-field-6">+ Octopus Deploy Target Tags+ <span className="text-xs text-accent italic">- Optional</span>+ </FieldLabel>+ <Combobox+ id="OctopusDeployConfigurePage-field-6"+ aria-describedby="OctopusDeployConfigurePage-field-6-feedback"+ isError={Boolean(error)}+ multiplegetOptionValue={(option) => option.Name}value={value}getOptionLabel={(option) => option.Name}- onChange={onChange}+ onValueChange={onChange}isLoading={isOctopusDeployScopeValuesLoading}options={octopusDeployScopeValues?.Roles}+ includeMissingSelectedOptions={false}placeholder={octopusDeployScopeValues?.Roles?.length? "Select target tags..."@@ -310,27 +359,35 @@ export const OctopusDeployConfigurePage = () => {}isDisabled={!octopusDeployScopeValues?.Roles?.length}/>- </FormControl>+ {Boolean(error) && (+ <FieldError id="OctopusDeployConfigurePage-field-6-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>)}/><Controllercontrol={control}name="targetMachines"render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error)}- label="Octopus Deploy Targets"- isOptional- >- <FilterableSelect- isMulti+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="OctopusDeployConfigurePage-field-7">+ Octopus Deploy Targets+ <span className="text-xs text-accent italic">- Optional</span>+ </FieldLabel>+ <Combobox+ id="OctopusDeployConfigurePage-field-7"+ aria-describedby="OctopusDeployConfigurePage-field-7-feedback"+ isError={Boolean(error)}+ multiplegetOptionValue={(option) => option.Name}value={value}getOptionLabel={(option) => option.Name}- onChange={onChange}+ onValueChange={onChange}isLoading={isOctopusDeployScopeValuesLoading}options={octopusDeployScopeValues?.Machines}+ includeMissingSelectedOptions={false}placeholder={octopusDeployScopeValues?.Machines?.length? "Select targets..."@@ -338,27 +395,35 @@ export const OctopusDeployConfigurePage = () => {}isDisabled={!octopusDeployScopeValues?.Machines?.length}/>- </FormControl>+ {Boolean(error) && (+ <FieldError id="OctopusDeployConfigurePage-field-7-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>)}/><Controllercontrol={control}name="targetProcesses"render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error)}- label="Octopus Deploy Processes"- isOptional- >- <FilterableSelect- isMulti+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="OctopusDeployConfigurePage-field-8">+ Octopus Deploy Processes+ <span className="text-xs text-accent italic">- Optional</span>+ </FieldLabel>+ <Combobox+ id="OctopusDeployConfigurePage-field-8"+ aria-describedby="OctopusDeployConfigurePage-field-8-feedback"+ isError={Boolean(error)}+ multiplegetOptionValue={(option) => option.Name}value={value}getOptionLabel={(option) => option.Name}- onChange={onChange}+ onValueChange={onChange}isLoading={isOctopusDeployScopeValuesLoading}options={octopusDeployScopeValues?.Processes}+ includeMissingSelectedOptions={false}placeholder={octopusDeployScopeValues?.Processes?.length? "Select processes..."@@ -366,27 +431,35 @@ export const OctopusDeployConfigurePage = () => {}isDisabled={!octopusDeployScopeValues?.Processes?.length}/>- </FormControl>+ {Boolean(error) && (+ <FieldError id="OctopusDeployConfigurePage-field-8-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>)}/><Controllercontrol={control}name="targetActions"render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error)}- label="Octopus Deploy Deployment Steps"- isOptional- >- <FilterableSelect- isMulti+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="OctopusDeployConfigurePage-field-9">+ Octopus Deploy Deployment Steps+ <span className="text-xs text-accent italic">- Optional</span>+ </FieldLabel>+ <Combobox+ id="OctopusDeployConfigurePage-field-9"+ aria-describedby="OctopusDeployConfigurePage-field-9-feedback"+ isError={Boolean(error)}+ multiplegetOptionValue={(option) => option.Name}value={value}getOptionLabel={(option) => option.Name}- onChange={onChange}+ onValueChange={onChange}isLoading={isOctopusDeployScopeValuesLoading}options={octopusDeployScopeValues?.Actions}+ includeMissingSelectedOptions={false}placeholder={octopusDeployScopeValues?.Actions?.length? "Select deployment steps..."@@ -394,27 +467,35 @@ export const OctopusDeployConfigurePage = () => {}isDisabled={!octopusDeployScopeValues?.Actions?.length}/>- </FormControl>+ {Boolean(error) && (+ <FieldError id="OctopusDeployConfigurePage-field-9-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>)}/><Controllercontrol={control}name="targetChannels"render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error)}- label="Octopus Deploy Channels"- isOptional- >- <FilterableSelect- isMulti+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="OctopusDeployConfigurePage-field-10">+ Octopus Deploy Channels+ <span className="text-xs text-accent italic">- Optional</span>+ </FieldLabel>+ <Combobox+ id="OctopusDeployConfigurePage-field-10"+ aria-describedby="OctopusDeployConfigurePage-field-10-feedback"+ isError={Boolean(error)}+ multiplegetOptionValue={(option) => option.Name}value={value}getOptionLabel={(option) => option.Name}- onChange={onChange}+ onValueChange={onChange}isLoading={isOctopusDeployScopeValuesLoading}options={octopusDeployScopeValues?.Channels}+ includeMissingSelectedOptions={false}placeholder={octopusDeployScopeValues?.Channels?.length? "Select channels..."@@ -422,19 +503,25 @@ export const OctopusDeployConfigurePage = () => {}isDisabled={!octopusDeployScopeValues?.Channels?.length}/>- </FormControl>+ {Boolean(error) && (+ <FieldError id="OctopusDeployConfigurePage-field-10-feedback">+ {error?.message}+ </FieldError>+ )}+ </Field>)}/>- </div>- <Button- type="submit"- colorSchema="primary"- className="mt-4"- isLoading={createIntegration.isPending}- isDisabled={createIntegration.isPending || !octopusDeployResources?.length}- >- Create Integration- </Button>+ </CardContent>+ <CardFooter className="justify-end border-t pt-4">+ <Button+ type="submit"+ isPending={createIntegration.isPending}+ isDisabled={createIntegration.isPending || !octopusDeployResources?.length}+ variant="project"+ >+ Create Integration+ </Button>+ </CardFooter></Card></form>);diff --git a/frontend/src/pages/secret-manager/integrations/QoveryAuthorizePage/QoveryAuthorizePage.tsx b/frontend/src/pages/secret-manager/integrations/QoveryAuthorizePage/QoveryAuthorizePage.tsxindex 1482a341f6..e80741799b 100644--- a/frontend/src/pages/secret-manager/integrations/QoveryAuthorizePage/QoveryAuthorizePage.tsx+++ b/frontend/src/pages/secret-manager/integrations/QoveryAuthorizePage/QoveryAuthorizePage.tsx@@ -1,21 +1,31 @@import { useState } from "react";import { Helmet } from "react-helmet";-import { faArrowUpRightFromSquare, faBookOpen } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { useNavigate } from "@tanstack/react-router";-import { Button, Card, CardTitle, FormControl, Input } from "@app/components/v2";+import {+ Button,+ Card,+ CardContent,+ CardDescription,+ CardFooter,+ CardHeader,+ CardTitle,+ DocumentationLinkBadge,+ Field,+ FieldError,+ FieldLabel,+ Input+} from "@app/components/v3";import { useOrganization, useProject } from "@app/context";import { useSaveIntegrationAccessToken } from "@app/hooks/api";export const QoveryAuthorizePage = () => {const navigate = useNavigate();const { currentProject } = useProject();- const { mutateAsync } = useSaveIntegrationAccessToken();+ const { mutateAsync, isPending: isLoading } = useSaveIntegrationAccessToken();const { currentOrg } = useOrganization();const [accessToken, setAccessToken] = useState("");const [accessTokenErrorText, setAccessTokenErrorText] = useState("");- const [isLoading, setIsLoading] = useState(false);const handleButtonClick = async () => {try {@@ -25,16 +35,12 @@ export const QoveryAuthorizePage = () => {return;}- setIsLoading(true);-const integrationAuth = await mutateAsync({workspaceId: currentProject.id,integration: "qovery",accessToken});- setIsLoading(false);-navigate({to: "/organizations/$orgId/projects/secret-management/$projectId/integrations/qovery/create",params: {@@ -55,56 +61,43 @@ export const QoveryAuthorizePage = () => {<Helmet><title>Authorize Qovery Integration</title></Helmet>- <Card className="mb-12 max-w-lg rounded-md border border-border-control">- <CardTitle- className="px-6 text-left text-xl"- subTitle="After adding your API key, you will be prompted to set up an integration for a particular Infisical project and environment."- >- <div className="flex flex-row items-center">- <div className="flex items-center pb-0.5">- <img src="/images/integrations/Qovery.png" height={30} width={30} alt="Qovery logo" />- </div>- <span className="ml-2.5">Qovery Integration </span>- <a- href="https://infisical.com/docs/integrations/cloud/qovery"- target="_blank"- rel="noopener noreferrer"- >- <div className="mb-1 ml-2 inline-block cursor-default rounded-md bg-warning/20 px-1.5 pt-[0.04rem] pb-[0.03rem] text-sm text-warning opacity-80 hover:opacity-100">- <FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />- Docs- <FontAwesomeIcon- icon={faArrowUpRightFromSquare}- className="text-xxs mb-[0.07rem] ml-1.5"- />- </div>- </a>- </div>- </CardTitle>- <FormControl- label="Qovery API token"- errorText={accessTokenErrorText}- isError={accessTokenErrorText !== ""}- className="mx-6"- >- <Input- placeholder=""- value={accessToken}- type="password"- autoComplete="new-password"- onChange={(e) => setAccessToken(e.target.value)}- />- </FormControl>- <Button- onClick={handleButtonClick}- colorSchema="primary"- variant="outline_bg"- className="mt-2 mr-6 mb-6 ml-auto w-min"- isFullWidth={false}- isLoading={isLoading}- >- Connect to Qovery- </Button>+ <Card className="w-full max-w-lg">+ <CardHeader>+ <CardTitle>+ <img src="/images/integrations/Qovery.png" height={30} width={30} alt="Qovery logo" />+ Qovery Integration+ <DocumentationLinkBadge href="https://infisical.com/docs/integrations/cloud/qovery" />+ </CardTitle>+ <CardDescription>+ After adding your API key, you will be prompted to set up an integration for a+ particular Infisical project and environment.+ </CardDescription>+ </CardHeader>+ <CardContent className="flex flex-col gap-4">+ <Field data-invalid={accessTokenErrorText !== ""}>+ <FieldLabel htmlFor="QoveryAuthorizePage-field-1">Qovery API token</FieldLabel>+ <Input+ id="QoveryAuthorizePage-field-1"+ aria-describedby="QoveryAuthorizePage-field-1-feedback"+ isError={accessTokenErrorText !== ""}+ placeholder=""+ value={accessToken}+ type="password"+ autoComplete="new-password"+ onChange={(e) => setAccessToken(e.target.value)}+ />+ {accessTokenErrorText !== "" && (+ <FieldError id="QoveryAuthorizePage-field-1-feedback">+ {accessTokenErrorText}+ </FieldError>+ )}+ </Field>+ </CardContent>+ <CardFooter className="justify-end border-t pt-4">+ <Button onClick={handleButtonClick} isPending={isLoading} variant="project">+ Connect to Qovery+ </Button>+ </CardFooter></Card></div>);diff --git a/frontend/src/pages/secret-manager/integrations/QoveryConfigurePage/QoveryConfigurePage.tsx b/frontend/src/pages/secret-manager/integrations/QoveryConfigurePage/QoveryConfigurePage.tsxindex fa099d0622..ea0e815b0e 100644--- a/frontend/src/pages/secret-manager/integrations/QoveryConfigurePage/QoveryConfigurePage.tsx+++ b/frontend/src/pages/secret-manager/integrations/QoveryConfigurePage/QoveryConfigurePage.tsx@@ -1,6 +1,6 @@import { useEffect, useState } from "react";import { Helmet } from "react-helmet";-import { faArrowUpRightFromSquare, faBookOpen, faBugs } from "@fortawesome/free-solid-svg-icons";+import { faBugs } from "@fortawesome/free-solid-svg-icons";import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { useNavigate, useSearch } from "@tanstack/react-router";import { motion } from "motion/react";@@ -8,16 +8,25 @@ import { motion } from "motion/react";import {Button,Card,+ CardContent,+ CardDescription,+ CardFooter,+ CardHeader,CardTitle,- FormControl,+ DocumentationLinkBadge,+ Field,+ FieldLabel,Input,Select,+ SelectContent,SelectItem,- Tab,- TabList,- TabPanel,- Tabs-} from "@app/components/v2";+ SelectTrigger,+ SelectValue,+ Tabs,+ TabsContent,+ TabsList,+ TabsTrigger+} from "@app/components/v3";import { ROUTE_PATHS } from "@app/const/routes";import { useOrganization, useProject } from "@app/context";import { useCreateIntegration } from "@app/hooks/api";@@ -56,7 +65,7 @@ export const QoveryConfigurePage = () => {const navigate = useNavigate();const { currentOrg } = useOrganization();const { currentProject } = useProject();- const { mutateAsync } = useCreateIntegration();+ const { mutateAsync, isPending: isLoading } = useCreateIntegration();const integrationAuthId = useSearch({from: ROUTE_PATHS.SecretManager.Integratons.QoveryConfigurePage.id,@@ -96,8 +105,6 @@ export const QoveryConfigurePage = () => {});const [targetAppId, setTargetAppId] = useState("");- const [isLoading, setIsLoading] = useState(false);-useEffect(() => {if (integrationAuthApps) {if (integrationAuthApps.length > 0) {@@ -142,8 +149,6 @@ export const QoveryConfigurePage = () => {try {if (!integrationAuth?.id) return;- setIsLoading(true);-const targetOrg = integrationAuthOrgs?.find((integrationAuthOrg) => integrationAuthOrg.orgId === targetOrgId)?.name;@@ -173,8 +178,6 @@ export const QoveryConfigurePage = () => {secretPath});- setIsLoading(false);-navigate({to: "/organizations/$orgId/projects/secret-management/$projectId/integrations",params: {@@ -191,210 +194,255 @@ export const QoveryConfigurePage = () => {};return integrationAuth && selectedSourceEnvironment ? (- <div className="flex h-full w-full flex-col items-center justify-center bg-linear-to-tr from-surface-base to-page-deep">+ <div className="flex h-full w-full flex-col items-center justify-center"><Helmet><title>Set Up Qovery Integration</title></Helmet>- <Card className="max-w-lg rounded-md border border-border-control p-0">- <CardTitle- className="px-6 text-left text-xl"- subTitle="Choose which environment in Infisical you want to sync to Checkly environment variables."- >- <div className="flex flex-row items-center">- <div className="flex items-center pb-0.5">- <img src="/images/integrations/Qovery.png" height={30} width={30} alt="Qovery logo" />- </div>- <span className="ml-2.5">Qovery Integration </span>- <a- href="https://infisical.com/docs/integrations/cloud/qovery"- target="_blank"- rel="noopener noreferrer"- >- <div className="mb-1 ml-2 inline-block cursor-default rounded-md bg-warning/20 px-1.5 pt-[0.04rem] pb-[0.03rem] text-sm text-warning opacity-80 hover:opacity-100">- <FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />- Docs- <FontAwesomeIcon- icon={faArrowUpRightFromSquare}- className="text-xxs mb-[0.07rem] ml-1.5"- />- </div>- </a>- </div>- </CardTitle>- <Tabs defaultValue={TabSections.InfisicalSettings} className="px-6">- <TabList>- <div className="flex w-full flex-row border-b border-border-control">- <Tab value={TabSections.InfisicalSettings}>Infisical Settings</Tab>- <Tab value={TabSections.QoverySettings}>Qovery Settings</Tab>- </div>- </TabList>- <TabPanel value={TabSections.InfisicalSettings}>- <motion.div- key="panel-1"- transition={{ duration: 0.15 }}- initial={{ opacity: 0, translateX: 30 }}- animate={{ opacity: 1, translateX: 0 }}- exit={{ opacity: 0, translateX: 30 }}- >- <FormControl label="Infisical Project Environment">- <Select- value={selectedSourceEnvironment}- onValueChange={(val) => setSelectedSourceEnvironment(val)}- className="w-full border border-border-strong"- >- {currentProject?.environments.map((sourceEnvironment) => (- <SelectItem- value={sourceEnvironment.slug}- key={`source-environment-${sourceEnvironment.slug}`}- >- {sourceEnvironment.name}- </SelectItem>- ))}- </Select>- </FormControl>- <FormControl label="Secrets Path" className="pb-[14.68rem]">- <Input- value={secretPath}- onChange={(evt) => setSecretPath(evt.target.value)}- placeholder="Provide a path, default is /"- />- </FormControl>- </motion.div>- </TabPanel>- <TabPanel value={TabSections.QoverySettings}>- <motion.div- key="panel-1"- transition={{ duration: 0.15 }}- initial={{ opacity: 0, translateX: -30 }}- animate={{ opacity: 1, translateX: 0 }}- exit={{ opacity: 0, translateX: 30 }}- >- <FormControl label="Qovery Scope">- <Select- value={scope}- onValueChange={(val) => setScope(val)}- className="w-full border border-border-strong"- >- {qoveryScopes.map((qoveryScope) => (- <SelectItem value={qoveryScope.value} key={`target-app-${qoveryScope.value}`}>- {qoveryScope.label}- </SelectItem>- ))}- </Select>- </FormControl>- {integrationAuthOrgs && (- <FormControl label="Qovery Organization">- <Select- value={targetOrgId}- onValueChange={(val) => setTargetOrgId(val)}- className="w-full border border-border-strong"- isDisabled={integrationAuthOrgs.length === 0}- >- {integrationAuthOrgs.length > 0 ? (- integrationAuthOrgs.map((integrationAuthOrg) => (- <SelectItem- value={integrationAuthOrg.orgId}- key={`target-app-${integrationAuthOrg.orgId}`}- >- {integrationAuthOrg.name}- </SelectItem>- ))- ) : (- <SelectItem value="none" key="target-app-none">- No organizaztions found- </SelectItem>- )}- </Select>- </FormControl>- )}- {integrationAuthProjects && (- <FormControl label="Qovery Project">- <Select- value={targetProjectId}- onValueChange={(val) => setTargetProjectId(val)}- className="w-full border border-border-strong"- isDisabled={integrationAuthProjects.length === 0}- >- {integrationAuthProjects.length > 0 ? (- integrationAuthProjects.map((integrationAuthProject) => (- <SelectItem- value={integrationAuthProject.projectId}- key={`target-app-${integrationAuthProject.projectId}`}- >- {integrationAuthProject.name}- </SelectItem>- ))- ) : (- <SelectItem value="none" key="target-app-none">- No projects found- </SelectItem>- )}- </Select>- </FormControl>- )}- {integrationAuthEnvironments && (- <FormControl label="Qovery Environment">+ <Card className="w-full max-w-lg">+ <CardHeader>+ <CardTitle>+ <img src="/images/integrations/Qovery.png" height={30} width={30} alt="Qovery logo" />+ Qovery Integration+ <DocumentationLinkBadge href="https://infisical.com/docs/integrations/cloud/qovery" />+ </CardTitle>+ <CardDescription>+ Choose which environment in Infisical you want to sync to Checkly environment variables.+ </CardDescription>+ </CardHeader>+ <CardContent>+ <Tabs defaultValue={TabSections.InfisicalSettings}>+ <TabsList variant="project">+ <TabsTrigger value={TabSections.InfisicalSettings}>Infisical Settings</TabsTrigger>+ <TabsTrigger value={TabSections.QoverySettings}>Qovery Settings</TabsTrigger>+ </TabsList>+ <TabsContent value={TabSections.InfisicalSettings}>+ <motion.div+ key="panel-1"+ className="flex flex-col gap-4"+ transition={{ duration: 0.15 }}+ initial={{ opacity: 0, translateX: 30 }}+ animate={{ opacity: 1, translateX: 0 }}+ exit={{ opacity: 0, translateX: 30 }}+ >+ <Field>+ <FieldLabel htmlFor="QoveryConfigurePage-field-1">+ Infisical Project Environment+ </FieldLabel><Select- value={targetEnvironmentId}- onValueChange={(val) => setTargetEnvironmentId(val)}- className="w-full border border-border-strong"- isDisabled={integrationAuthEnvironments.length === 0}+ value={selectedSourceEnvironment}+ onValueChange={(val) => setSelectedSourceEnvironment(val)}>- {integrationAuthEnvironments.length > 0 ? (- integrationAuthEnvironments.map((integrationAuthEnvironment) => (+ <SelectTrigger+ id="QoveryConfigurePage-field-1"+ aria-describedby="QoveryConfigurePage-field-1-feedback"+ className="w-full"+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {currentProject?.environments.map((sourceEnvironment) => (<SelectItem- value={integrationAuthEnvironment.environmentId}- key={`target-app-${integrationAuthEnvironment.environmentId}`}+ value={sourceEnvironment.slug}+ key={`source-environment-${sourceEnvironment.slug}`}>- {integrationAuthEnvironment.name}+ {sourceEnvironment.name}</SelectItem>- ))- ) : (- <SelectItem value="none" key="target-app-none">- No environments found- </SelectItem>- )}+ ))}+ </SelectContent></Select>- </FormControl>- )}- {scope && integrationAuthApps && (- <FormControl label={`Qovery ${scope.charAt(0).toUpperCase() + scope.slice(1)}`}>- <Select- value={targetAppId}- onValueChange={(val) => setTargetAppId(val)}- className="w-full border border-border-strong"- isDisabled={integrationAuthApps.length === 0}- >- {integrationAuthApps.length > 0 ? (- integrationAuthApps.map((integrationAuthApp) => (+ </Field>+ <Field>+ <FieldLabel htmlFor="QoveryConfigurePage-field-2">Secrets Path</FieldLabel>+ <Input+ id="QoveryConfigurePage-field-2"+ aria-describedby="QoveryConfigurePage-field-2-feedback"+ value={secretPath}+ onChange={(evt) => setSecretPath(evt.target.value)}+ placeholder="Provide a path, default is /"+ />+ </Field>+ </motion.div>+ </TabsContent>+ <TabsContent value={TabSections.QoverySettings}>+ <motion.div+ key="panel-1"+ className="flex flex-col gap-4"+ transition={{ duration: 0.15 }}+ initial={{ opacity: 0, translateX: -30 }}+ animate={{ opacity: 1, translateX: 0 }}+ exit={{ opacity: 0, translateX: 30 }}+ >+ <Field>+ <FieldLabel htmlFor="QoveryConfigurePage-field-3">Qovery Scope</FieldLabel>+ <Select value={scope} onValueChange={(val) => setScope(val)}>+ <SelectTrigger+ id="QoveryConfigurePage-field-3"+ aria-describedby="QoveryConfigurePage-field-3-feedback"+ className="w-full"+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {qoveryScopes.map((qoveryScope) => (<SelectItem- value={integrationAuthApp.appId as string}- key={`target-app-${integrationAuthApp.appId}`}+ value={qoveryScope.value}+ key={`target-app-${qoveryScope.value}`}>- {integrationAuthApp.name}+ {qoveryScope.label}</SelectItem>- ))- ) : (- <SelectItem value="none" key="target-app-none">- No {scope}s found- </SelectItem>- )}+ ))}+ </SelectContent></Select>- </FormControl>- )}- </motion.div>- </TabPanel>- </Tabs>- <Button- onClick={handleButtonClick}- colorSchema="secondary"- variant="outline_bg"- className="mr-6 mb-6 ml-auto"- isFullWidth={false}- isLoading={isLoading}- >- Create Integration- </Button>+ </Field>+ {integrationAuthOrgs && (+ <Field>+ <FieldLabel htmlFor="QoveryConfigurePage-field-4">+ Qovery Organization+ </FieldLabel>+ <Select+ value={targetOrgId}+ onValueChange={(val) => setTargetOrgId(val)}+ disabled={integrationAuthOrgs.length === 0}+ >+ <SelectTrigger+ id="QoveryConfigurePage-field-4"+ aria-describedby="QoveryConfigurePage-field-4-feedback"+ className="w-full"+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {integrationAuthOrgs.length > 0 ? (+ integrationAuthOrgs.map((integrationAuthOrg) => (+ <SelectItem+ value={integrationAuthOrg.orgId}+ key={`target-app-${integrationAuthOrg.orgId}`}+ >+ {integrationAuthOrg.name}+ </SelectItem>+ ))+ ) : (+ <SelectItem value="none" key="target-app-none">+ No organizaztions found+ </SelectItem>+ )}+ </SelectContent>+ </Select>+ </Field>+ )}+ {integrationAuthProjects && (+ <Field>+ <FieldLabel htmlFor="QoveryConfigurePage-field-5">Qovery Project</FieldLabel>+ <Select+ value={targetProjectId}+ onValueChange={(val) => setTargetProjectId(val)}+ disabled={integrationAuthProjects.length === 0}+ >+ <SelectTrigger+ id="QoveryConfigurePage-field-5"+ aria-describedby="QoveryConfigurePage-field-5-feedback"+ className="w-full"+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {integrationAuthProjects.length > 0 ? (+ integrationAuthProjects.map((integrationAuthProject) => (+ <SelectItem+ value={integrationAuthProject.projectId}+ key={`target-app-${integrationAuthProject.projectId}`}+ >+ {integrationAuthProject.name}+ </SelectItem>+ ))+ ) : (+ <SelectItem value="none" key="target-app-none">+ No projects found+ </SelectItem>+ )}+ </SelectContent>+ </Select>+ </Field>+ )}+ {integrationAuthEnvironments && (+ <Field>+ <FieldLabel htmlFor="QoveryConfigurePage-field-6">+ Qovery Environment+ </FieldLabel>+ <Select+ value={targetEnvironmentId}+ onValueChange={(val) => setTargetEnvironmentId(val)}+ disabled={integrationAuthEnvironments.length === 0}+ >+ <SelectTrigger+ id="QoveryConfigurePage-field-6"+ aria-describedby="QoveryConfigurePage-field-6-feedback"+ className="w-full"+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {integrationAuthEnvironments.length > 0 ? (+ integrationAuthEnvironments.map((integrationAuthEnvironment) => (+ <SelectItem+ value={integrationAuthEnvironment.environmentId}+ key={`target-app-${integrationAuthEnvironment.environmentId}`}+ >+ {integrationAuthEnvironment.name}+ </SelectItem>+ ))+ ) : (+ <SelectItem value="none" key="target-app-none">+ No environments found+ </SelectItem>+ )}+ </SelectContent>+ </Select>+ </Field>+ )}+ {scope && integrationAuthApps && (+ <Field>+ <FieldLabel htmlFor="QoveryConfigurePage-field-7">{`Qovery ${scope.charAt(0).toUpperCase() + scope.slice(1)}`}</FieldLabel>+ <Select+ value={targetAppId}+ onValueChange={(val) => setTargetAppId(val)}+ disabled={integrationAuthApps.length === 0}+ >+ <SelectTrigger+ id="QoveryConfigurePage-field-7"+ aria-describedby="QoveryConfigurePage-field-7-feedback"+ className="w-full"+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {integrationAuthApps.length > 0 ? (+ integrationAuthApps.map((integrationAuthApp) => (+ <SelectItem+ value={integrationAuthApp.appId as string}+ key={`target-app-${integrationAuthApp.appId}`}+ >+ {integrationAuthApp.name}+ </SelectItem>+ ))+ ) : (+ <SelectItem value="none" key="target-app-none">+ No {scope}s found+ </SelectItem>+ )}+ </SelectContent>+ </Select>+ </Field>+ )}+ </motion.div>+ </TabsContent>+ </Tabs>+ </CardContent>+ <CardFooter className="justify-end border-t pt-4">+ <Button onClick={handleButtonClick} isPending={isLoading} variant="project">+ Create Integration+ </Button>+ </CardFooter></Card>{/* <div className="border-t border-border-faint w-full max-w-md mt-6"/><div className="flex flex-col bg-surface-raised border border-border-control w-full p-4 max-w-lg mt-6 rounded-md">diff --git a/frontend/src/pages/secret-manager/integrations/RailwayAuthorizePage/RailwayAuthorizePage.tsx b/frontend/src/pages/secret-manager/integrations/RailwayAuthorizePage/RailwayAuthorizePage.tsxindex 6faa53f676..7d8038ff5e 100644--- a/frontend/src/pages/secret-manager/integrations/RailwayAuthorizePage/RailwayAuthorizePage.tsx+++ b/frontend/src/pages/secret-manager/integrations/RailwayAuthorizePage/RailwayAuthorizePage.tsx@@ -1,18 +1,28 @@import { useState } from "react";import { useNavigate } from "@tanstack/react-router";-import { Button, Card, CardTitle, FormControl, Input } from "@app/components/v2";+import {+ Button,+ Card,+ CardContent,+ CardFooter,+ CardHeader,+ CardTitle,+ Field,+ FieldError,+ FieldLabel,+ Input+} from "@app/components/v3";import { useOrganization, useProject } from "@app/context";import { useSaveIntegrationAccessToken } from "@app/hooks/api";export const RailwayAuthorizePage = () => {const navigate = useNavigate();- const { mutateAsync } = useSaveIntegrationAccessToken();+ const { mutateAsync, isPending: isLoading } = useSaveIntegrationAccessToken();const { currentProject } = useProject();const { currentOrg } = useOrganization();const [apiKey, setApiKey] = useState("");const [apiKeyErrorText, setApiKeyErrorText] = useState("");- const [isLoading, setIsLoading] = useState(false);const handleButtonClick = async () => {try {@@ -22,16 +32,12 @@ export const RailwayAuthorizePage = () => {return;}- setIsLoading(true);-const integrationAuth = await mutateAsync({workspaceId: currentProject.id,integration: "railway",accessToken: apiKey});- setIsLoading(false);-navigate({to: "/organizations/$orgId/projects/secret-management/$projectId/integrations/railway/create",params: {@@ -49,23 +55,31 @@ export const RailwayAuthorizePage = () => {return (<div className="flex h-full w-full items-center justify-center">- <Card className="max-w-md rounded-md p-8">- <CardTitle className="text-center">Railway Integration</CardTitle>- <FormControl- label="Railway API Key"- errorText={apiKeyErrorText}- isError={apiKeyErrorText !== ""}- >- <Input placeholder="" value={apiKey} onChange={(e) => setApiKey(e.target.value)} />- </FormControl>- <Button- onClick={handleButtonClick}- colorSchema="secondary"- className="mt-4"- isLoading={isLoading}- >- Connect to Railway- </Button>+ <Card className="w-full max-w-lg">+ <CardHeader>+ <CardTitle>Railway Integration</CardTitle>+ </CardHeader>+ <CardContent className="flex flex-col gap-4">+ <Field data-invalid={apiKeyErrorText !== ""}>+ <FieldLabel htmlFor="RailwayAuthorizePage-field-1">Railway API Key</FieldLabel>+ <Input+ id="RailwayAuthorizePage-field-1"+ aria-describedby="RailwayAuthorizePage-field-1-feedback"+ isError={apiKeyErrorText !== ""}+ placeholder=""+ value={apiKey}+ onChange={(e) => setApiKey(e.target.value)}+ />+ {apiKeyErrorText !== "" && (+ <FieldError id="RailwayAuthorizePage-field-1-feedback">{apiKeyErrorText}</FieldError>+ )}+ </Field>+ </CardContent>+ <CardFooter className="justify-end border-t pt-4">+ <Button onClick={handleButtonClick} isPending={isLoading} variant="project">+ Connect to Railway+ </Button>+ </CardFooter></Card></div>);diff --git a/frontend/src/pages/secret-manager/integrations/RailwayConfigurePage/RailwayConfigurePage.tsx b/frontend/src/pages/secret-manager/integrations/RailwayConfigurePage/RailwayConfigurePage.tsxindex b04303cc38..27ee74f434 100644--- a/frontend/src/pages/secret-manager/integrations/RailwayConfigurePage/RailwayConfigurePage.tsx+++ b/frontend/src/pages/secret-manager/integrations/RailwayConfigurePage/RailwayConfigurePage.tsx@@ -4,12 +4,19 @@ import { useNavigate, useSearch } from "@tanstack/react-router";import {Button,Card,+ CardContent,+ CardFooter,+ CardHeader,CardTitle,- FormControl,+ Field,+ FieldLabel,Input,Select,- SelectItem-} from "@app/components/v2";+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue+} from "@app/components/v3";import { ROUTE_PATHS } from "@app/const/routes";import { useOrganization, useProject } from "@app/context";import { useCreateIntegration } from "@app/hooks/api";@@ -23,7 +30,7 @@ import { IntegrationsListPageTabs } from "@app/types/integrations";export const RailwayConfigurePage = () => {const navigate = useNavigate();- const { mutateAsync } = useCreateIntegration();+ const { mutateAsync, isPending: isLoading } = useCreateIntegration();const { currentOrg } = useOrganization();const { currentProject } = useProject();@@ -35,7 +42,6 @@ export const RailwayConfigurePage = () => {currentProject.environments[0].slug);const [secretPath, setSecretPath] = useState("/");- const [isLoading, setIsLoading] = useState(false);const integrationAuthId = useSearch({from: ROUTE_PATHS.SecretManager.Integratons.RailwayConfigurePage.id,@@ -76,8 +82,6 @@ export const RailwayConfigurePage = () => {const handleButtonClick = async () => {try {- setIsLoading(true);-if (!integrationAuth?.id) return;const targetApp = integrationAuthApps?.find(@@ -106,8 +110,6 @@ export const RailwayConfigurePage = () => {secretPath});- setIsLoading(false);-navigate({to: "/organizations/$orgId/projects/secret-management/$projectId/integrations",params: {@@ -133,103 +135,151 @@ export const RailwayConfigurePage = () => {targetServices &&filteredTargetServices ? (<div className="flex h-full w-full items-center justify-center">- <Card className="max-w-md rounded-md p-8">- <CardTitle className="text-center">Railway Integration</CardTitle>- <FormControl label="Project Environment" className="mt-4">- <Select- value={selectedSourceEnvironment}- onValueChange={(val) => setSelectedSourceEnvironment(val)}- className="w-full border border-border-strong"- >- {currentProject?.environments.map((sourceEnvironment) => (- <SelectItem- value={sourceEnvironment.slug}- key={`source-environment-${sourceEnvironment.slug}`}+ <Card className="w-full max-w-lg">+ <CardHeader>+ <CardTitle>Railway Integration</CardTitle>+ </CardHeader>+ <CardContent className="flex flex-col gap-4">+ <Field>+ <FieldLabel htmlFor="RailwayConfigurePage-field-1">Project Environment</FieldLabel>+ <Select+ value={selectedSourceEnvironment}+ onValueChange={(val) => setSelectedSourceEnvironment(val)}+ >+ <SelectTrigger+ id="RailwayConfigurePage-field-1"+ aria-describedby="RailwayConfigurePage-field-1-feedback"+ className="w-full"+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {currentProject?.environments.map((sourceEnvironment) => (+ <SelectItem+ value={sourceEnvironment.slug}+ key={`source-environment-${sourceEnvironment.slug}`}+ >+ {sourceEnvironment.name}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ </Field>+ <Field>+ <FieldLabel htmlFor="RailwayConfigurePage-field-2">Secrets Path</FieldLabel>+ <Input+ id="RailwayConfigurePage-field-2"+ aria-describedby="RailwayConfigurePage-field-2-feedback"+ value={secretPath}+ onChange={(evt) => setSecretPath(evt.target.value)}+ placeholder="Provide a path, default is /"+ />+ </Field>+ <Field>+ <FieldLabel htmlFor="RailwayConfigurePage-field-3">Railway Project</FieldLabel>+ <Select+ value={targetAppId}+ onValueChange={(val) => setTargetAppId(val)}+ disabled={integrationAuthApps.length === 0}+ >+ <SelectTrigger+ id="RailwayConfigurePage-field-3"+ aria-describedby="RailwayConfigurePage-field-3-feedback"+ className="w-full"+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {integrationAuthApps.length > 0 ? (+ integrationAuthApps.map((integrationAuthApp) => (+ <SelectItem+ value={integrationAuthApp.appId as string}+ key={`target-app-${integrationAuthApp.appId as string}`}+ >+ {integrationAuthApp.name}+ </SelectItem>+ ))+ ) : (+ <SelectItem value="none" key="target-app-none">+ No projects found+ </SelectItem>+ )}+ </SelectContent>+ </Select>+ </Field>+ <Field>+ <FieldLabel htmlFor="RailwayConfigurePage-field-4">+ Railway Project Environment+ </FieldLabel>+ <Select+ value={targetEnvironmentId}+ onValueChange={(val) => setTargetEnvironmentId(val)}+ disabled={targetEnvironments.length === 0}+ >+ <SelectTrigger+ id="RailwayConfigurePage-field-4"+ aria-describedby="RailwayConfigurePage-field-4-feedback"+ className="w-full">- {sourceEnvironment.name}- </SelectItem>- ))}- </Select>- </FormControl>- <FormControl label="Secrets Path">- <Input- value={secretPath}- onChange={(evt) => setSecretPath(evt.target.value)}- placeholder="Provide a path, default is /"- />- </FormControl>- <FormControl label="Railway Project">- <Select- value={targetAppId}- onValueChange={(val) => setTargetAppId(val)}- className="w-full border border-border-strong"+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {targetEnvironments.length > 0 ? (+ targetEnvironments.map((targetEnvironment) => (+ <SelectItem+ value={targetEnvironment.environmentId as string}+ key={`target-environment-${targetEnvironment.environmentId as string}`}+ >+ {targetEnvironment.name}+ </SelectItem>+ ))+ ) : (+ <SelectItem value="none" key="target-environment-none">+ No environments found+ </SelectItem>+ )}+ </SelectContent>+ </Select>+ </Field>+ <Field>+ <FieldLabel htmlFor="RailwayConfigurePage-field-5">+ Railway Service (Optional)+ </FieldLabel>+ <Select+ value={targetServiceId}+ onValueChange={(val) => setTargetServiceId(val)}+ disabled={targetServices.length === 0}+ >+ <SelectTrigger+ id="RailwayConfigurePage-field-5"+ aria-describedby="RailwayConfigurePage-field-5-feedback"+ className="w-full"+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {filteredTargetServices.map((targetService) => (+ <SelectItem+ value={targetService.serviceId as string}+ key={`target-service-${targetService.serviceId as string}`}+ >+ {targetService.name}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ </Field>+ </CardContent>+ <CardFooter className="justify-end border-t pt-4">+ <Button+ onClick={handleButtonClick}+ isPending={isLoading}isDisabled={integrationAuthApps.length === 0}+ variant="project">- {integrationAuthApps.length > 0 ? (- integrationAuthApps.map((integrationAuthApp) => (- <SelectItem- value={integrationAuthApp.appId as string}- key={`target-app-${integrationAuthApp.appId as string}`}- >- {integrationAuthApp.name}- </SelectItem>- ))- ) : (- <SelectItem value="none" key="target-app-none">- No projects found- </SelectItem>- )}- </Select>- </FormControl>- <FormControl label="Railway Project Environment">- <Select- value={targetEnvironmentId}- onValueChange={(val) => setTargetEnvironmentId(val)}- className="w-full border border-border-strong"- isDisabled={targetEnvironments.length === 0}- >- {targetEnvironments.length > 0 ? (- targetEnvironments.map((targetEnvironment) => (- <SelectItem- value={targetEnvironment.environmentId as string}- key={`target-environment-${targetEnvironment.environmentId as string}`}- >- {targetEnvironment.name}- </SelectItem>- ))- ) : (- <SelectItem value="none" key="target-environment-none">- No environments found- </SelectItem>- )}- </Select>- </FormControl>- <FormControl label="Railway Service (Optional)">- <Select- value={targetServiceId}- onValueChange={(val) => setTargetServiceId(val)}- className="w-full border border-border-strong"- isDisabled={targetServices.length === 0}- >- {filteredTargetServices.map((targetService) => (- <SelectItem- value={targetService.serviceId as string}- key={`target-service-${targetService.serviceId as string}`}- >- {targetService.name}- </SelectItem>- ))}- </Select>- </FormControl>- <Button- onClick={handleButtonClick}- colorSchema="secondary"- className="mt-4"- isLoading={isLoading}- isDisabled={integrationAuthApps.length === 0}- >- Create Integration- </Button>+ Create Integration+ </Button>+ </CardFooter></Card></div>) : (