From 7f989f77acaad177410acc60ba03830e7ae89ee4 Mon Sep 17 00:00:00 2001 From: miloschwartz Date: Wed, 17 Sep 2025 16:27:22 -0400 Subject: [PATCH] fix type and fix redirect to resource niceId on create --- messages/bg-BG.json | 3 +-- messages/cs-CZ.json | 3 +-- messages/de-DE.json | 1 - messages/en-US.json | 3 +-- messages/es-ES.json | 3 +-- messages/fr-FR.json | 3 +-- messages/it-IT.json | 3 +-- messages/ko-KR.json | 3 +-- messages/nb-NO.json | 3 +-- messages/nl-NL.json | 1 - messages/pl-PL.json | 3 +-- messages/pt-PT.json | 3 +-- messages/ru-RU.json | 3 +-- messages/tr-TR.json | 3 +-- messages/zh-CN.json | 3 +-- .../settings/resources/[niceId]/proxy/page.tsx | 13 ++++--------- src/app/[orgId]/settings/resources/create/page.tsx | 9 +++++---- 17 files changed, 22 insertions(+), 41 deletions(-) diff --git a/messages/bg-BG.json b/messages/bg-BG.json index 70aa50ea..f617a768 100644 --- a/messages/bg-BG.json +++ b/messages/bg-BG.json @@ -1504,7 +1504,6 @@ "idpGoogleDescription": "Google OAuth2/OIDC provider", "idpAzureDescription": "Microsoft Azure OAuth2/OIDC provider", "customHeaders": "Custom Headers", - "customHeadersDescription": "Headers new line separated: Header-Name: value.", "headersValidationError": "Headers must be in the format: Header-Name: value.", "domainPickerProvidedDomain": "Provided Domain", "domainPickerFreeProvidedDomain": "Free Provided Domain", @@ -1521,4 +1520,4 @@ "domainPickerSubdomainCorrected": "\"{sub}\" was corrected to \"{sanitized}\"", "resourceAddEntrypointsEditFile": "Edit file: config/traefik/traefik_config.yml", "resourceExposePortsEditFile": "Edit file: docker-compose.yml" -} \ No newline at end of file +} diff --git a/messages/cs-CZ.json b/messages/cs-CZ.json index 3c2b11a1..7b391431 100644 --- a/messages/cs-CZ.json +++ b/messages/cs-CZ.json @@ -1504,7 +1504,6 @@ "idpGoogleDescription": "Google OAuth2/OIDC provider", "idpAzureDescription": "Microsoft Azure OAuth2/OIDC provider", "customHeaders": "Custom Headers", - "customHeadersDescription": "Headers new line separated: Header-Name: value.", "headersValidationError": "Headers must be in the format: Header-Name: value.", "domainPickerProvidedDomain": "Provided Domain", "domainPickerFreeProvidedDomain": "Free Provided Domain", @@ -1521,4 +1520,4 @@ "domainPickerSubdomainCorrected": "\"{sub}\" was corrected to \"{sanitized}\"", "resourceAddEntrypointsEditFile": "Edit file: config/traefik/traefik_config.yml", "resourceExposePortsEditFile": "Edit file: docker-compose.yml" -} \ No newline at end of file +} diff --git a/messages/de-DE.json b/messages/de-DE.json index 1242bb1d..45009b9a 100644 --- a/messages/de-DE.json +++ b/messages/de-DE.json @@ -1504,7 +1504,6 @@ "idpGoogleDescription": "Google OAuth2/OIDC Provider", "idpAzureDescription": "Microsoft Azure OAuth2/OIDC provider", "customHeaders": "Eigene Kopfzeilen", - "customHeadersDescription": "Header neue Zeile getrennt: Kopfname: Wert.", "headersValidationError": "Header müssen im Format Header-Name: Wert sein.", "domainPickerProvidedDomain": "Angegebene Domain", "domainPickerFreeProvidedDomain": "Kostenlose Domain", diff --git a/messages/en-US.json b/messages/en-US.json index 95ac83b4..2e97bcd1 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -1504,7 +1504,6 @@ "idpGoogleDescription": "Google OAuth2/OIDC provider", "idpAzureDescription": "Microsoft Azure OAuth2/OIDC provider", "customHeaders": "Custom Headers", - "customHeadersDescription": "Headers new line separated: Header-Name: value.", "headersValidationError": "Headers must be in the format: Header-Name: value.", "domainPickerProvidedDomain": "Provided Domain", "domainPickerFreeProvidedDomain": "Free Provided Domain", @@ -1521,4 +1520,4 @@ "domainPickerSubdomainCorrected": "\"{sub}\" was corrected to \"{sanitized}\"", "resourceAddEntrypointsEditFile": "Edit file: config/traefik/traefik_config.yml", "resourceExposePortsEditFile": "Edit file: docker-compose.yml" -} \ No newline at end of file +} diff --git a/messages/es-ES.json b/messages/es-ES.json index 2dbd6483..0a835b33 100644 --- a/messages/es-ES.json +++ b/messages/es-ES.json @@ -1504,7 +1504,6 @@ "idpGoogleDescription": "Proveedor OAuth2/OIDC de Google", "idpAzureDescription": "Microsoft Azure OAuth2/OIDC provider", "customHeaders": "Cabeceras personalizadas", - "customHeadersDescription": "Nueva línea de cabeceras separada: Nombre de cabecera: valor.", "headersValidationError": "Los encabezados deben estar en el formato: Nombre de cabecera: valor.", "domainPickerProvidedDomain": "Dominio proporcionado", "domainPickerFreeProvidedDomain": "Dominio proporcionado gratis", @@ -1521,4 +1520,4 @@ "domainPickerSubdomainCorrected": "\"{sub}\" fue corregido a \"{sanitized}\"", "resourceAddEntrypointsEditFile": "Editar archivo: config/traefik/traefik_config.yml", "resourceExposePortsEditFile": "Editar archivo: docker-compose.yml" -} \ No newline at end of file +} diff --git a/messages/fr-FR.json b/messages/fr-FR.json index 13228c7c..792d1ced 100644 --- a/messages/fr-FR.json +++ b/messages/fr-FR.json @@ -1504,7 +1504,6 @@ "idpGoogleDescription": "Fournisseur Google OAuth2/OIDC", "idpAzureDescription": "Microsoft Azure OAuth2/OIDC provider", "customHeaders": "En-têtes personnalisés", - "customHeadersDescription": "Nouvelles lignes séparées des en-têtes : Nom de l'en-tête : valeur.", "headersValidationError": "Les entêtes doivent être au format : Header-Name: valeur.", "domainPickerProvidedDomain": "Domaine fourni", "domainPickerFreeProvidedDomain": "Domaine fourni gratuitement", @@ -1521,4 +1520,4 @@ "domainPickerSubdomainCorrected": "\"{sub}\" a été corrigé à \"{sanitized}\"", "resourceAddEntrypointsEditFile": "Modifier le fichier : config/traefik/traefik_config.yml", "resourceExposePortsEditFile": "Modifier le fichier : docker-compose.yml" -} \ No newline at end of file +} diff --git a/messages/it-IT.json b/messages/it-IT.json index d3593559..f0a862cd 100644 --- a/messages/it-IT.json +++ b/messages/it-IT.json @@ -1504,7 +1504,6 @@ "idpGoogleDescription": "Google OAuth2/OIDC provider", "idpAzureDescription": "Microsoft Azure OAuth2/OIDC provider", "customHeaders": "Intestazioni Personalizzate", - "customHeadersDescription": "Intestazioni nuova riga separate: Intestazione-Nome: valore.", "headersValidationError": "Le intestazioni devono essere nel formato: Intestazione-Nome: valore.", "domainPickerProvidedDomain": "Dominio Fornito", "domainPickerFreeProvidedDomain": "Dominio Fornito Gratuito", @@ -1521,4 +1520,4 @@ "domainPickerSubdomainCorrected": "\"{sub}\" è stato corretto in \"{sanitized}\"", "resourceAddEntrypointsEditFile": "Modifica file: config/traefik/traefik_config.yml", "resourceExposePortsEditFile": "Modifica file: docker-compose.yml" -} \ No newline at end of file +} diff --git a/messages/ko-KR.json b/messages/ko-KR.json index 586cc68f..64a449d0 100644 --- a/messages/ko-KR.json +++ b/messages/ko-KR.json @@ -1504,7 +1504,6 @@ "idpGoogleDescription": "Google OAuth2/OIDC 공급자", "idpAzureDescription": "Microsoft Azure OAuth2/OIDC 공급자", "customHeaders": "사용자 정의 헤더", - "customHeadersDescription": "헤더는 새 줄로 구분합니다: 헤더명: 값", "headersValidationError": "헤더는 형식이어야 합니다: 헤더명: 값.", "domainPickerProvidedDomain": "제공된 도메인", "domainPickerFreeProvidedDomain": "무료 제공된 도메인", @@ -1521,4 +1520,4 @@ "domainPickerSubdomainCorrected": "\"{sub}\"이(가) \"{sanitized}\"로 수정되었습니다", "resourceAddEntrypointsEditFile": "파일 편집: config/traefik/traefik_config.yml", "resourceExposePortsEditFile": "파일 편집: docker-compose.yml" -} \ No newline at end of file +} diff --git a/messages/nb-NO.json b/messages/nb-NO.json index 88756e5a..ef5c0d2a 100644 --- a/messages/nb-NO.json +++ b/messages/nb-NO.json @@ -1504,7 +1504,6 @@ "idpGoogleDescription": "Google OAuth2/OIDC leverandør", "idpAzureDescription": "Microsoft Azure OAuth2/OIDC provider", "customHeaders": "Egendefinerte topptekster", - "customHeadersDescription": "Overskrifter separert som linje: Header-Name: verdi.", "headersValidationError": "Topptekst må være i formatet: header-navn: verdi.", "domainPickerProvidedDomain": "Gitt domene", "domainPickerFreeProvidedDomain": "Gratis oppgitt domene", @@ -1521,4 +1520,4 @@ "domainPickerSubdomainCorrected": "\"{sub}\" var korrigert til \"{sanitized}\"", "resourceAddEntrypointsEditFile": "Rediger fil: config/traefik/traefik_config.yml", "resourceExposePortsEditFile": "Rediger fil: docker-compose.yml" -} \ No newline at end of file +} diff --git a/messages/nl-NL.json b/messages/nl-NL.json index 87915b96..b7a59e07 100644 --- a/messages/nl-NL.json +++ b/messages/nl-NL.json @@ -1504,7 +1504,6 @@ "idpGoogleDescription": "Google OAuth2/OIDC provider", "idpAzureDescription": "Microsoft Azure OAuth2/OIDC provider", "customHeaders": "Aangepaste headers", - "customHeadersDescription": "Headers nieuwe lijn gescheiden: Header-Naam: waarde.", "headersValidationError": "Headers moeten in het formaat zijn: Header-Naam: waarde.", "domainPickerProvidedDomain": "Opgegeven domein", "domainPickerFreeProvidedDomain": "Gratis verstrekt domein", diff --git a/messages/pl-PL.json b/messages/pl-PL.json index 904d093f..4fe382e1 100644 --- a/messages/pl-PL.json +++ b/messages/pl-PL.json @@ -1504,7 +1504,6 @@ "idpGoogleDescription": "Dostawca Google OAuth2/OIDC", "idpAzureDescription": "Microsoft Azure OAuth2/OIDC provider", "customHeaders": "Niestandardowe nagłówki", - "customHeadersDescription": "Nagłówki oddzielone: Nazwa nagłówka: wartość.", "headersValidationError": "Nagłówki muszą być w formacie: Nazwa nagłówka: wartość.", "domainPickerProvidedDomain": "Dostarczona domena", "domainPickerFreeProvidedDomain": "Darmowa oferowana domena", @@ -1521,4 +1520,4 @@ "domainPickerSubdomainCorrected": "\"{sub}\" został skorygowany do \"{sanitized}\"", "resourceAddEntrypointsEditFile": "Edytuj plik: config/traefik/traefik_config.yml", "resourceExposePortsEditFile": "Edytuj plik: docker-compose.yml" -} \ No newline at end of file +} diff --git a/messages/pt-PT.json b/messages/pt-PT.json index 9f7df737..9fd73d49 100644 --- a/messages/pt-PT.json +++ b/messages/pt-PT.json @@ -1504,7 +1504,6 @@ "idpGoogleDescription": "Provedor Google OAuth2/OIDC", "idpAzureDescription": "Microsoft Azure OAuth2/OIDC provider", "customHeaders": "Cabeçalhos Personalizados", - "customHeadersDescription": "Separados por cabeçalhos da nova linha: Nome do Cabeçalho: valor.", "headersValidationError": "Cabeçalhos devem estar no formato: Nome do Cabeçalho: valor.", "domainPickerProvidedDomain": "Domínio fornecido", "domainPickerFreeProvidedDomain": "Domínio fornecido grátis", @@ -1521,4 +1520,4 @@ "domainPickerSubdomainCorrected": "\"{sub}\" foi corrigido para \"{sanitized}\"", "resourceAddEntrypointsEditFile": "Editar arquivo: config/traefik/traefik_config.yml", "resourceExposePortsEditFile": "Editar arquivo: docker-compose.yml" -} \ No newline at end of file +} diff --git a/messages/ru-RU.json b/messages/ru-RU.json index c3b6b6a7..9c38cc11 100644 --- a/messages/ru-RU.json +++ b/messages/ru-RU.json @@ -1504,7 +1504,6 @@ "idpGoogleDescription": "Google OAuth2/OIDC провайдер", "idpAzureDescription": "Microsoft Azure OAuth2/OIDC provider", "customHeaders": "Пользовательские заголовки", - "customHeadersDescription": "Заголовки новой строки, разделённые: название заголовка: значение.", "headersValidationError": "Заголовки должны быть в формате: Название заголовка: значение.", "domainPickerProvidedDomain": "Домен предоставлен", "domainPickerFreeProvidedDomain": "Бесплатный домен", @@ -1521,4 +1520,4 @@ "domainPickerSubdomainCorrected": "\"{sub}\" был исправлен на \"{sanitized}\"", "resourceAddEntrypointsEditFile": "Редактировать файл: config/traefik/traefik_config.yml", "resourceExposePortsEditFile": "Редактировать файл: docker-compose.yml" -} \ No newline at end of file +} diff --git a/messages/tr-TR.json b/messages/tr-TR.json index 8c63e98a..ef812850 100644 --- a/messages/tr-TR.json +++ b/messages/tr-TR.json @@ -1504,7 +1504,6 @@ "idpGoogleDescription": "Google OAuth2/OIDC sağlayıcısı", "idpAzureDescription": "Microsoft Azure OAuth2/OIDC sağlayıcısı", "customHeaders": "Özel Başlıklar", - "customHeadersDescription": "Başlıklar yeni satıra geçirilmiş: Başlık-Adı: değer.", "headersValidationError": "Başlıklar şu formatta olmalıdır: Başlık-Adı: değer.", "domainPickerProvidedDomain": "Sağlanan Alan Adı", "domainPickerFreeProvidedDomain": "Ücretsiz Sağlanan Alan Adı", @@ -1521,4 +1520,4 @@ "domainPickerSubdomainCorrected": "\"{sub}\" \"{sanitized}\" olarak düzeltildi", "resourceAddEntrypointsEditFile": "Dosyayı düzenle: config/traefik/traefik_config.yml", "resourceExposePortsEditFile": "Dosyayı düzenle: docker-compose.yml" -} \ No newline at end of file +} diff --git a/messages/zh-CN.json b/messages/zh-CN.json index d60cdef3..c78d7460 100644 --- a/messages/zh-CN.json +++ b/messages/zh-CN.json @@ -1504,7 +1504,6 @@ "idpGoogleDescription": "Google OAuth2/OIDC 提供商", "idpAzureDescription": "Microsoft Azure OAuth2/OIDC provider", "customHeaders": "自定义标题", - "customHeadersDescription": "头部新行分隔:头部名称:值。", "headersValidationError": "头部必须是格式:头部名称:值。", "domainPickerProvidedDomain": "提供的域", "domainPickerFreeProvidedDomain": "免费提供的域", @@ -1521,4 +1520,4 @@ "domainPickerSubdomainCorrected": "\"{sub}\" 已被更正为 \"{sanitized}\"", "resourceAddEntrypointsEditFile": "编辑文件:config/traefik/traefik_config.yml", "resourceExposePortsEditFile": "编辑文件:docker-compose.yml" -} \ No newline at end of file +} diff --git a/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx b/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx index 0c1a86e3..ba71a765 100644 --- a/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx +++ b/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx @@ -574,7 +574,7 @@ export default function ReverseProxyTargets(props: { const [showPathInput, setShowPathInput] = useState( !!(row.original.path || row.original.pathMatchType) ); - + if (!showPathInput) { return ( ); } @@ -617,8 +617,8 @@ export default function ReverseProxyTargets(props: { - - {t( - "customHeadersDescription" - )} - )} diff --git a/src/app/[orgId]/settings/resources/create/page.tsx b/src/app/[orgId]/settings/resources/create/page.tsx index e6c4e178..71628ce7 100644 --- a/src/app/[orgId]/settings/resources/create/page.tsx +++ b/src/app/[orgId]/settings/resources/create/page.tsx @@ -408,6 +408,7 @@ export default function Page() { if (res && res.status === 201) { const id = res.data.data.resourceId; + const niceId = res.data.data.niceId; setResourceId(id); // Create targets if any exist @@ -440,7 +441,7 @@ export default function Page() { } if (isHttp) { - router.push(`/${orgId}/settings/resources/${id}`); + router.push(`/${orgId}/settings/resources/${niceId}`); } else { const tcpUdpData = tcpUdpForm.getValues(); // Only show config snippets if enableProxy is explicitly true @@ -551,7 +552,7 @@ export default function Page() { const [showPathInput, setShowPathInput] = useState( !!(row.original.path || row.original.pathMatchType) ); - + if (!showPathInput) { return (