mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-12 13:29:11 +00:00
Updated UI for Vercel, GCP, GitLab, Checkly, Vault integrations
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
|
import Image from "next/image";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { faArrowUpRightFromSquare, faBookOpen } from "@fortawesome/free-solid-svg-icons";
|
import { faArrowUpRightFromSquare, faBookOpen } from "@fortawesome/free-solid-svg-icons";
|
||||||
@@ -54,7 +55,16 @@ export default function ChecklyCreateIntegrationPage() {
|
|||||||
className="text-left px-6 text-xl"
|
className="text-left px-6 text-xl"
|
||||||
subTitle="After adding your API-key, you will be prompted to set up an integration for a particular Infisical project and environment."
|
subTitle="After adding your API-key, you will be prompted to set up an integration for a particular Infisical project and environment."
|
||||||
>
|
>
|
||||||
Checkly Integration
|
<div className="flex flex-row items-center">
|
||||||
|
<div className="inline flex items-center pb-0.5">
|
||||||
|
<Image
|
||||||
|
src="/images/integrations/Checkly.png"
|
||||||
|
height={30}
|
||||||
|
width={30}
|
||||||
|
alt="Checkly logo"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<span className="ml-2.5">Checkly Integration </span>
|
||||||
<Link href="https://infisical.com/docs/integrations/cloud/checkly" passHref>
|
<Link href="https://infisical.com/docs/integrations/cloud/checkly" passHref>
|
||||||
<a target="_blank" rel="noopener noreferrer">
|
<a target="_blank" rel="noopener noreferrer">
|
||||||
<div className="ml-2 mb-1 rounded-md text-yellow text-sm inline-block bg-yellow/20 px-1.5 pb-[0.03rem] pt-[0.04rem] opacity-80 hover:opacity-100 cursor-default">
|
<div className="ml-2 mb-1 rounded-md text-yellow text-sm inline-block bg-yellow/20 px-1.5 pb-[0.03rem] pt-[0.04rem] opacity-80 hover:opacity-100 cursor-default">
|
||||||
@@ -64,6 +74,7 @@ export default function ChecklyCreateIntegrationPage() {
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
|
</div>
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<FormControl
|
<FormControl
|
||||||
label="Checkly API key"
|
label="Checkly API key"
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
|
import Image from "next/image";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { faArrowUpRightFromSquare, faBookOpen, faBugs } from "@fortawesome/free-solid-svg-icons";
|
import { faArrowUpRightFromSquare, faBookOpen, faBugs, faCircleInfo } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import { motion } from "framer-motion";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -13,7 +15,11 @@ import {
|
|||||||
FormControl,
|
FormControl,
|
||||||
Input,
|
Input,
|
||||||
Select,
|
Select,
|
||||||
SelectItem
|
SelectItem,
|
||||||
|
Tab,
|
||||||
|
TabList,
|
||||||
|
TabPanel,
|
||||||
|
Tabs
|
||||||
} from "@app/components/v2";
|
} from "@app/components/v2";
|
||||||
import {
|
import {
|
||||||
useCreateIntegration
|
useCreateIntegration
|
||||||
@@ -25,6 +31,11 @@ import {
|
|||||||
} from "../../../hooks/api/integrationAuth";
|
} from "../../../hooks/api/integrationAuth";
|
||||||
import { useGetWorkspaceById } from "../../../hooks/api/workspace";
|
import { useGetWorkspaceById } from "../../../hooks/api/workspace";
|
||||||
|
|
||||||
|
enum TabSections {
|
||||||
|
Connection = "connection",
|
||||||
|
Options = "options"
|
||||||
|
}
|
||||||
|
|
||||||
export default function ChecklyCreateIntegrationPage() {
|
export default function ChecklyCreateIntegrationPage() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { mutateAsync } = useCreateIntegration();
|
const { mutateAsync } = useCreateIntegration();
|
||||||
@@ -95,7 +106,7 @@ export default function ChecklyCreateIntegrationPage() {
|
|||||||
selectedSourceEnvironment &&
|
selectedSourceEnvironment &&
|
||||||
integrationAuthApps &&
|
integrationAuthApps &&
|
||||||
targetApp ? (
|
targetApp ? (
|
||||||
<div className="flex h-full w-full items-center justify-center bg-gradient-to-tr from-mineshaft-900 to-bunker-900">
|
<div className="flex flex-col h-full w-full items-center justify-center bg-gradient-to-tr from-mineshaft-900 to-bunker-900">
|
||||||
<Head>
|
<Head>
|
||||||
<title>Set Up Checkly Integration</title>
|
<title>Set Up Checkly Integration</title>
|
||||||
<link rel='icon' href='/infisical.ico' />
|
<link rel='icon' href='/infisical.ico' />
|
||||||
@@ -103,9 +114,18 @@ export default function ChecklyCreateIntegrationPage() {
|
|||||||
<Card className="max-w-lg rounded-md border border-mineshaft-600 p-0">
|
<Card className="max-w-lg rounded-md border border-mineshaft-600 p-0">
|
||||||
<CardTitle
|
<CardTitle
|
||||||
className="text-left px-6 text-xl"
|
className="text-left px-6 text-xl"
|
||||||
subTitle="Choose which environment in Infisical you want to sync with your Checkly account."
|
subTitle="Choose which environment in Infisical you want to sync to Checkly environment variables."
|
||||||
>
|
>
|
||||||
Checkly Integration
|
<div className="flex flex-row items-center">
|
||||||
|
<div className="inline flex items-center pb-0.5">
|
||||||
|
<Image
|
||||||
|
src="/images/integrations/Checkly.png"
|
||||||
|
height={30}
|
||||||
|
width={30}
|
||||||
|
alt="Checkly logo"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<span className="ml-2.5">Checkly Integration </span>
|
||||||
<Link href="https://infisical.com/docs/integrations/cloud/checkly" passHref>
|
<Link href="https://infisical.com/docs/integrations/cloud/checkly" passHref>
|
||||||
<a target="_blank" rel="noopener noreferrer">
|
<a target="_blank" rel="noopener noreferrer">
|
||||||
<div className="ml-2 mb-1 rounded-md text-yellow text-sm inline-block bg-yellow/20 px-1.5 pb-[0.03rem] pt-[0.04rem] opacity-80 hover:opacity-100 cursor-default">
|
<div className="ml-2 mb-1 rounded-md text-yellow text-sm inline-block bg-yellow/20 px-1.5 pb-[0.03rem] pt-[0.04rem] opacity-80 hover:opacity-100 cursor-default">
|
||||||
@@ -115,8 +135,17 @@ export default function ChecklyCreateIntegrationPage() {
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
|
</div>
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<FormControl label="Infisical Project Environment" className="mt-4 px-6">
|
<Tabs defaultValue={TabSections.Connection} className="px-6">
|
||||||
|
<TabList>
|
||||||
|
<div className="flex flex-row border-b border-mineshaft-600 w-full">
|
||||||
|
<Tab value={TabSections.Connection}>Connection</Tab>
|
||||||
|
<Tab value={TabSections.Options}>Options</Tab>
|
||||||
|
</div>
|
||||||
|
</TabList>
|
||||||
|
<TabPanel value={TabSections.Connection}>
|
||||||
|
<FormControl label="Infisical Project Environment">
|
||||||
<Select
|
<Select
|
||||||
value={selectedSourceEnvironment}
|
value={selectedSourceEnvironment}
|
||||||
onValueChange={(val) => setSelectedSourceEnvironment(val)}
|
onValueChange={(val) => setSelectedSourceEnvironment(val)}
|
||||||
@@ -132,14 +161,14 @@ export default function ChecklyCreateIntegrationPage() {
|
|||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormControl label="Secrets Path" className="mt-4 px-6">
|
<FormControl label="Secrets Path">
|
||||||
<Input
|
<Input
|
||||||
value={secretPath}
|
value={secretPath}
|
||||||
onChange={(evt) => setSecretPath(evt.target.value)}
|
onChange={(evt) => setSecretPath(evt.target.value)}
|
||||||
placeholder="Provide a path, default is /"
|
placeholder="Provide a path, default is /"
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormControl label="Checkly Account" className="mt-4 px-6">
|
<FormControl label="Checkly Account">
|
||||||
<Select
|
<Select
|
||||||
value={targetApp}
|
value={targetApp}
|
||||||
onValueChange={(val) => setTargetApp(val)}
|
onValueChange={(val) => setTargetApp(val)}
|
||||||
@@ -162,29 +191,47 @@ export default function ChecklyCreateIntegrationPage() {
|
|||||||
)}
|
)}
|
||||||
</Select>
|
</Select>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormControl label="Append the Secret Name with..." className="mt-4 px-6">
|
</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 }}
|
||||||
|
>
|
||||||
|
<FormControl label="Append Secret Names with..." className="pb-[9.75rem]">
|
||||||
<Input
|
<Input
|
||||||
value={secretSuffix}
|
value={secretSuffix}
|
||||||
onChange={(evt) => setSecretSuffix(evt.target.value)}
|
onChange={(evt) => setSecretSuffix(evt.target.value)}
|
||||||
placeholder="Provide a suffix for secret names, default is no suffix"
|
placeholder="Provide a suffix for secret names, default is no suffix"
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
</motion.div>
|
||||||
|
</TabPanel>
|
||||||
|
</Tabs>
|
||||||
<Button
|
<Button
|
||||||
onClick={handleButtonClick}
|
onClick={handleButtonClick}
|
||||||
color="mineshaft"
|
color="mineshaft"
|
||||||
variant="outline_bg"
|
variant="outline_bg"
|
||||||
className="mt-2 mb-6 ml-auto mr-6"
|
className="mb-6 ml-auto mr-6"
|
||||||
isFullWidth={false}
|
isFullWidth={false}
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
>
|
>
|
||||||
Create Integration
|
Create Integration
|
||||||
</Button>
|
</Button>
|
||||||
</Card>
|
</Card>
|
||||||
|
<div className="border-t border-mineshaft-800 w-full max-w-md mt-6"/>
|
||||||
|
<div className="flex flex-col bg-mineshaft-800 border border-mineshaft-600 w-full p-4 max-w-lg mt-6 rounded-md">
|
||||||
|
<div className="flex flex-row items-center"><FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-200 text-xl"/> <span className="ml-3 text-md text-mineshaft-100">Pro Tips</span></div>
|
||||||
|
<span className="text-mineshaft-300 text-sm mt-4">After creating an integration, your secrets will start syncing immediately. This might cause an unexpected override of current secrets in Checkly with secrets from Infisical.</span>
|
||||||
|
<span className="text-mineshaft-300 text-sm mt-4">If you have multiple Checkly integrations and are using suffixes for at least one of them, you will have to add suffixes for all the active Checkly integrations – otherwise you might run into rare unexpected behavior.</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="flex justify-center items-center w-full h-full">
|
<div className="flex justify-center items-center w-full h-full">
|
||||||
<Head>
|
<Head>
|
||||||
<title>Set Up GCP Secret Manager Integration</title>
|
<title>Set Up Checkly Integration</title>
|
||||||
<link rel='icon' href='/infisical.ico' />
|
<link rel='icon' href='/infisical.ico' />
|
||||||
</Head>
|
</Head>
|
||||||
{isintegrationAuthAppsLoading ? <img src="/images/loading/loading.gif" height={70} width={120} alt="infisical loading indicator" /> : <div className="max-w-md h-max p-6 border border-mineshaft-600 rounded-md bg-mineshaft-800 text-mineshaft-200 flex flex-col text-center">
|
{isintegrationAuthAppsLoading ? <img src="/images/loading/loading.gif" height={70} width={120} alt="infisical loading indicator" /> : <div className="max-w-md h-max p-6 border border-mineshaft-600 rounded-md bg-mineshaft-800 text-mineshaft-200 flex flex-col text-center">
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import crypto from "crypto";
|
|||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
|
import Image from "next/image";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { faGoogle } from "@fortawesome/free-brands-svg-icons";
|
import { faGoogle } from "@fortawesome/free-brands-svg-icons";
|
||||||
@@ -72,7 +73,16 @@ export default function GCPSecretManagerAuthorizeIntegrationPage() {
|
|||||||
className="text-left px-6 text-xl"
|
className="text-left px-6 text-xl"
|
||||||
subTitle="Connect Infisical to GCP Secret Manager to sync secrets."
|
subTitle="Connect Infisical to GCP Secret Manager to sync secrets."
|
||||||
>
|
>
|
||||||
GCP Secret Manager Integration
|
<div className="flex flex-row items-center">
|
||||||
|
<div className="inline flex items-center pb-0.5">
|
||||||
|
<Image
|
||||||
|
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>
|
||||||
<Link href="https://infisical.com/docs/integrations/cloud/gcp-secret-manager" passHref>
|
<Link href="https://infisical.com/docs/integrations/cloud/gcp-secret-manager" passHref>
|
||||||
<a target="_blank" rel="noopener noreferrer">
|
<a target="_blank" rel="noopener noreferrer">
|
||||||
<div className="ml-2 mb-1 rounded-md text-yellow text-sm inline-block bg-yellow/20 px-1.5 pb-[0.03rem] pt-[0.04rem] opacity-80 hover:opacity-100 cursor-default">
|
<div className="ml-2 mb-1 rounded-md text-yellow text-sm inline-block bg-yellow/20 px-1.5 pb-[0.03rem] pt-[0.04rem] opacity-80 hover:opacity-100 cursor-default">
|
||||||
@@ -82,6 +92,7 @@ export default function GCPSecretManagerAuthorizeIntegrationPage() {
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
|
</div>
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<div className="px-7">
|
<div className="px-7">
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { Controller, useForm } from "react-hook-form";
|
import { Controller, useForm } from "react-hook-form";
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
|
import Image from "next/image";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { faArrowUpRightFromSquare, faBookOpen, faBugs } from "@fortawesome/free-solid-svg-icons";
|
import { faArrowUpRightFromSquare, faBookOpen, faBugs, faCircleInfo } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { yupResolver } from "@hookform/resolvers/yup";
|
import { yupResolver } from "@hookform/resolvers/yup";
|
||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
@@ -159,18 +160,27 @@ export default function GCPSecretManagerCreateIntegrationPage() {
|
|||||||
integrationAuthApps ? (
|
integrationAuthApps ? (
|
||||||
<form
|
<form
|
||||||
onSubmit={handleSubmit(onFormSubmit)}
|
onSubmit={handleSubmit(onFormSubmit)}
|
||||||
className="flex h-full w-full items-center justify-center"
|
className="flex flex-col h-full w-full items-center justify-center"
|
||||||
>
|
>
|
||||||
<Card className="max-w-lg rounded-md border border-mineshaft-600 mb-12">
|
<Card className="max-w-lg rounded-md border border-mineshaft-600">
|
||||||
<Head>
|
<Head>
|
||||||
<title>Set Up GCP Secret Manager Integration</title>
|
<title>Set Up GCP Secret Manager Integration</title>
|
||||||
<link rel='icon' href='/infisical.ico' />
|
<link rel='icon' href='/infisical.ico' />
|
||||||
</Head>
|
</Head>
|
||||||
<CardTitle
|
<CardTitle
|
||||||
className="text-left px-6 text-xl mb-2"
|
className="text-left px-6 text-xl mb-2"
|
||||||
subTitle="After creating an integration you secrets will automatically sync from Infisical to GCP Secret Manager. Your GCP secrets may get overriden."
|
subTitle="Select which environment or folder in Infisical you want to sync to GCP Secret Manager. Optionally, you can add suffixes/prefixes."
|
||||||
>
|
>
|
||||||
GCP Secret Manager Integration
|
<div className="flex flex-row items-center">
|
||||||
|
<div className="inline flex items-center pb-0.5">
|
||||||
|
<Image
|
||||||
|
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>
|
||||||
<Link href="https://infisical.com/docs/integrations/cloud/gcp-secret-manager" passHref>
|
<Link href="https://infisical.com/docs/integrations/cloud/gcp-secret-manager" passHref>
|
||||||
<a target="_blank" rel="noopener noreferrer">
|
<a target="_blank" rel="noopener noreferrer">
|
||||||
<div className="ml-2 mb-1 rounded-md text-yellow text-sm inline-block bg-yellow/20 px-1.5 pb-[0.03rem] pt-[0.04rem] opacity-80 hover:opacity-100 cursor-default">
|
<div className="ml-2 mb-1 rounded-md text-yellow text-sm inline-block bg-yellow/20 px-1.5 pb-[0.03rem] pt-[0.04rem] opacity-80 hover:opacity-100 cursor-default">
|
||||||
@@ -180,6 +190,7 @@ export default function GCPSecretManagerCreateIntegrationPage() {
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
|
</div>
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<Tabs defaultValue={TabSections.Connection} className="px-6">
|
<Tabs defaultValue={TabSections.Connection} className="px-6">
|
||||||
<TabList>
|
<TabList>
|
||||||
@@ -374,11 +385,16 @@ export default function GCPSecretManagerCreateIntegrationPage() {
|
|||||||
size="sm"
|
size="sm"
|
||||||
type="submit"
|
type="submit"
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
// disabled={!targetAppId}
|
isDisabled={integrationAuthApps.length === 0}
|
||||||
>
|
>
|
||||||
Create Integration
|
Create Integration
|
||||||
</Button>
|
</Button>
|
||||||
</Card>
|
</Card>
|
||||||
|
<div className="border-t border-mineshaft-800 w-full max-w-md mt-6"/>
|
||||||
|
<div className="flex flex-col bg-mineshaft-800 border border-mineshaft-600 w-full p-4 max-w-lg mt-6 rounded-md">
|
||||||
|
<div className="flex flex-row items-center"><FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-200 text-xl"/> <span className="ml-3 text-md text-mineshaft-100">Pro Tips</span></div>
|
||||||
|
<span className="text-mineshaft-300 text-sm mt-4">After creating an integration, your secrets will start syncing immediately. This might cause an unexpected override of current secrets in GCP Secret Manager with secrets from Infisical.</span>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
) : (
|
) : (
|
||||||
<div className="flex justify-center items-center w-full h-full">
|
<div className="flex justify-center items-center w-full h-full">
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
import Head from "next/head";
|
||||||
|
import Image from "next/image";
|
||||||
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
import { faArrowUpRightFromSquare, faBookOpen, faBugs, faCircleInfo } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -29,7 +34,7 @@ export default function GitHubCreateIntegrationPage() {
|
|||||||
|
|
||||||
const { data: workspace } = useGetWorkspaceById(localStorage.getItem("projectData.id") ?? "");
|
const { data: workspace } = useGetWorkspaceById(localStorage.getItem("projectData.id") ?? "");
|
||||||
const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? "");
|
const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? "");
|
||||||
const { data: integrationAuthApps } = useGetIntegrationAuthApps({
|
const { data: integrationAuthApps, isLoading: isintegrationAuthAppsLoading } = useGetIntegrationAuthApps({
|
||||||
integrationAuthId: (integrationAuthId as string) ?? ""
|
integrationAuthId: (integrationAuthId as string) ?? ""
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -88,10 +93,38 @@ export default function GitHubCreateIntegrationPage() {
|
|||||||
selectedSourceEnvironment &&
|
selectedSourceEnvironment &&
|
||||||
integrationAuthApps &&
|
integrationAuthApps &&
|
||||||
targetAppId ? (
|
targetAppId ? (
|
||||||
<div className="flex h-full w-full items-center justify-center">
|
<div className="flex flex-col h-full w-full items-center justify-center">
|
||||||
<Card className="max-w-md rounded-md p-8">
|
<Head>
|
||||||
<CardTitle className="text-center">GitHub Integration</CardTitle>
|
<title>Set Up GitHub Integration</title>
|
||||||
<FormControl label="Project Environment" className="mt-4">
|
<link rel='icon' href='/infisical.ico' />
|
||||||
|
</Head>
|
||||||
|
<Card className="max-w-lg rounded-md border border-mineshaft-600 p-0">
|
||||||
|
<CardTitle
|
||||||
|
className="text-left px-6 text-xl"
|
||||||
|
subTitle="Choose which environment in Infisical you want to sync to environment variables in GitHub."
|
||||||
|
>
|
||||||
|
<div className="flex flex-row items-center">
|
||||||
|
<div className="inline flex items-center bg-mineshaft-200 rounded-full">
|
||||||
|
<Image
|
||||||
|
src="/images/integrations/GitHub.png"
|
||||||
|
height={30}
|
||||||
|
width={30}
|
||||||
|
alt="GitHub logo"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<span className="ml-2.5">GitHub Integration </span>
|
||||||
|
<Link href="https://infisical.com/docs/integrations/cicd/githubactions" passHref>
|
||||||
|
<a target="_blank" rel="noopener noreferrer">
|
||||||
|
<div className="ml-2 mb-1 rounded-md text-yellow text-sm inline-block bg-yellow/20 px-1.5 pb-[0.03rem] pt-[0.04rem] opacity-80 hover:opacity-100 cursor-default">
|
||||||
|
<FontAwesomeIcon icon={faBookOpen} className="mr-1.5"/>
|
||||||
|
Docs
|
||||||
|
<FontAwesomeIcon icon={faArrowUpRightFromSquare} className="ml-1.5 text-xxs mb-[0.07rem]"/>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</CardTitle>
|
||||||
|
<FormControl label="Project Environment" className="px-6">
|
||||||
<Select
|
<Select
|
||||||
value={selectedSourceEnvironment}
|
value={selectedSourceEnvironment}
|
||||||
onValueChange={(val) => setSelectedSourceEnvironment(val)}
|
onValueChange={(val) => setSelectedSourceEnvironment(val)}
|
||||||
@@ -107,14 +140,14 @@ export default function GitHubCreateIntegrationPage() {
|
|||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormControl label="Secrets Path">
|
<FormControl label="Secrets Path" className="px-6">
|
||||||
<Input
|
<Input
|
||||||
value={secretPath}
|
value={secretPath}
|
||||||
onChange={(evt) => setSecretPath(evt.target.value)}
|
onChange={(evt) => setSecretPath(evt.target.value)}
|
||||||
placeholder="Provide a path, default is /"
|
placeholder="Provide a path, default is /"
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormControl label="GitHub Repo" className="mt-4">
|
<FormControl label="GitHub Repo" className="px-6">
|
||||||
<Select
|
<Select
|
||||||
value={targetAppId}
|
value={targetAppId}
|
||||||
onValueChange={(val) => setTargetAppId(val)}
|
onValueChange={(val) => setTargetAppId(val)}
|
||||||
@@ -140,16 +173,40 @@ export default function GitHubCreateIntegrationPage() {
|
|||||||
<Button
|
<Button
|
||||||
onClick={handleButtonClick}
|
onClick={handleButtonClick}
|
||||||
color="mineshaft"
|
color="mineshaft"
|
||||||
className="mt-4"
|
variant="outline_bg"
|
||||||
|
className="mt-2 mb-6 ml-auto mr-6"
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
isDisabled={integrationAuthApps.length === 0}
|
isDisabled={integrationAuthApps.length === 0}
|
||||||
>
|
>
|
||||||
Create Integration
|
Create Integration
|
||||||
</Button>
|
</Button>
|
||||||
</Card>
|
</Card>
|
||||||
|
<div className="border-t border-mineshaft-800 w-full max-w-md mt-6"/>
|
||||||
|
<div className="flex flex-col bg-mineshaft-800 border border-mineshaft-600 w-full p-4 max-w-lg mt-6 rounded-md">
|
||||||
|
<div className="flex flex-row items-center"><FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-200 text-xl"/> <span className="ml-3 text-md text-mineshaft-100">Pro Tips</span></div>
|
||||||
|
<span className="text-mineshaft-300 text-sm mt-4">After creating an integration, your secrets will start syncing immediately. This might cause an unexpected override of current secrets in GitHub with secrets from Infisical.</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div />
|
<div className="flex justify-center items-center w-full h-full">
|
||||||
|
<Head>
|
||||||
|
<title>Set Up GitHub Integration</title>
|
||||||
|
<link rel='icon' href='/infisical.ico' />
|
||||||
|
</Head>
|
||||||
|
{isintegrationAuthAppsLoading ? <img src="/images/loading/loading.gif" height={70} width={120} alt="infisical loading indicator" /> : <div className="max-w-md h-max p-6 border border-mineshaft-600 rounded-md bg-mineshaft-800 text-mineshaft-200 flex flex-col text-center">
|
||||||
|
<FontAwesomeIcon icon={faBugs} className="text-6xl my-2 inlineli"/>
|
||||||
|
<p>
|
||||||
|
Something went wrong. Please contact <a
|
||||||
|
className="inline underline underline-offset-4 decoration-primary-500 opacity-80 hover:opacity-100 text-mineshaft-100 duration-200 cursor-pointer"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
href="mailto:[email protected]"
|
||||||
|
>
|
||||||
|
support@infisical.com
|
||||||
|
</a> if the issue persists.
|
||||||
|
</p>
|
||||||
|
</div>}
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
import crypto from "crypto";
|
import crypto from "crypto";
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { faGoogle } from "@fortawesome/free-brands-svg-icons";
|
import Head from "next/head";
|
||||||
|
import Image from "next/image";
|
||||||
|
import Link from "next/link";
|
||||||
|
import { faArrowUpRightFromSquare, faBookOpen } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
import { useGetCloudIntegrations } from "@app/hooks/api";
|
import { useGetCloudIntegrations } from "@app/hooks/api";
|
||||||
@@ -32,9 +35,37 @@ export default function GitLabAuthorizeIntegrationPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-full w-full items-center justify-center">
|
<div className="flex h-full w-full items-center justify-center">
|
||||||
<Card className="max-w-md rounded-md p-8">
|
<Head>
|
||||||
<CardTitle className="text-center">GitLab Integration</CardTitle>
|
<title>Authorize GitLab Integration</title>
|
||||||
<FormControl label="Self-hosted URL (optional)">
|
<link rel='icon' href='/infisical.ico' />
|
||||||
|
</Head>
|
||||||
|
<Card className="max-w-lg rounded-md border border-mineshaft-600 mb-12">
|
||||||
|
<CardTitle
|
||||||
|
className="text-left px-6 text-xl"
|
||||||
|
subTitle="Authorize this integration to be able to sync secrets from Infisical to GitLab. If needed, specify the self-hosted GitLab URL."
|
||||||
|
>
|
||||||
|
<div className="flex flex-row items-center">
|
||||||
|
<div className="inline flex items-center pb-0.5">
|
||||||
|
<Image
|
||||||
|
src="/images/integrations/Gitlab.png"
|
||||||
|
height={28}
|
||||||
|
width={28}
|
||||||
|
alt="Gitlab logo"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<span className="ml-2.5">GitLab Integration </span>
|
||||||
|
<Link href="https://infisical.com/docs/integrations/cicd/gitlab" passHref>
|
||||||
|
<a target="_blank" rel="noopener noreferrer">
|
||||||
|
<div className="ml-2 mb-1 rounded-md text-yellow text-sm inline-block bg-yellow/20 px-1.5 pb-[0.03rem] pt-[0.04rem] opacity-80 hover:opacity-100 cursor-default">
|
||||||
|
<FontAwesomeIcon icon={faBookOpen} className="mr-1.5"/>
|
||||||
|
Docs
|
||||||
|
<FontAwesomeIcon icon={faArrowUpRightFromSquare} className="ml-1.5 text-xxs mb-[0.07rem]"/>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</CardTitle>
|
||||||
|
<FormControl label="Self-hosted URL (optional)" className="px-6">
|
||||||
<Input
|
<Input
|
||||||
placeholder="https://self-hosted-gitlab.com"
|
placeholder="https://self-hosted-gitlab.com"
|
||||||
value={gitLabURL} onChange={(e) => setGitLabURL(e.target.value)}
|
value={gitLabURL} onChange={(e) => setGitLabURL(e.target.value)}
|
||||||
@@ -42,8 +73,9 @@ export default function GitLabAuthorizeIntegrationPage() {
|
|||||||
</FormControl>
|
</FormControl>
|
||||||
<Button
|
<Button
|
||||||
onClick={handleIntegrateWithOAuth}
|
onClick={handleIntegrateWithOAuth}
|
||||||
leftIcon={<FontAwesomeIcon icon={faGoogle} className="mr-2" />}
|
colorSchema="primary"
|
||||||
className="h-11 w-full mx-0 mt-4"
|
variant="outline_bg"
|
||||||
|
className="mb-6 mt-2 ml-auto mr-6 w-min"
|
||||||
>
|
>
|
||||||
Continue with OAuth
|
Continue with OAuth
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
import Head from "next/head";
|
||||||
|
import Image from "next/image";
|
||||||
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
import { faArrowUpRightFromSquare, faBookOpen, faBugs, faCircleInfo } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -38,11 +43,11 @@ export default function GitLabCreateIntegrationPage() {
|
|||||||
|
|
||||||
const [targetTeamId, setTargetTeamId] = useState<string | null>(null);
|
const [targetTeamId, setTargetTeamId] = useState<string | null>(null);
|
||||||
|
|
||||||
const { data: integrationAuthApps } = useGetIntegrationAuthApps({
|
const { data: integrationAuthApps, isLoading: isintegrationAuthAppsLoading } = useGetIntegrationAuthApps({
|
||||||
integrationAuthId: (integrationAuthId as string) ?? "",
|
integrationAuthId: (integrationAuthId as string) ?? "",
|
||||||
...(targetTeamId ? { teamId: targetTeamId } : {})
|
...(targetTeamId ? { teamId: targetTeamId } : {})
|
||||||
});
|
});
|
||||||
const { data: integrationAuthTeams } = useGetIntegrationAuthTeams(
|
const { data: integrationAuthTeams, isLoading: isintegrationAuthTeamsLoading } = useGetIntegrationAuthTeams(
|
||||||
(integrationAuthId as string) ?? ""
|
(integrationAuthId as string) ?? ""
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -114,10 +119,38 @@ export default function GitLabCreateIntegrationPage() {
|
|||||||
integrationAuthApps &&
|
integrationAuthApps &&
|
||||||
integrationAuthTeams &&
|
integrationAuthTeams &&
|
||||||
targetAppId ? (
|
targetAppId ? (
|
||||||
<div className="flex h-full w-full items-center justify-center">
|
<div className="flex flex-col h-full w-full items-center justify-center">
|
||||||
<Card className="max-w-md rounded-md p-8">
|
<Head>
|
||||||
<CardTitle className="text-center">GitLab Integration</CardTitle>
|
<title>Set Up GitLab Integration</title>
|
||||||
<FormControl label="Project Environment">
|
<link rel='icon' href='/infisical.ico' />
|
||||||
|
</Head>
|
||||||
|
<Card className="max-w-lg rounded-md border border-mineshaft-600">
|
||||||
|
<CardTitle
|
||||||
|
className="text-left px-6 text-xl"
|
||||||
|
subTitle="Select which environment or folder in Infisical you want to sync to GitLab's environment variables."
|
||||||
|
>
|
||||||
|
<div className="flex flex-row items-center">
|
||||||
|
<div className="inline flex items-center pb-0.5">
|
||||||
|
<Image
|
||||||
|
src="/images/integrations/Gitlab.png"
|
||||||
|
height={28}
|
||||||
|
width={28}
|
||||||
|
alt="Gitlab logo"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<span className="ml-2.5">GitLab Integration </span>
|
||||||
|
<Link href="https://infisical.com/docs/integrations/cicd/gitlab" passHref>
|
||||||
|
<a target="_blank" rel="noopener noreferrer">
|
||||||
|
<div className="ml-2 mb-1 rounded-md text-yellow text-sm inline-block bg-yellow/20 px-1.5 pb-[0.03rem] pt-[0.04rem] opacity-80 hover:opacity-100 cursor-default">
|
||||||
|
<FontAwesomeIcon icon={faBookOpen} className="mr-1.5"/>
|
||||||
|
Docs
|
||||||
|
<FontAwesomeIcon icon={faArrowUpRightFromSquare} className="ml-1.5 text-xxs mb-[0.07rem]"/>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</CardTitle>
|
||||||
|
<FormControl label="Project Environment" className="px-6">
|
||||||
<Select
|
<Select
|
||||||
value={selectedSourceEnvironment}
|
value={selectedSourceEnvironment}
|
||||||
onValueChange={(val) => setSelectedSourceEnvironment(val)}
|
onValueChange={(val) => setSelectedSourceEnvironment(val)}
|
||||||
@@ -133,14 +166,14 @@ export default function GitLabCreateIntegrationPage() {
|
|||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormControl label="Secrets Path">
|
<FormControl label="Secrets Path" className="px-6">
|
||||||
<Input
|
<Input
|
||||||
value={secretPath}
|
value={secretPath}
|
||||||
onChange={(evt) => setSecretPath(evt.target.value)}
|
onChange={(evt) => setSecretPath(evt.target.value)}
|
||||||
placeholder="Provide a path, default is /"
|
placeholder="Provide a path, default is /"
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormControl label="GitLab Integration Type">
|
<FormControl label="GitLab Integration Type" className="px-6">
|
||||||
<Select
|
<Select
|
||||||
value={targetEntity}
|
value={targetEntity}
|
||||||
onValueChange={(val) => setTargetEntity(val)}
|
onValueChange={(val) => setTargetEntity(val)}
|
||||||
@@ -156,7 +189,7 @@ export default function GitLabCreateIntegrationPage() {
|
|||||||
</Select>
|
</Select>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
{targetEntity === "group" && targetTeamId && (
|
{targetEntity === "group" && targetTeamId && (
|
||||||
<FormControl label="GitLab Group">
|
<FormControl label="GitLab Group" className="px-6">
|
||||||
<Select
|
<Select
|
||||||
value={targetTeamId}
|
value={targetTeamId}
|
||||||
onValueChange={(val) => setTargetTeamId(val)}
|
onValueChange={(val) => setTargetTeamId(val)}
|
||||||
@@ -179,7 +212,7 @@ export default function GitLabCreateIntegrationPage() {
|
|||||||
</Select>
|
</Select>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
)}
|
)}
|
||||||
<FormControl label="GitLab Project">
|
<FormControl label="GitLab Project" className="px-6">
|
||||||
<Select
|
<Select
|
||||||
value={targetAppId}
|
value={targetAppId}
|
||||||
onValueChange={(val) => setTargetAppId(val)}
|
onValueChange={(val) => setTargetAppId(val)}
|
||||||
@@ -202,7 +235,7 @@ export default function GitLabCreateIntegrationPage() {
|
|||||||
)}
|
)}
|
||||||
</Select>
|
</Select>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormControl label="GitLab Environment Scope (Optional)">
|
<FormControl label="GitLab Environment Scope (Optional)" className="px-6">
|
||||||
<Input
|
<Input
|
||||||
placeholder="*"
|
placeholder="*"
|
||||||
value={targetEnvironment}
|
value={targetEnvironment}
|
||||||
@@ -211,17 +244,41 @@ export default function GitLabCreateIntegrationPage() {
|
|||||||
</FormControl>
|
</FormControl>
|
||||||
<Button
|
<Button
|
||||||
onClick={handleButtonClick}
|
onClick={handleButtonClick}
|
||||||
color="mineshaft"
|
colorSchema="primary"
|
||||||
className="mt-4"
|
variant="outline_bg"
|
||||||
|
className="mb-6 mt-2 ml-auto mr-6 w-min"
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
isDisabled={integrationAuthApps.length === 0}
|
isDisabled={integrationAuthApps.length === 0}
|
||||||
>
|
>
|
||||||
Create Integration
|
Create Integration
|
||||||
</Button>
|
</Button>
|
||||||
</Card>
|
</Card>
|
||||||
|
<div className="border-t border-mineshaft-800 w-full max-w-md mt-6"/>
|
||||||
|
<div className="flex flex-col bg-mineshaft-800 border border-mineshaft-600 w-full p-4 max-w-lg mt-6 rounded-md">
|
||||||
|
<div className="flex flex-row items-center"><FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-200 text-xl"/> <span className="ml-3 text-md text-mineshaft-100">Pro Tips</span></div>
|
||||||
|
<span className="text-mineshaft-300 text-sm mt-4">After creating an integration, your secrets will start syncing immediately. This might cause an unexpected override of current secrets in GitLab with secrets from Infisical.</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div />
|
<div className="flex justify-center items-center w-full h-full">
|
||||||
|
<Head>
|
||||||
|
<title>Set Up GitLab Integration</title>
|
||||||
|
<link rel='icon' href='/infisical.ico' />
|
||||||
|
</Head>
|
||||||
|
{isintegrationAuthAppsLoading || isintegrationAuthTeamsLoading ? <img src="/images/loading/loading.gif" height={70} width={120} alt="infisical loading indicator" /> : <div className="max-w-md h-max p-6 border border-mineshaft-600 rounded-md bg-mineshaft-800 text-mineshaft-200 flex flex-col text-center">
|
||||||
|
<FontAwesomeIcon icon={faBugs} className="text-6xl my-2 inlineli"/>
|
||||||
|
<p>
|
||||||
|
Something went wrong. Please contact <a
|
||||||
|
className="inline underline underline-offset-4 decoration-primary-500 opacity-80 hover:opacity-100 text-mineshaft-100 duration-200 cursor-pointer"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
href="mailto:[email protected]"
|
||||||
|
>
|
||||||
|
support@infisical.com
|
||||||
|
</a> if the issue persists.
|
||||||
|
</p>
|
||||||
|
</div>}
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
|
import Image from "next/image";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { faArrowUpRightFromSquare, faBookOpen } from "@fortawesome/free-solid-svg-icons";
|
import { faArrowUpRightFromSquare, faBookOpen } from "@fortawesome/free-solid-svg-icons";
|
||||||
@@ -91,9 +92,18 @@ export default function HashiCorpVaultAuthorizeIntegrationPage() {
|
|||||||
<Card className="max-w-lg rounded-md border border-mineshaft-600 mb-12">
|
<Card className="max-w-lg rounded-md border border-mineshaft-600 mb-12">
|
||||||
<CardTitle
|
<CardTitle
|
||||||
className="text-left px-6 text-xl"
|
className="text-left px-6 text-xl"
|
||||||
subTitle="After adding connecting to Vault, you will be prompted to set up an integration for a particular Infisical project and environment."
|
subTitle="After connecting to Vault, you will be prompted to set up an integration for a particular Infisical project and environment."
|
||||||
>
|
>
|
||||||
HashiCorp Vault Integration
|
<div className="flex flex-row items-center">
|
||||||
|
<div className="inline flex items-center">
|
||||||
|
<Image
|
||||||
|
src="/images/integrations/Vault.png"
|
||||||
|
height={30}
|
||||||
|
width={30}
|
||||||
|
alt="HCP Vault logo"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<span className="ml-2.5">HashiCorp Vault Integration</span>
|
||||||
<Link href="https://infisical.com/docs/integrations/cloud/hashicorp-vault" passHref>
|
<Link href="https://infisical.com/docs/integrations/cloud/hashicorp-vault" passHref>
|
||||||
<a target="_blank" rel="noopener noreferrer">
|
<a target="_blank" rel="noopener noreferrer">
|
||||||
<div className="ml-2 mb-1 rounded-md text-yellow text-sm inline-block bg-yellow/20 px-1.5 pb-[0.03rem] pt-[0.04rem] opacity-80 hover:opacity-100 cursor-default">
|
<div className="ml-2 mb-1 rounded-md text-yellow text-sm inline-block bg-yellow/20 px-1.5 pb-[0.03rem] pt-[0.04rem] opacity-80 hover:opacity-100 cursor-default">
|
||||||
@@ -103,6 +113,7 @@ export default function HashiCorpVaultAuthorizeIntegrationPage() {
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
|
</div>
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<FormControl
|
<FormControl
|
||||||
label="Vault Cluster URL"
|
label="Vault Cluster URL"
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
|
import Image from "next/image";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { faArrowUpRightFromSquare, faBookOpen, faBugs } from "@fortawesome/free-solid-svg-icons";
|
import { faArrowUpRightFromSquare, faBookOpen, faBugs, faCircleInfo } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
|
|
||||||
@@ -83,17 +84,26 @@ export default function HashiCorpVaultCreateIntegrationPage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return integrationAuth && workspace ? (
|
return integrationAuth && workspace ? (
|
||||||
<div className="flex h-full w-full items-center justify-center">
|
<div className="flex flex-col h-full w-full items-center justify-center">
|
||||||
<Head>
|
<Head>
|
||||||
<title>Set Up Vault Integration</title>
|
<title>Set Up Vault Integration</title>
|
||||||
<link rel='icon' href='/infisical.ico' />
|
<link rel='icon' href='/infisical.ico' />
|
||||||
</Head>
|
</Head>
|
||||||
<Card className="max-w-lg rounded-md border border-mineshaft-600 mb-12">
|
<Card className="max-w-lg rounded-md border border-mineshaft-600">
|
||||||
<CardTitle
|
<CardTitle
|
||||||
className="text-left px-6 text-xl"
|
className="text-left px-6 text-xl"
|
||||||
subTitle="After creating an integration, your secrets will automatically start syncing from Infisical to Vault."
|
subTitle="Select which environment or folder in Infisical you want to sync to which path in HashiCorp Vault."
|
||||||
>
|
>
|
||||||
HashiCorp Vault Integration
|
<div className="flex flex-row items-center">
|
||||||
|
<div className="inline flex items-center">
|
||||||
|
<Image
|
||||||
|
src="/images/integrations/Vault.png"
|
||||||
|
height={30}
|
||||||
|
width={30}
|
||||||
|
alt="HCP Vault logo"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<span className="ml-2.5">HashiCorp Vault Integration</span>
|
||||||
<Link href="https://infisical.com/docs/integrations/cloud/hashicorp-vault" passHref>
|
<Link href="https://infisical.com/docs/integrations/cloud/hashicorp-vault" passHref>
|
||||||
<a target="_blank" rel="noopener noreferrer">
|
<a target="_blank" rel="noopener noreferrer">
|
||||||
<div className="ml-2 mb-1 rounded-md text-yellow text-sm inline-block bg-yellow/20 px-1.5 pb-[0.03rem] pt-[0.04rem] opacity-80 hover:opacity-100 cursor-default">
|
<div className="ml-2 mb-1 rounded-md text-yellow text-sm inline-block bg-yellow/20 px-1.5 pb-[0.03rem] pt-[0.04rem] opacity-80 hover:opacity-100 cursor-default">
|
||||||
@@ -103,6 +113,7 @@ export default function HashiCorpVaultCreateIntegrationPage() {
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
|
</div>
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<FormControl label="Project Environment" className="px-6">
|
<FormControl label="Project Environment" className="px-6">
|
||||||
<Select
|
<Select
|
||||||
@@ -162,11 +173,16 @@ export default function HashiCorpVaultCreateIntegrationPage() {
|
|||||||
Create Integration
|
Create Integration
|
||||||
</Button>
|
</Button>
|
||||||
</Card>
|
</Card>
|
||||||
|
<div className="border-t border-mineshaft-800 w-full max-w-md mt-6"/>
|
||||||
|
<div className="flex flex-col bg-mineshaft-800 border border-mineshaft-600 w-full p-4 max-w-lg mt-6 rounded-md">
|
||||||
|
<div className="flex flex-row items-center"><FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-200 text-xl"/> <span className="ml-3 text-md text-mineshaft-100">Pro Tips</span></div>
|
||||||
|
<span className="text-mineshaft-300 text-sm mt-4">After creating an integration, your secrets will start syncing immediately. This might cause an unexpected override of current secrets in Vault with secrets from Infisical.</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="flex justify-center items-center w-full h-full">
|
<div className="flex justify-center items-center w-full h-full">
|
||||||
<Head>
|
<Head>
|
||||||
<title>Set Up GCP Secret Manager Integration</title>
|
<title>Set Up Vault Integration</title>
|
||||||
<link rel='icon' href='/infisical.ico' />
|
<link rel='icon' href='/infisical.ico' />
|
||||||
</Head>
|
</Head>
|
||||||
{isintegrationAuthLoading ? <img src="/images/loading/loading.gif" height={70} width={120} alt="infisical loading indicator" /> : <div className="max-w-md h-max p-6 border border-mineshaft-600 rounded-md bg-mineshaft-800 text-mineshaft-200 flex flex-col text-center">
|
{isintegrationAuthLoading ? <img src="/images/loading/loading.gif" height={70} width={120} alt="infisical loading indicator" /> : <div className="max-w-md h-max p-6 border border-mineshaft-600 rounded-md bg-mineshaft-800 text-mineshaft-200 flex flex-col text-center">
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
import Head from "next/head";
|
||||||
|
import Image from "next/image";
|
||||||
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
import { faArrowUpRightFromSquare, faBookOpen, faBugs, faCircleInfo } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -42,7 +47,7 @@ export default function VercelCreateIntegrationPage() {
|
|||||||
const { integrationAuthId } = queryString.parse(router.asPath.split("?")[1]);
|
const { integrationAuthId } = queryString.parse(router.asPath.split("?")[1]);
|
||||||
const { data: workspace } = useGetWorkspaceById(localStorage.getItem("projectData.id") ?? "");
|
const { data: workspace } = useGetWorkspaceById(localStorage.getItem("projectData.id") ?? "");
|
||||||
const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? "");
|
const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? "");
|
||||||
const { data: integrationAuthApps } = useGetIntegrationAuthApps({
|
const { data: integrationAuthApps, isLoading: isintegrationAuthAppsLoading } = useGetIntegrationAuthApps({
|
||||||
integrationAuthId: (integrationAuthId as string) ?? ""
|
integrationAuthId: (integrationAuthId as string) ?? ""
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -109,10 +114,38 @@ export default function VercelCreateIntegrationPage() {
|
|||||||
integrationAuthApps &&
|
integrationAuthApps &&
|
||||||
targetAppId &&
|
targetAppId &&
|
||||||
targetEnvironment ? (
|
targetEnvironment ? (
|
||||||
<div className="flex h-full w-full items-center justify-center">
|
<div className="flex flex-col h-full w-full items-center justify-center">
|
||||||
<Card className="max-w-md rounded-md p-8">
|
<Head>
|
||||||
<CardTitle className="text-center">Vercel Integration</CardTitle>
|
<title>Set Up Vercel Integration</title>
|
||||||
<FormControl label="Project Environment" className="mt-4">
|
<link rel='icon' href='/infisical.ico' />
|
||||||
|
</Head>
|
||||||
|
<Card className="max-w-lg rounded-md border border-mineshaft-600 p-0">
|
||||||
|
<CardTitle
|
||||||
|
className="text-left px-6 text-xl"
|
||||||
|
subTitle="Select which environment or folder in Infisical you want to sync to Vercel's environment variables."
|
||||||
|
>
|
||||||
|
<div className="flex flex-row items-center">
|
||||||
|
<div className="inline flex items-center">
|
||||||
|
<Image
|
||||||
|
src="/images/integrations/Vercel.png"
|
||||||
|
height={30}
|
||||||
|
width={30}
|
||||||
|
alt="Vercel logo"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<span className="ml-2">Vercel Integration </span>
|
||||||
|
<Link href="https://infisical.com/docs/integrations/cloud/vercel" passHref>
|
||||||
|
<a target="_blank" rel="noopener noreferrer">
|
||||||
|
<div className="ml-2 mb-1 rounded-md text-yellow text-sm inline-block bg-yellow/20 px-1.5 pb-[0.03rem] pt-[0.04rem] opacity-80 hover:opacity-100 cursor-default">
|
||||||
|
<FontAwesomeIcon icon={faBookOpen} className="mr-1.5"/>
|
||||||
|
Docs
|
||||||
|
<FontAwesomeIcon icon={faArrowUpRightFromSquare} className="ml-1.5 text-xxs mb-[0.07rem]"/>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</CardTitle>
|
||||||
|
<FormControl label="Infisical Project Environment" className="px-6">
|
||||||
<Select
|
<Select
|
||||||
value={selectedSourceEnvironment}
|
value={selectedSourceEnvironment}
|
||||||
onValueChange={(val) => setSelectedSourceEnvironment(val)}
|
onValueChange={(val) => setSelectedSourceEnvironment(val)}
|
||||||
@@ -128,14 +161,14 @@ export default function VercelCreateIntegrationPage() {
|
|||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormControl label="Secrets Path">
|
<FormControl label="Secrets Path" className="px-6">
|
||||||
<Input
|
<Input
|
||||||
value={secretPath}
|
value={secretPath}
|
||||||
onChange={(evt) => setSecretPath(evt.target.value)}
|
onChange={(evt) => setSecretPath(evt.target.value)}
|
||||||
placeholder="Provide a path, default is /"
|
placeholder="Provide a path, default is /"
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormControl label="Vercel App">
|
<FormControl label="Vercel App" className="px-6">
|
||||||
<Select
|
<Select
|
||||||
value={targetAppId}
|
value={targetAppId}
|
||||||
onValueChange={(val) => setTargetAppId(val)}
|
onValueChange={(val) => setTargetAppId(val)}
|
||||||
@@ -158,7 +191,7 @@ export default function VercelCreateIntegrationPage() {
|
|||||||
)}
|
)}
|
||||||
</Select>
|
</Select>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormControl label="Vercel App Environment">
|
<FormControl label="Vercel App Environment" className="px-6">
|
||||||
<Select
|
<Select
|
||||||
value={targetEnvironment}
|
value={targetEnvironment}
|
||||||
onValueChange={(val) => setTargetEnvironment(val)}
|
onValueChange={(val) => setTargetEnvironment(val)}
|
||||||
@@ -175,7 +208,7 @@ export default function VercelCreateIntegrationPage() {
|
|||||||
</Select>
|
</Select>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
{targetEnvironment === "preview" && filteredBranches && (
|
{targetEnvironment === "preview" && filteredBranches && (
|
||||||
<FormControl label="Vercel Preview Branch (Optional)">
|
<FormControl label="Vercel Preview Branch (Optional)" className="px-6">
|
||||||
<Select
|
<Select
|
||||||
value={targetBranch}
|
value={targetBranch}
|
||||||
onValueChange={(val) => setTargetBranch(val)}
|
onValueChange={(val) => setTargetBranch(val)}
|
||||||
@@ -192,16 +225,40 @@ export default function VercelCreateIntegrationPage() {
|
|||||||
<Button
|
<Button
|
||||||
onClick={handleButtonClick}
|
onClick={handleButtonClick}
|
||||||
color="mineshaft"
|
color="mineshaft"
|
||||||
className="mt-4"
|
variant="outline_bg"
|
||||||
|
className="mt-2 mb-6 ml-auto mr-6"
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
isDisabled={integrationAuthApps.length === 0}
|
isDisabled={integrationAuthApps.length === 0}
|
||||||
>
|
>
|
||||||
Create Integration
|
Create Integration
|
||||||
</Button>
|
</Button>
|
||||||
</Card>
|
</Card>
|
||||||
|
<div className="border-t border-mineshaft-800 w-full max-w-md mt-6"/>
|
||||||
|
<div className="flex flex-col bg-mineshaft-800 border border-mineshaft-600 w-full p-4 max-w-lg mt-6 rounded-md">
|
||||||
|
<div className="flex flex-row items-center"><FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-200 text-xl"/> <span className="ml-3 text-md text-mineshaft-100">Pro Tips</span></div>
|
||||||
|
<span className="text-mineshaft-300 text-sm mt-4">After creating an integration, your secrets will start syncing immediately. This might cause an unexpected override of current secrets in Vercel with secrets from Infisical.</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div />
|
<div className="flex justify-center items-center w-full h-full">
|
||||||
|
<Head>
|
||||||
|
<title>Set Up Vercel Integration</title>
|
||||||
|
<link rel='icon' href='/infisical.ico' />
|
||||||
|
</Head>
|
||||||
|
{isintegrationAuthAppsLoading ? <img src="/images/loading/loading.gif" height={70} width={120} alt="infisical loading indicator" /> : <div className="max-w-md h-max p-6 border border-mineshaft-600 rounded-md bg-mineshaft-800 text-mineshaft-200 flex flex-col text-center">
|
||||||
|
<FontAwesomeIcon icon={faBugs} className="text-6xl my-2 inlineli"/>
|
||||||
|
<p>
|
||||||
|
Something went wrong. Please contact <a
|
||||||
|
className="inline underline underline-offset-4 decoration-primary-500 opacity-80 hover:opacity-100 text-mineshaft-100 duration-200 cursor-pointer"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
href="mailto:[email protected]"
|
||||||
|
>
|
||||||
|
support@infisical.com
|
||||||
|
</a> if the issue persists.
|
||||||
|
</p>
|
||||||
|
</div>}
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user