From c9eb63ff3e00954d05777f087142ca655665e2c3 Mon Sep 17 00:00:00 2001 From: Bernt Christian Egeland Date: Sat, 13 Jan 2024 10:50:28 +0000 Subject: [PATCH] added warning if custom port is used --- .../adminPage/controller/privateRoot.tsx | 32 +++++++++++++++++++ src/locales/en/common.json | 2 ++ src/locales/es/common.json | 2 ++ src/locales/fr/common.json | 2 ++ src/locales/no/common.json | 2 ++ src/locales/zh/common.json | 2 ++ 6 files changed, 42 insertions(+) diff --git a/src/components/adminPage/controller/privateRoot.tsx b/src/components/adminPage/controller/privateRoot.tsx index 8c4e4063..123a5445 100644 --- a/src/components/adminPage/controller/privateRoot.tsx +++ b/src/components/adminPage/controller/privateRoot.tsx @@ -125,6 +125,38 @@ const PrivateRoot = () => {
{getPlanet?.rootNodes?.map((node, i) => (
+ {!node.endpoints.toString().includes("9993") ? ( +
+ + + +
+

+ {t("controller.generatePlanet.customPortIsInUse")} +

+
+ {t.rich( + "controller.generatePlanet.customPortIsInUseDescription", + { + kbd: (content) => ( + {content} + ), + }, + )} +
+
+
+ ) : null}

Root #{i + 1}

Comments: {node.comments} diff --git a/src/locales/en/common.json b/src/locales/en/common.json index f395365c..218c677b 100644 --- a/src/locales/en/common.json +++ b/src/locales/en/common.json @@ -496,6 +496,8 @@ "generatePlanet": { "updatePlanetWarning": "Updating the planet file will modify the core structure of your ZeroTier network, impacting routes, flexibility, and potentially availability. Proceed with caution, understanding the implications.", "customPlanetInUse": "Custom Planet is currently in use!", + "customPortIsInUse": "NOTE! Custom port used", + "customPortIsInUseDescription": "You need to add ZT_PRIMARY_PORT:port to the ZeroTier Docker Compose environment variables.", "downloadPlanetInfo": "Should you need it, the planet file is available for download at the following URL:", "downloadPlanetUrl": "api/planet", "generatePrivateRootLabel": "Generate private root", diff --git a/src/locales/es/common.json b/src/locales/es/common.json index 84c647e2..0b42359a 100644 --- a/src/locales/es/common.json +++ b/src/locales/es/common.json @@ -496,6 +496,8 @@ "generatePlanet": { "updatePlanetWarning": "Actualizar el archivo del planeta modificará la estructura central de tu red ZeroTier, impactando rutas, flexibilidad y potencialmente disponibilidad. Procede con precaución, entendiendo las implicaciones.", "customPlanetInUse": "¡El Planeta Personalizado está actualmente en uso!", + "customPortIsInUse": "¡NOTA! Puerto personalizado utilizado", + "customPortIsInUseDescription": "Necesitas agregar ZT_PRIMARY_PORT:puerto a las variables de entorno de ZeroTier Docker Compose.", "downloadPlanetInfo": "En caso de que lo necesite, el archivo del planeta está disponible para descargar en la siguiente URL:", "downloadPlanetUrl": "api/planet", "generatePrivateRootLabel": "Generar raíz privada", diff --git a/src/locales/fr/common.json b/src/locales/fr/common.json index 1b23c686..8a57bb27 100644 --- a/src/locales/fr/common.json +++ b/src/locales/fr/common.json @@ -496,6 +496,8 @@ "generatePlanet": { "updatePlanetWarning": "La mise à jour du fichier planète modifiera la structure de base de votre réseau ZeroTier, ce qui aura un impact sur les routes, la flexibilité et potentiellement la disponibilité. Procédez avec prudence, en comprenant les implications.", "customPlanetInUse": "La planète personnalisé est actuellement utilisé !", + "customPortIsInUse": "NOTE ! Port personnalisé utilisé", + "customPortIsInUseDescription": "Vous devez ajouter ZT_PRIMARY_PORT:port aux variables d'environnement de ZeroTier Docker Compose.", "downloadPlanetInfo": "Vous pouvez également télécharger le fichier planète en accédant à l'URL :", "downloadPlanetUrl": "api/planet", "generatePrivateRootLabel": "Générer une racine privée", diff --git a/src/locales/no/common.json b/src/locales/no/common.json index edeb4f80..8a2ef26d 100644 --- a/src/locales/no/common.json +++ b/src/locales/no/common.json @@ -496,6 +496,8 @@ "generatePlanet": { "updatePlanetWarning": "Oppdatering av planetfilen vil endre kjernestrukturen i ZeroTier-nettverket ditt, påvirke ruter, fleksibilitet og potensielt tilgjengelighet. Fortsett med forsiktighet, og forstå konsekvensene.", "customPlanetInUse": "Egendefinert Planet er for tiden i bruk!", + "customPortIsInUse": "MERK! Tilpasset port brukt", + "customPortIsInUseDescription": "Du må legge til ZT_PRIMARY_PORT:port i miljøvariablene for ZeroTier Docker Compose.", "downloadPlanetInfo": "Skulle du trenge det, er planetfilen tilgjengelig for nedlasting på følgende nettadresse:", "downloadPlanetUrl": "api/planet", "generatePrivateRootLabel": "Generer privat rot", diff --git a/src/locales/zh/common.json b/src/locales/zh/common.json index 449ed375..11c43697 100644 --- a/src/locales/zh/common.json +++ b/src/locales/zh/common.json @@ -496,6 +496,8 @@ "generatePlanet": { "updatePlanetWarning": "更新planet文件将修改您的ZeroTier网络的核心结构,影响路由,灵活性和可能的可用性。小心进行,理解其中的含义。", "customPlanetInUse": "自定义星球目前正在使用中!", + "customPortIsInUse": "注意!使用了自定义端口", + "customPortIsInUseDescription": "你需要在 ZeroTier Docker Compose 的环境变量中添加 ZT_PRIMARY_PORT:端口。", "downloadPlanetInfo": "如果您需要,可以从以下网址下载行星文件:", "downloadPlanetUrl": "api/planet", "generatePrivateRootLabel": "生成私有根",