From adf62ff86ff6193eedc8de2847a6492d4a0edac7 Mon Sep 17 00:00:00 2001 From: jakub-tldr <78603704+jakub-tldr@users.noreply.github.com> Date: Wed, 4 Mar 2026 14:22:31 +0100 Subject: [PATCH] deploy edge component step --- web/messages/en/initial_wizard.json | 2 + web/src/pages/SetupPage/initial/SetupPage.tsx | 14 +- .../SetupCertificateAuthoritySummaryStep.tsx | 2 +- .../initial/steps/SetupEdgeDeployStep.tsx | 279 ++++++++++++++++++ web/src/pages/SetupPage/initial/types.ts | 1 + 5 files changed, 294 insertions(+), 4 deletions(-) create mode 100644 web/src/pages/SetupPage/initial/steps/SetupEdgeDeployStep.tsx diff --git a/web/messages/en/initial_wizard.json b/web/messages/en/initial_wizard.json index b848082dc4..8541eff216 100644 --- a/web/messages/en/initial_wizard.json +++ b/web/messages/en/initial_wizard.json @@ -15,6 +15,8 @@ "initial_setup_step_certificate_authority_description": "Securing component communication", "initial_setup_step_certificate_authority_summary_label": "Certificate Authority Summary", "initial_setup_step_certificate_authority_summary_description": "Securing component communication", + "initial_setup_step_edge_deploy_label": "Deploy Edge Component", + "initial_setup_step_edge_deploy_description": "Before we can adopt an Edge, this component needs to be launched.", "initial_setup_step_edge_component_label": "Edge Component", "initial_setup_step_edge_component_description": "Set up your VPN proxy quickly and ensure secure, optimized traffic flow for your users.", "initial_setup_step_edge_adoption_label": "Edge Component Adoption", diff --git a/web/src/pages/SetupPage/initial/SetupPage.tsx b/web/src/pages/SetupPage/initial/SetupPage.tsx index 6dde0fa2cf..cf3b7f06af 100644 --- a/web/src/pages/SetupPage/initial/SetupPage.tsx +++ b/web/src/pages/SetupPage/initial/SetupPage.tsx @@ -16,6 +16,7 @@ import { SetupCertificateAuthoritySummaryStep } from './steps/SetupCertificateAu import { SetupConfirmationStep } from './steps/SetupConfirmationStep'; import { SetupEdgeAdoptionStep } from './steps/SetupEdgeAdoptionStep'; import { SetupEdgeComponentStep } from './steps/SetupEdgeComponentStep'; +import { SetupEdgeDeployStep } from './steps/SetupEdgeDeployStep'; import { SetupGeneralConfigStep } from './steps/SetupGeneralConfigStep'; import { SetupPageStep, type SetupPageStepValue } from './types'; import { useSetupWizardStore } from './useSetupWizardStore'; @@ -52,21 +53,27 @@ export const SetupPage = () => { label: m.initial_setup_step_certificate_authority_summary_label(), description: m.initial_setup_step_certificate_authority_summary_description(), }, + edgeDeploy: { + id: SetupPageStep.EdgeDeploy, + order: 5, + label: m.initial_setup_step_edge_deploy_label(), + description: m.initial_setup_step_edge_deploy_description(), + }, edgeComponent: { id: SetupPageStep.EdgeComponent, - order: 5, + order: 6, label: m.initial_setup_step_edge_component_label(), description: m.initial_setup_step_edge_component_description(), }, edgeAdoption: { id: SetupPageStep.EdgeAdoption, - order: 6, + order: 7, label: m.initial_setup_step_edge_adoption_label(), description: m.initial_setup_step_edge_adoption_description(), }, confirmation: { id: SetupPageStep.Confirmation, - order: 7, + order: 8, label: m.initial_setup_step_confirmation_label(), description: m.initial_setup_step_confirmation_description(), }, @@ -80,6 +87,7 @@ export const SetupPage = () => { generalConfig: , certificateAuthority: , certificateAuthoritySummary: , + edgeDeploy: , edgeComponent: , edgeAdoption: , confirmation: , diff --git a/web/src/pages/SetupPage/initial/steps/SetupCertificateAuthoritySummaryStep.tsx b/web/src/pages/SetupPage/initial/steps/SetupCertificateAuthoritySummaryStep.tsx index e4454fbbf7..9a3e741068 100644 --- a/web/src/pages/SetupPage/initial/steps/SetupCertificateAuthoritySummaryStep.tsx +++ b/web/src/pages/SetupPage/initial/steps/SetupCertificateAuthoritySummaryStep.tsx @@ -38,7 +38,7 @@ export const SetupCertificateAuthoritySummaryStep = () => { }; const handleNext = () => { - setActiveStep(SetupPageStep.EdgeComponent); + setActiveStep(SetupPageStep.EdgeDeploy); }; const downloadCA = () => { diff --git a/web/src/pages/SetupPage/initial/steps/SetupEdgeDeployStep.tsx b/web/src/pages/SetupPage/initial/steps/SetupEdgeDeployStep.tsx new file mode 100644 index 0000000000..b9dd7d7d10 --- /dev/null +++ b/web/src/pages/SetupPage/initial/steps/SetupEdgeDeployStep.tsx @@ -0,0 +1,279 @@ +import { type ReactNode, useMemo, useState } from 'react'; +import { m } from '../../../../paraglide/messages'; +import { Card } from '../../../../shared/components/Card/Card'; +import { CodeSnippet } from '../../../../shared/components/CodeSnippet/CodeSnippet'; +import { Controls } from '../../../../shared/components/Controls/Controls'; +import { WizardCard } from '../../../../shared/components/wizard/WizardCard/WizardCard'; +import { AppText } from '../../../../shared/defguard-ui/components/AppText/AppText'; +import { Button } from '../../../../shared/defguard-ui/components/Button/Button'; +import { Checkbox } from '../../../../shared/defguard-ui/components/Checkbox/Checkbox'; +import { Icon, IconKind } from '../../../../shared/defguard-ui/components/Icon'; +import { RenderMarkdown } from '../../../../shared/defguard-ui/components/RenderMarkdown/RenderMarkdown'; +import { SizedBox } from '../../../../shared/defguard-ui/components/SizedBox/SizedBox'; +import { Tabs } from '../../../../shared/defguard-ui/components/Tabs/Tabs'; +import type { TabsItem } from '../../../../shared/defguard-ui/components/Tabs/types'; +import { + TextStyle, + ThemeSpacing, + ThemeVariable, +} from '../../../../shared/defguard-ui/types'; +import '../../../EdgeSetupPage/steps/style.scss'; +import amazonImage from '../../../EdgeSetupPage/assets/amazon.png'; +import kubernetesImage from '../../../EdgeSetupPage/assets/kub.png'; +import teraImage from '../../../EdgeSetupPage/assets/terra.png'; +import { SetupPageStep } from '../types'; +import { useSetupWizardStore } from '../useSetupWizardStore'; + +type TabItem = 'docker' | 'compose' | 'package' | 'virtualImage' | 'other'; + +export const SetupEdgeDeployStep = () => { + const [confirmed, setConfirmed] = useState(false); + const [activeTab, setActiveTab] = useState('docker'); + + const tabsConfig = useMemo( + (): TabsItem[] => [ + { + title: m.edge_setup_step_deploy_tabs_docker(), + onClick: () => setActiveTab('docker'), + active: activeTab === 'docker', + hidden: false, + }, + { + title: m.edge_setup_step_deploy_tabs_compose(), + onClick: () => setActiveTab('compose'), + active: activeTab === 'compose', + hidden: false, + }, + { + title: m.edge_setup_step_deploy_tabs_package(), + onClick: () => setActiveTab('package'), + active: activeTab === 'package', + hidden: false, + }, + { + title: m.edge_setup_step_deploy_tabs_virtual_image(), + onClick: () => setActiveTab('virtualImage'), + active: activeTab === 'virtualImage', + hidden: false, + }, + { + title: m.edge_setup_step_deploy_tabs_other(), + onClick: () => setActiveTab('other'), + active: activeTab === 'other', + hidden: false, + }, + ], + [activeTab], + ); + + return ( + + + + {tabsContent[activeTab]} + + { + setConfirmed((s) => !s); + }} + text={m.edge_setup_step_deploy_confirm()} + /> + + +