From 3ddedc8c9fbd27fee5e96fac409aab450c09fc29 Mon Sep 17 00:00:00 2001 From: d-g-town <66391417+d-g-town@users.noreply.github.com> Date: Mon, 25 Sep 2023 15:22:47 -0400 Subject: [PATCH] link docs for Azure service principal creation; incorporate vertical steps into credential flow, small miscellaneous updates (#3642) Co-authored-by: David Townley --- dashboard/src/components/AzureCostConsent.tsx | 2 +- .../src/components/AzureCredentialForm.tsx | 148 ++++++++++-------- 2 files changed, 83 insertions(+), 67 deletions(-) diff --git a/dashboard/src/components/AzureCostConsent.tsx b/dashboard/src/components/AzureCostConsent.tsx index 4674472041..3cf7deb1c0 100644 --- a/dashboard/src/components/AzureCostConsent.tsx +++ b/dashboard/src/components/AzureCostConsent.tsx @@ -60,7 +60,7 @@ const AzureCostConsent: React.FC = ({
• Azure Kubernetes Service (AKS) = $73/mo - • Amazon EC2: + • Azure virtual machines: + System workloads: Standard_B2als_v2 instance (3) = $82.34/mo diff --git a/dashboard/src/components/AzureCredentialForm.tsx b/dashboard/src/components/AzureCredentialForm.tsx index 7dcda1d184..62a047e3bb 100644 --- a/dashboard/src/components/AzureCredentialForm.tsx +++ b/dashboard/src/components/AzureCredentialForm.tsx @@ -9,16 +9,12 @@ import { Context } from "shared/Context"; import Text from "./porter/Text"; import Spacer from "./porter/Spacer"; -import InputRow from "./form-components/InputRow"; -import SaveButton from "./SaveButton"; -import Fieldset from "./porter/Fieldset"; import Input from "./porter/Input"; import Button from "./porter/Button"; -import DocsHelper from "./DocsHelper"; import Error from "./porter/Error"; -import Step from "./porter/Step"; import Link from "./porter/Link"; import Container from "./porter/Container"; +import VerticalSteps from "./porter/VerticalSteps"; type Props = { goBack: () => void; @@ -33,6 +29,7 @@ const AzureCredentialForm: React.FC = ({ goBack, proceed }) => { const [subscriptionId, setSubscriptionId] = useState(""); const [errorMessage, setErrorMessage] = useState(""); const [isLoading, setIsLoading] = useState(false); + const [currentStep, setCurrentStep] = useState(0); const saveCredentials = async () => { setIsLoading(true); @@ -98,67 +95,85 @@ const AzureCredentialForm: React.FC = ({ goBack, proceed }) => { const renderContent = () => { return ( - <> - -
- - Create an Azure Service Principal and input credentials - - - - Provide the credentials for an Azure Service Principal authorized on - your Azure subscription. - - - Subscription ID} - value={subscriptionId} - setValue={(e) => { - setSubscriptionId(e.trim()); - }} - placeholder="ex: 12345678-abcd-1234-abcd-12345678abcd" - width="100%" - /> - - App ID} - value={clientId} - setValue={(e) => { - setClientId(e.trim()); - }} - placeholder="ex: 12345678-abcd-1234-abcd-12345678abcd" - width="100%" - /> - - Password} - value={servicePrincipalKey} - setValue={(e) => { - setServicePrincipalKey(e.trim()); - }} - placeholder="○ ○ ○ ○ ○ ○ ○ ○ ○" - width="100%" - /> - - Tenant ID} - value={tenantId} - setValue={(e) => { - setTenantId(e.trim()); - }} - placeholder="ex: 12345678-abcd-1234-abcd-12345678abcd" - width="100%" - /> -
- - - + + Set up your Azure subscription + + + Follow our documentation to create your service principal and prepare your subscription for use with Porter. + + + + , + <> + + Input Azure service principal credentials + + + + Provide the credentials for an Azure Service Principal authorized on + your Azure subscription. + + + Subscription ID} + value={subscriptionId} + setValue={(e) => { + setSubscriptionId(e.trim()); + }} + placeholder="ex: 12345678-abcd-1234-abcd-12345678abcd" + width="100%" + /> + + App ID} + value={clientId} + setValue={(e) => { + setClientId(e.trim()); + }} + placeholder="ex: 12345678-abcd-1234-abcd-12345678abcd" + width="100%" + /> + + Password} + value={servicePrincipalKey} + setValue={(e) => { + setServicePrincipalKey(e.trim()); + }} + placeholder="○ ○ ○ ○ ○ ○ ○ ○ ○" + width="100%" + /> + + Tenant ID} + value={tenantId} + setValue={(e) => { + setTenantId(e.trim()); + }} + placeholder="ex: 12345678-abcd-1234-abcd-12345678abcd" + width="100%" + /> + + + + + + + , + ]} + /> ); }; @@ -178,6 +193,7 @@ const AzureCredentialForm: React.FC = ({ goBack, proceed }) => { Grant Porter permissions to create infrastructure in your Azure subscription. + {renderContent()} );