diff --git a/src/components/newt-install-commands.tsx b/src/components/newt-install-commands.tsx index c2d6f48b6..0d5ecad4c 100644 --- a/src/components/newt-install-commands.tsx +++ b/src/components/newt-install-commands.tsx @@ -10,7 +10,14 @@ import { import { CheckboxWithLabel } from "./ui/checkbox"; import { OptionSelect, type OptionSelectOption } from "./OptionSelect"; import { useState } from "react"; -import { FaApple, FaCubes, FaDocker, FaLinux, FaWindows } from "react-icons/fa"; +import { + FaApple, + FaCubes, + FaDocker, + FaHdd, + FaLinux, + FaWindows +} from "react-icons/fa"; import { SiKubernetes, SiNixos } from "react-icons/si"; export type CommandItem = string | { title: string; command: string }; @@ -20,6 +27,7 @@ const PLATFORMS = [ "macos", "docker", "kubernetes", + "advantech", "podman", "nixos", "windows" @@ -49,6 +57,7 @@ export function NewtSiteInstallCommands({ () => getArchitectures(platform)[0] ); + const showSiteConfiguration = platform !== "advantech"; const supportsSshOption = platform === "linux" || platform === "nixos"; const acceptClientsFlag = !acceptClients ? " --disable-clients" : ""; @@ -193,6 +202,9 @@ sudo systemctl enable --now newt` --set-string newtInstances[0].auth.existingSecretName="newt-main-tunnel-auth"${acceptClientsHelmValue}` ] }, + advantech: { + Documentation: [] + }, podman: { "Podman Quadlet": [ `[Unit] @@ -270,50 +282,52 @@ WantedBy=default.target` className="mt-4" /> -
-

- {t("siteConfiguration")} -

-
- { - const value = checked as boolean; - setAcceptClients(value); - }} - label={t("siteAcceptClientConnections")} - /> + {showSiteConfiguration && ( +
+

+ {t("siteConfiguration")} +

+
+ { + const value = checked as boolean; + setAcceptClients(value); + }} + label={t("siteAcceptClientConnections")} + /> +
+

+ {t("siteAcceptClientConnectionsDescription")} +

+ {supportsSshOption && ( + <> +
+ { + const value = checked as boolean; + setAllowPangolinSsh(value); + }} + label="Allow Pangolin SSH" + /> +
+

+ {t("sitePangolinSshDescription")} +

+ + )}
-

- {t("siteAcceptClientConnectionsDescription")} -

- {supportsSshOption && ( - <> -
- { - const value = checked as boolean; - setAllowPangolinSsh(value); - }} - label="Allow Pangolin SSH" - /> -
-

- {t("sitePangolinSshDescription")} -

- - )} -
+ )}

{t("commands")}

@@ -332,6 +346,20 @@ WantedBy=default.target` .

)} + {platform === "advantech" && ( +

+ For Advantech modem installation instructions, see{" "} + + docs.pangolin.net/manage/sites/install-advantech + + . +

+ )}
{commands.map((item, index) => { const commandText = @@ -376,6 +404,8 @@ function getPlatformIcon(platformName: Platform) { return ; case "kubernetes": return ; + case "advantech": + return ; case "podman": return ; case "nixos": @@ -397,6 +427,8 @@ function getPlatformName(platformName: Platform) { return "Docker"; case "kubernetes": return "Kubernetes"; + case "advantech": + return "Advantech"; case "podman": return "Podman"; case "nixos": @@ -418,6 +450,8 @@ function getArchitectures(platform: Platform) { return ["Docker Compose", "Docker Run"]; case "kubernetes": return ["Helm Chart"]; + case "advantech": + return ["Documentation"]; case "podman": return ["Podman Quadlet", "Podman Run"]; case "nixos":