mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 11:27:07 +00:00
improved ui/ux for checkly, gcp, and vault integrations
This commit is contained in:
@@ -468,7 +468,7 @@ export const AppLayout = ({ children }: LayoutProps) => {
|
|||||||
<Link href={`/integrations/${currentWorkspace?._id}`} passHref>
|
<Link href={`/integrations/${currentWorkspace?._id}`} passHref>
|
||||||
<a>
|
<a>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
isSelected={router.asPath === `/integrations/${currentWorkspace?._id}`}
|
isSelected={router.asPath.includes("/integrations")}
|
||||||
icon="system-outline-82-extension"
|
icon="system-outline-82-extension"
|
||||||
>
|
>
|
||||||
{t("nav.menu.integrations")}
|
{t("nav.menu.integrations")}
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
import Head from "next/head";
|
||||||
|
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 { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
useSaveIntegrationAccessToken
|
useSaveIntegrationAccessToken
|
||||||
@@ -41,8 +45,26 @@ export default function ChecklyCreateIntegrationPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-full w-full items-center justify-center">
|
<div className="flex h-full w-full items-center justify-center">
|
||||||
|
<Head>
|
||||||
|
<title>Authorize Checkly Integration</title>
|
||||||
|
<link rel='icon' href='/infisical.ico' />
|
||||||
|
</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 mb-12">
|
||||||
<CardTitle className="text-left px-6" subTitle="After adding your API-key, you will be prompted to set up an integration for a particular Infisical project and environment.">Checkly Integration</CardTitle>
|
<CardTitle
|
||||||
|
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."
|
||||||
|
>
|
||||||
|
Checkly Integration
|
||||||
|
<Link href="https://infisical.com/docs/integrations/cloud/checkly" 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>
|
||||||
|
</CardTitle>
|
||||||
<FormControl
|
<FormControl
|
||||||
label="Checkly API key"
|
label="Checkly API key"
|
||||||
errorText={accessTokenErrorText}
|
errorText={accessTokenErrorText}
|
||||||
@@ -57,7 +79,7 @@ export default function ChecklyCreateIntegrationPage() {
|
|||||||
</FormControl>
|
</FormControl>
|
||||||
<Button
|
<Button
|
||||||
onClick={handleButtonClick}
|
onClick={handleButtonClick}
|
||||||
color="mineshaft"
|
colorSchema="primary"
|
||||||
variant="outline_bg"
|
variant="outline_bg"
|
||||||
className="mb-6 mt-2 ml-auto mr-6 w-min"
|
className="mb-6 mt-2 ml-auto mr-6 w-min"
|
||||||
isFullWidth={false}
|
isFullWidth={false}
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
import Head from "next/head";
|
||||||
|
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 { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -29,7 +33,7 @@ export default function ChecklyCreateIntegrationPage() {
|
|||||||
|
|
||||||
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) ?? ""
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -92,12 +96,25 @@ export default function ChecklyCreateIntegrationPage() {
|
|||||||
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 h-full w-full items-center justify-center bg-gradient-to-tr from-mineshaft-900 to-bunker-900">
|
||||||
|
<Head>
|
||||||
|
<title>Set Up Checkly Integration</title>
|
||||||
|
<link rel='icon' href='/infisical.ico' />
|
||||||
|
</Head>
|
||||||
<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="px-6 text-left"
|
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 with your Checkly account."
|
||||||
>
|
>
|
||||||
Checkly Integration
|
Checkly Integration
|
||||||
|
<Link href="https://infisical.com/docs/integrations/cloud/checkly" 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>
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<FormControl label="Infisical Project Environment" className="mt-4 px-6">
|
<FormControl label="Infisical Project Environment" className="mt-4 px-6">
|
||||||
<Select
|
<Select
|
||||||
@@ -165,7 +182,21 @@ export default function ChecklyCreateIntegrationPage() {
|
|||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div />
|
<div className="flex justify-center items-center w-full h-full">
|
||||||
|
{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,8 +1,11 @@
|
|||||||
import crypto from "crypto";
|
import crypto from "crypto";
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
import Head from "next/head";
|
||||||
|
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";
|
||||||
|
import { faArrowUpRightFromSquare, faBookOpen } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -60,38 +63,60 @@ export default function GCPSecretManagerAuthorizeIntegrationPage() {
|
|||||||
|
|
||||||
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">GCP Secret Manager Integration</CardTitle>
|
<title>Authorize GCP Secret Manager Integration</title>
|
||||||
<Button
|
<link rel='icon' href='/infisical.ico' />
|
||||||
colorSchema="primary"
|
</Head>
|
||||||
variant="outline_bg"
|
<Card className="max-w-lg rounded-md border border-mineshaft-600 mb-12">
|
||||||
onClick={handleIntegrateWithOAuth}
|
<CardTitle
|
||||||
leftIcon={<FontAwesomeIcon icon={faGoogle} className="mr-2" />}
|
className="text-left px-6 text-xl"
|
||||||
className="h-11 w-full mx-0 mt-4"
|
subTitle="Connect Infisical to GCP Secret Manager to sync secrets."
|
||||||
>
|
>
|
||||||
Continue with OAuth
|
GCP Secret Manager Integration
|
||||||
</Button>
|
<Link href="https://infisical.com/docs/integrations/cloud/gcp-secret-manager" passHref>
|
||||||
<div className='w-full flex flex-row items-center my-4 py-2'>
|
<a target="_blank" rel="noopener noreferrer">
|
||||||
<div className='w-full border-t border-mineshaft-400/60' />
|
<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">
|
||||||
<span className="mx-2 text-mineshaft-200 text-xs">or</span>
|
<FontAwesomeIcon icon={faBookOpen} className="mr-1.5"/>
|
||||||
<div className='w-full border-t border-mineshaft-400/60' />
|
Docs
|
||||||
|
<FontAwesomeIcon icon={faArrowUpRightFromSquare} className="ml-1.5 text-xxs mb-[0.07rem]"/>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</Link>
|
||||||
|
</CardTitle>
|
||||||
|
<div className="px-7">
|
||||||
|
<Button
|
||||||
|
colorSchema="primary"
|
||||||
|
variant="outline_bg"
|
||||||
|
onClick={handleIntegrateWithOAuth}
|
||||||
|
leftIcon={<FontAwesomeIcon icon={faGoogle} className="mr-2" />}
|
||||||
|
className="h-11 w-full mx-0 mt-4"
|
||||||
|
>
|
||||||
|
Continue with OAuth
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<div className='w-full flex flex-row items-center my-4 py-2 px-7'>
|
||||||
|
<div className='w-full border-t border-mineshaft-400/40' />
|
||||||
|
<span className="mx-2 text-mineshaft-400 text-xs">or</span>
|
||||||
|
<div className='w-full border-t border-mineshaft-400/40' />
|
||||||
</div>
|
</div>
|
||||||
<FormControl
|
<FormControl
|
||||||
label="GCP Service Account JSON"
|
label="GCP Service Account JSON"
|
||||||
errorText={accessTokenErrorText}
|
errorText={accessTokenErrorText}
|
||||||
isError={accessTokenErrorText !== "" ?? false}
|
isError={accessTokenErrorText !== "" ?? false}
|
||||||
|
className="px-6"
|
||||||
>
|
>
|
||||||
<TextArea
|
<TextArea
|
||||||
value={accessToken}
|
value={accessToken}
|
||||||
onChange={(e) => setAccessToken(e.target.value)}
|
onChange={(e) => setAccessToken(e.target.value)}
|
||||||
placeholder=""
|
placeholder=""
|
||||||
className="h-48"
|
className="h-48 border border-mineshaft-600 bg-bunker-900/80"
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<Button
|
<Button
|
||||||
onClick={handleIntegrateWithPAT}
|
onClick={handleIntegrateWithPAT}
|
||||||
color="mineshaft"
|
colorSchema="primary"
|
||||||
className="mt-4"
|
variant="outline_bg"
|
||||||
|
className="mb-8 mt-2 ml-auto mr-6 w-min"
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
>
|
>
|
||||||
Connect to GCP Secret Manager
|
Connect to GCP Secret Manager
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
import Head from "next/head";
|
||||||
|
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 { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -29,7 +33,7 @@ export default function GCPSecretManagerCreateIntegrationPage() {
|
|||||||
|
|
||||||
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) ?? ""
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -83,9 +87,27 @@ export default function GCPSecretManagerCreateIntegrationPage() {
|
|||||||
integrationAuthApps &&
|
integrationAuthApps &&
|
||||||
targetAppId ? (
|
targetAppId ? (
|
||||||
<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">
|
<Card className="max-w-lg rounded-md border border-mineshaft-600 mb-12">
|
||||||
<CardTitle className="text-center">GCP Secret Manager Integration</CardTitle>
|
<Head>
|
||||||
<FormControl label="Project Environment" className="mt-4">
|
<title>Set Up GCP Secret Manager Integration</title>
|
||||||
|
<link rel='icon' href='/infisical.ico' />
|
||||||
|
</Head>
|
||||||
|
<CardTitle
|
||||||
|
className="text-left px-6 text-xl"
|
||||||
|
subTitle="After creating an integration, your secrets will automatically start syncing from Infisical to GCP Secret Manager."
|
||||||
|
>
|
||||||
|
GCP Secret Manager Integration
|
||||||
|
<Link href="https://infisical.com/docs/integrations/cloud/gcp-secret-manager" 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>
|
||||||
|
</CardTitle>
|
||||||
|
<FormControl label="Project Environment" className="px-6">
|
||||||
<Select
|
<Select
|
||||||
value={selectedSourceEnvironment}
|
value={selectedSourceEnvironment}
|
||||||
onValueChange={(val) => setSelectedSourceEnvironment(val)}
|
onValueChange={(val) => setSelectedSourceEnvironment(val)}
|
||||||
@@ -101,14 +123,14 @@ export default function GCPSecretManagerCreateIntegrationPage() {
|
|||||||
))}
|
))}
|
||||||
</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="GCP Project">
|
<FormControl label="GCP Project" className="px-6">
|
||||||
<Select
|
<Select
|
||||||
value={targetAppId}
|
value={targetAppId}
|
||||||
onValueChange={(val) => setTargetAppId(val)}
|
onValueChange={(val) => setTargetAppId(val)}
|
||||||
@@ -133,8 +155,9 @@ export default function GCPSecretManagerCreateIntegrationPage() {
|
|||||||
</FormControl>
|
</FormControl>
|
||||||
<Button
|
<Button
|
||||||
onClick={handleButtonClick}
|
onClick={handleButtonClick}
|
||||||
color="mineshaft"
|
colorSchema="primary"
|
||||||
className="mt-4"
|
variant="outline_bg"
|
||||||
|
className="mb-8 mt-2 ml-auto mr-6 w-min"
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
isDisabled={integrationAuthApps.length === 0}
|
isDisabled={integrationAuthApps.length === 0}
|
||||||
>
|
>
|
||||||
@@ -143,7 +166,21 @@ export default function GCPSecretManagerCreateIntegrationPage() {
|
|||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div />
|
<div className="flex justify-center items-center w-full h-full">
|
||||||
|
{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,5 +1,9 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
import Head from "next/head";
|
||||||
|
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 { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
useSaveIntegrationAccessToken
|
useSaveIntegrationAccessToken
|
||||||
@@ -80,12 +84,31 @@ export default function HashiCorpVaultAuthorizeIntegrationPage() {
|
|||||||
|
|
||||||
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">Vault Integration</CardTitle>
|
<title>Authorize Vault Integration</title>
|
||||||
|
<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="After adding connecting to Vault, you will be prompted to set up an integration for a particular Infisical project and environment."
|
||||||
|
>
|
||||||
|
HashiCorp Vault Integration
|
||||||
|
<Link href="https://infisical.com/docs/integrations/cloud/hashicorp-vault" 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>
|
||||||
|
</CardTitle>
|
||||||
<FormControl
|
<FormControl
|
||||||
label="Vault Cluster URL"
|
label="Vault Cluster URL"
|
||||||
errorText={vaultURLErrorText}
|
errorText={vaultURLErrorText}
|
||||||
isError={vaultURLErrorText !== "" ?? false}
|
isError={vaultURLErrorText !== "" ?? false}
|
||||||
|
className="px-6"
|
||||||
>
|
>
|
||||||
<Input placeholder="" value={vaultURL} onChange={(e) => setVaultURL(e.target.value)} />
|
<Input placeholder="" value={vaultURL} onChange={(e) => setVaultURL(e.target.value)} />
|
||||||
</FormControl>
|
</FormControl>
|
||||||
@@ -93,6 +116,7 @@ export default function HashiCorpVaultAuthorizeIntegrationPage() {
|
|||||||
label="Vault Namespace"
|
label="Vault Namespace"
|
||||||
errorText={vaultNamespaceErrorText}
|
errorText={vaultNamespaceErrorText}
|
||||||
isError={vaultNamespaceErrorText !== "" ?? false}
|
isError={vaultNamespaceErrorText !== "" ?? false}
|
||||||
|
className="px-6"
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
placeholder="admin/education"
|
placeholder="admin/education"
|
||||||
@@ -104,6 +128,7 @@ export default function HashiCorpVaultAuthorizeIntegrationPage() {
|
|||||||
label="Vault RoleID"
|
label="Vault RoleID"
|
||||||
errorText={vaultRoleIDErrorText}
|
errorText={vaultRoleIDErrorText}
|
||||||
isError={vaultRoleIDErrorText !== "" ?? false}
|
isError={vaultRoleIDErrorText !== "" ?? false}
|
||||||
|
className="px-6"
|
||||||
>
|
>
|
||||||
<Input placeholder="" value={vaultRoleID} onChange={(e) => setVaultRoleID(e.target.value)} />
|
<Input placeholder="" value={vaultRoleID} onChange={(e) => setVaultRoleID(e.target.value)} />
|
||||||
</FormControl>
|
</FormControl>
|
||||||
@@ -111,6 +136,7 @@ export default function HashiCorpVaultAuthorizeIntegrationPage() {
|
|||||||
label="Vault SecretID"
|
label="Vault SecretID"
|
||||||
errorText={vaultSecretIDErrorText}
|
errorText={vaultSecretIDErrorText}
|
||||||
isError={vaultSecretIDErrorText !== "" ?? false}
|
isError={vaultSecretIDErrorText !== "" ?? false}
|
||||||
|
className="px-6"
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
placeholder=""
|
placeholder=""
|
||||||
@@ -120,8 +146,9 @@ export default function HashiCorpVaultAuthorizeIntegrationPage() {
|
|||||||
</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}
|
||||||
>
|
>
|
||||||
Connect to Vault
|
Connect to Vault
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
import Head from "next/head";
|
||||||
|
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 { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -25,7 +29,7 @@ export default function HashiCorpVaultCreateIntegrationPage() {
|
|||||||
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, isLoading: isintegrationAuthLoading } = useGetIntegrationAuthById((integrationAuthId as string) ?? "");
|
||||||
|
|
||||||
const [vaultEnginePath, setVaultEnginePath] = useState("");
|
const [vaultEnginePath, setVaultEnginePath] = useState("");
|
||||||
const [vaultEnginePathErrorText, setVaultEnginePathErrorText] = useState("");
|
const [vaultEnginePathErrorText, setVaultEnginePathErrorText] = useState("");
|
||||||
@@ -80,9 +84,27 @@ export default function HashiCorpVaultCreateIntegrationPage() {
|
|||||||
|
|
||||||
return integrationAuth && workspace ? (
|
return integrationAuth && workspace ? (
|
||||||
<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">Vault Integration</CardTitle>
|
<title>Set Up Vault 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 mb-12">
|
||||||
|
<CardTitle
|
||||||
|
className="text-left px-6 text-xl"
|
||||||
|
subTitle="After creating an integration, your secrets will automatically start syncing from Infisical to Vault."
|
||||||
|
>
|
||||||
|
HashiCorp Vault Integration
|
||||||
|
<Link href="https://infisical.com/docs/integrations/cloud/hashicorp-vault" 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>
|
||||||
|
</CardTitle>
|
||||||
|
<FormControl label="Project Environment" className="px-6">
|
||||||
<Select
|
<Select
|
||||||
value={selectedSourceEnvironment}
|
value={selectedSourceEnvironment}
|
||||||
onValueChange={(val) => setSelectedSourceEnvironment(val)}
|
onValueChange={(val) => setSelectedSourceEnvironment(val)}
|
||||||
@@ -98,7 +120,7 @@ export default function HashiCorpVaultCreateIntegrationPage() {
|
|||||||
))}
|
))}
|
||||||
</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)}
|
||||||
@@ -109,6 +131,7 @@ export default function HashiCorpVaultCreateIntegrationPage() {
|
|||||||
label="Vault KV Secrets Engine Path"
|
label="Vault KV Secrets Engine Path"
|
||||||
errorText={vaultEnginePathErrorText}
|
errorText={vaultEnginePathErrorText}
|
||||||
isError={vaultEnginePathErrorText !== "" ?? false}
|
isError={vaultEnginePathErrorText !== "" ?? false}
|
||||||
|
className="px-6"
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
placeholder="kv"
|
placeholder="kv"
|
||||||
@@ -120,6 +143,7 @@ export default function HashiCorpVaultCreateIntegrationPage() {
|
|||||||
label="Vault Secret(s) Path"
|
label="Vault Secret(s) Path"
|
||||||
errorText={vaultSecretPathErrorText}
|
errorText={vaultSecretPathErrorText}
|
||||||
isError={vaultSecretPathErrorText !== "" ?? false}
|
isError={vaultSecretPathErrorText !== "" ?? false}
|
||||||
|
className="px-6"
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
placeholder="machine/dev"
|
placeholder="machine/dev"
|
||||||
@@ -129,8 +153,9 @@ export default function HashiCorpVaultCreateIntegrationPage() {
|
|||||||
</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={!(isValidVaultPath(vaultEnginePath) && isValidVaultPath(vaultSecretPath))}
|
isDisabled={!(isValidVaultPath(vaultEnginePath) && isValidVaultPath(vaultSecretPath))}
|
||||||
>
|
>
|
||||||
@@ -139,7 +164,21 @@ export default function HashiCorpVaultCreateIntegrationPage() {
|
|||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div />
|
<div className="flex justify-center items-center w-full h-full">
|
||||||
|
{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">
|
||||||
|
<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