mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-11 00:12:09 +02:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 09d5d9082e | |||
| 5cb316f4e9 | |||
| 6b6c9cf4d8 | |||
| 05617c63c0 | |||
| d4c52bbf2f | |||
| 87f50bf0cc | |||
| 2c66da1b19 | |||
| ab19955502 | |||
| 1db9dcec81 | |||
| 49c2d3163e | |||
| 45b9e13a13 |
@@ -41,7 +41,7 @@ services:
|
||||
- 80:80 # Port for traefik because of the network_mode
|
||||
|
||||
traefik:
|
||||
image: traefik:v3.6
|
||||
image: traefik:v3.7
|
||||
container_name: traefik
|
||||
restart: unless-stopped
|
||||
network_mode: service:gerbil # Ports appear on the gerbil service
|
||||
|
||||
@@ -50,7 +50,7 @@ services:
|
||||
- 80:80{{end}}
|
||||
|
||||
traefik:
|
||||
image: docker.io/traefik:v3.6
|
||||
image: docker.io/traefik:v3.7
|
||||
container_name: traefik
|
||||
restart: unless-stopped
|
||||
{{if .InstallGerbil}}network_mode: service:gerbil # Ports appear on the gerbil service{{end}}{{if not .InstallGerbil}}
|
||||
|
||||
+1
-3
@@ -1462,7 +1462,6 @@
|
||||
"actionGenerateAccessToken": "Генериране на токен за достъп",
|
||||
"actionDeleteAccessToken": "Изтриване на токен за достъп",
|
||||
"actionListAccessTokens": "Изброяване на токени за достъп",
|
||||
"actionCreateResourceSessionToken": "Създаване на токен за сесия на ресурс",
|
||||
"actionCreateResourceRule": "Създаване на правило за ресурс",
|
||||
"actionDeleteResourceRule": "Изтрийте правило за ресурс",
|
||||
"actionListResourceRules": "Изброяване на правила за ресурс",
|
||||
@@ -2393,7 +2392,6 @@
|
||||
"createInternalResourceDialogClose": "Затвори",
|
||||
"createInternalResourceDialogCreateClientResource": "Създаване на частен ресурс",
|
||||
"createInternalResourceDialogCreateClientResourceDescription": "Създайте нов ресурс, който ще бъде достъпен само за клиенти, свързани към организацията",
|
||||
"privateResourceGeneralDescription": "Конфигурирайте името, идентификатора и другите общи настройки на ресурса.",
|
||||
"privateResourceCreatePageSeeAll": "Вижте всички частни ресурси",
|
||||
"privateResourceAllowIcmpPing": "Разрешете ICMP Ping",
|
||||
"privateResourceNetworkAccess": "Достъп до мрежата",
|
||||
@@ -3270,7 +3268,7 @@
|
||||
"editInternalResourceDialogAddUsers": "Добавяне на потребители.",
|
||||
"editInternalResourceDialogAddClients": "Добавяне на клиенти.",
|
||||
"editInternalResourceDialogDestinationLabel": "Дестинация.",
|
||||
"editInternalResourceDialogDestinationDescription": "Конфигурирайте как клиентите да достигнат до този ресурс.",
|
||||
"editInternalResourceDialogDestinationDescription": "Изберете къде работи този ресурс и как клиентите го достигат",
|
||||
"internalResourceFormMultiSiteRoutingHelp": "Избирайки няколко сайта, се осигурява сигурен път и пренасочване при висока достъпност.",
|
||||
"internalResourceFormMultiSiteRoutingHelpLearnMore": "Научете повече",
|
||||
"editInternalResourceDialogPortRestrictionsDescription": "Ограничете достъпа до конкретни TCP/UDP портове или позволете/блокирайте всички портове.",
|
||||
|
||||
+1
-3
@@ -1462,7 +1462,6 @@
|
||||
"actionGenerateAccessToken": "Generovat přístupový token",
|
||||
"actionDeleteAccessToken": "Odstranit přístupový token",
|
||||
"actionListAccessTokens": "Seznam přístupových tokenů",
|
||||
"actionCreateResourceSessionToken": "Vytvořit token relace prostředku",
|
||||
"actionCreateResourceRule": "Vytvořit pravidlo pro zdroj",
|
||||
"actionDeleteResourceRule": "Odstranit pravidlo pro dokument",
|
||||
"actionListResourceRules": "Seznam pravidel zdrojů",
|
||||
@@ -2393,7 +2392,6 @@
|
||||
"createInternalResourceDialogClose": "Zavřít",
|
||||
"createInternalResourceDialogCreateClientResource": "Vytvořit soukromý zdroj",
|
||||
"createInternalResourceDialogCreateClientResourceDescription": "Vytvořte nový zdroj, který bude přístupný pouze klientům připojeným k organizaci",
|
||||
"privateResourceGeneralDescription": "Nastavte název, identifikátor a další obecná nastavení zdroje.",
|
||||
"privateResourceCreatePageSeeAll": "Zobrazit všechny privátní zdroje",
|
||||
"privateResourceAllowIcmpPing": "Povolit ICMP ping",
|
||||
"privateResourceNetworkAccess": "Přístup k síti",
|
||||
@@ -3270,7 +3268,7 @@
|
||||
"editInternalResourceDialogAddUsers": "Přidat uživatele",
|
||||
"editInternalResourceDialogAddClients": "Přidat klienty",
|
||||
"editInternalResourceDialogDestinationLabel": "Cíl",
|
||||
"editInternalResourceDialogDestinationDescription": "Nakonfigurujte, jak klienti dosáhnou tohoto zdroje.",
|
||||
"editInternalResourceDialogDestinationDescription": "Vyberte, kde bude tento zdroj spuštěn a jak ho klienti dosáhnou",
|
||||
"internalResourceFormMultiSiteRoutingHelp": "Výběrem více webů se povolí odolné směrování a přepojení pro vysokou dostupnost.",
|
||||
"internalResourceFormMultiSiteRoutingHelpLearnMore": "Zjistit více",
|
||||
"editInternalResourceDialogPortRestrictionsDescription": "Omezte přístup na specifické TCP/UDP porty nebo povolte/blokujte všechny porty.",
|
||||
|
||||
+2
-4
@@ -1462,7 +1462,6 @@
|
||||
"actionGenerateAccessToken": "Generer adgangstoken",
|
||||
"actionDeleteAccessToken": "Slet adgangstoken",
|
||||
"actionListAccessTokens": "Vis adgangstokens",
|
||||
"actionCreateResourceSessionToken": "Opret ressourcessession token",
|
||||
"actionCreateResourceRule": "Opret ressourceregel",
|
||||
"actionDeleteResourceRule": "Slet ressourceregel",
|
||||
"actionListResourceRules": "Vis ressourceregler",
|
||||
@@ -2393,7 +2392,6 @@
|
||||
"createInternalResourceDialogClose": "Luk",
|
||||
"createInternalResourceDialogCreateClientResource": "Opret privat ressource",
|
||||
"createInternalResourceDialogCreateClientResourceDescription": "Opret en ny ressource som kun vil være tilgængelig for kunder som er forbundet til organisationen",
|
||||
"privateResourceGeneralDescription": "Konfigurer navnet, identifikatoren, og andre generelle indstillinger for ressourcen.",
|
||||
"privateResourceCreatePageSeeAll": "Se alle private ressourcer",
|
||||
"privateResourceAllowIcmpPing": "Tillad ICMP-ping",
|
||||
"privateResourceNetworkAccess": "Netværksadgang",
|
||||
@@ -2548,7 +2546,7 @@
|
||||
"noRemoteExitNodesAvailableDescription": "Ingen noder er tilgængelige for denne organisation. Opret en node først for at bruge lokale sites.",
|
||||
"exitNode": "Exitnode",
|
||||
"country": "Land",
|
||||
"countryIsNot": "Land er ikke",
|
||||
"countryIsNot": "Country Is Not",
|
||||
"rulesMatchCountry": "I øjeblikket baseret på kilde-IP",
|
||||
"region": "Fylke",
|
||||
"selectRegion": "Vælg region",
|
||||
@@ -3270,7 +3268,7 @@
|
||||
"editInternalResourceDialogAddUsers": "Tilføj brugere",
|
||||
"editInternalResourceDialogAddClients": "Tilføj klienter",
|
||||
"editInternalResourceDialogDestinationLabel": "Destination",
|
||||
"editInternalResourceDialogDestinationDescription": "Konfigurer hvordan klienter får adgang til denne ressource.",
|
||||
"editInternalResourceDialogDestinationDescription": "Choose where this resource runs and how clients reach it",
|
||||
"internalResourceFormMultiSiteRoutingHelp": "Valg af flere sites muliggør robust routing og failover for høj tilgængelighed.",
|
||||
"internalResourceFormMultiSiteRoutingHelpLearnMore": "Læs mere",
|
||||
"editInternalResourceDialogPortRestrictionsDescription": "Begrens adgang til specifikke TCP/UDP-porte eller tillade/blokere alle porte.",
|
||||
|
||||
+2
-4
@@ -1462,7 +1462,6 @@
|
||||
"actionGenerateAccessToken": "Zugriffstoken generieren",
|
||||
"actionDeleteAccessToken": "Zugriffstoken löschen",
|
||||
"actionListAccessTokens": "Zugriffstoken auflisten",
|
||||
"actionCreateResourceSessionToken": "Ressourcensitzungstoken erstellen",
|
||||
"actionCreateResourceRule": "Ressourcenregel erstellen",
|
||||
"actionDeleteResourceRule": "Ressourcenregel löschen",
|
||||
"actionListResourceRules": "Ressourcenregeln auflisten",
|
||||
@@ -2393,7 +2392,6 @@
|
||||
"createInternalResourceDialogClose": "Schließen",
|
||||
"createInternalResourceDialogCreateClientResource": "Private Ressource erstellen",
|
||||
"createInternalResourceDialogCreateClientResourceDescription": "Erstelle eine neue Ressource, die nur für Clients zugänglich ist, die mit der Organisation verbunden sind",
|
||||
"privateResourceGeneralDescription": "Konfigurieren Sie den Namen, die Kennung und andere allgemeine Ressourceneinstellungen.",
|
||||
"privateResourceCreatePageSeeAll": "Alle privaten Ressourcen anzeigen",
|
||||
"privateResourceAllowIcmpPing": "ICMP-Ping zulassen",
|
||||
"privateResourceNetworkAccess": "Netzwerkzugriff",
|
||||
@@ -3270,7 +3268,7 @@
|
||||
"editInternalResourceDialogAddUsers": "Nutzer hinzufügen",
|
||||
"editInternalResourceDialogAddClients": "Clients hinzufügen",
|
||||
"editInternalResourceDialogDestinationLabel": "Ziel",
|
||||
"editInternalResourceDialogDestinationDescription": "Konfigurieren Sie, wie Clients diese Ressource erreichen.",
|
||||
"editInternalResourceDialogDestinationDescription": "Wählen Sie aus, wo diese Ressource läuft und wie Clients darauf zugreifen können",
|
||||
"internalResourceFormMultiSiteRoutingHelp": "Durch die Auswahl mehrerer Seiten wird ein ausfallsicheres Routing und Failover für hohe Verfügbarkeit ermöglicht.",
|
||||
"internalResourceFormMultiSiteRoutingHelpLearnMore": "Mehr erfahren",
|
||||
"editInternalResourceDialogPortRestrictionsDescription": "Den Zugriff auf bestimmte TCP/UDP-Ports beschränken oder alle Ports erlauben/blockieren.",
|
||||
@@ -3681,7 +3679,7 @@
|
||||
"resourceLauncherSaveForEveryoneDescription": "Teilen Sie diese Ansicht mit allen Organisationsmitgliedern. Wenn nicht aktiviert, ist die Ansicht nur für Sie sichtbar.",
|
||||
"resourceLauncherMakePersonal": "Persönlich machen",
|
||||
"resourceLauncherFilter": "Filter",
|
||||
"resourceLauncherFilterWithCount": "Filter, {count} angewendet",
|
||||
"resourceLauncherFilterWithCount": "Filter, {count} applied",
|
||||
"resourceLauncherSort": "Sortieren",
|
||||
"resourceLauncherSortAscending": "Aufsteigend sortieren",
|
||||
"resourceLauncherSortDescending": "Absteigend sortieren",
|
||||
|
||||
+1
-4
@@ -1397,7 +1397,6 @@
|
||||
"createOrgUser": "Create Org User",
|
||||
"actionUpdateOrg": "Update Organization",
|
||||
"actionRemoveInvitation": "Remove Invitation",
|
||||
"actionRemoveUserRole": "Remove User Role",
|
||||
"actionUpdateUser": "Update User",
|
||||
"actionGetUser": "Get User",
|
||||
"actionGetOrgUser": "Get Organization User",
|
||||
@@ -1463,7 +1462,6 @@
|
||||
"actionGenerateAccessToken": "Generate Access Token",
|
||||
"actionDeleteAccessToken": "Delete Access Token",
|
||||
"actionListAccessTokens": "List Access Tokens",
|
||||
"actionCreateResourceSessionToken": "Create Resource Session Token",
|
||||
"actionCreateResourceRule": "Create Resource Rule",
|
||||
"actionDeleteResourceRule": "Delete Resource Rule",
|
||||
"actionListResourceRules": "List Resource Rules",
|
||||
@@ -2394,7 +2392,6 @@
|
||||
"createInternalResourceDialogClose": "Close",
|
||||
"createInternalResourceDialogCreateClientResource": "Create Private Resource",
|
||||
"createInternalResourceDialogCreateClientResourceDescription": "Create a new resource that will only be accessible to clients connected to the organization",
|
||||
"privateResourceGeneralDescription": "Configure the name, identifier, and other general resource settings.",
|
||||
"privateResourceCreatePageSeeAll": "See All Private Resources",
|
||||
"privateResourceAllowIcmpPing": "Allow ICMP Ping",
|
||||
"privateResourceNetworkAccess": "Network Access",
|
||||
@@ -3271,7 +3268,7 @@
|
||||
"editInternalResourceDialogAddUsers": "Add Users",
|
||||
"editInternalResourceDialogAddClients": "Add Clients",
|
||||
"editInternalResourceDialogDestinationLabel": "Destination",
|
||||
"editInternalResourceDialogDestinationDescription": "Configure how clients reach this resource.",
|
||||
"editInternalResourceDialogDestinationDescription": "Choose where this resource runs and how clients reach it",
|
||||
"internalResourceFormMultiSiteRoutingHelp": "Selecting multiple sites enables resilient routing and failover for high availability.",
|
||||
"internalResourceFormMultiSiteRoutingHelpLearnMore": "Learn more",
|
||||
"editInternalResourceDialogPortRestrictionsDescription": "Restrict access to specific TCP/UDP ports or allow/block all ports.",
|
||||
|
||||
+1
-3
@@ -1462,7 +1462,6 @@
|
||||
"actionGenerateAccessToken": "Generar token de acceso",
|
||||
"actionDeleteAccessToken": "Eliminar token de acceso",
|
||||
"actionListAccessTokens": "Lista de Tokens de Acceso",
|
||||
"actionCreateResourceSessionToken": "Crear Token de Sesión de Recurso",
|
||||
"actionCreateResourceRule": "Crear Regla de Recursos",
|
||||
"actionDeleteResourceRule": "Eliminar Regla de Recurso",
|
||||
"actionListResourceRules": "Lista de Reglas de Recursos",
|
||||
@@ -2393,7 +2392,6 @@
|
||||
"createInternalResourceDialogClose": "Cerrar",
|
||||
"createInternalResourceDialogCreateClientResource": "Crear recurso privado",
|
||||
"createInternalResourceDialogCreateClientResourceDescription": "Crear un nuevo recurso que sólo será accesible a los clientes conectados a la organización",
|
||||
"privateResourceGeneralDescription": "Configura el nombre, identificador y otros ajustes generales del recurso.",
|
||||
"privateResourceCreatePageSeeAll": "Ver todos los recursos privados",
|
||||
"privateResourceAllowIcmpPing": "Permitir ping ICMP",
|
||||
"privateResourceNetworkAccess": "Acceso de red",
|
||||
@@ -3270,7 +3268,7 @@
|
||||
"editInternalResourceDialogAddUsers": "Agregar usuarios",
|
||||
"editInternalResourceDialogAddClients": "Agregar clientes",
|
||||
"editInternalResourceDialogDestinationLabel": "Destino",
|
||||
"editInternalResourceDialogDestinationDescription": "Configura cómo los clientes acceden a este recurso.",
|
||||
"editInternalResourceDialogDestinationDescription": "Elija dónde se ejecuta este recurso y cómo lo alcanzan los clientes",
|
||||
"internalResourceFormMultiSiteRoutingHelp": "Seleccionar múltiples sitios habilita el enrutamiento resistente y la conmutación por error para alta disponibilidad.",
|
||||
"internalResourceFormMultiSiteRoutingHelpLearnMore": "Más información",
|
||||
"editInternalResourceDialogPortRestrictionsDescription": "Restringir el acceso a puertos TCP/UDP específicos o permitir/bloquear todos los puertos.",
|
||||
|
||||
+1
-3
@@ -1462,7 +1462,6 @@
|
||||
"actionGenerateAccessToken": "Générer un jeton d'accès",
|
||||
"actionDeleteAccessToken": "Supprimer un jeton d'accès",
|
||||
"actionListAccessTokens": "Lister les jetons d'accès",
|
||||
"actionCreateResourceSessionToken": "Créer un jeton de session de ressource",
|
||||
"actionCreateResourceRule": "Créer une règle de ressource",
|
||||
"actionDeleteResourceRule": "Supprimer une règle de ressource",
|
||||
"actionListResourceRules": "Lister les règles de ressource",
|
||||
@@ -2393,7 +2392,6 @@
|
||||
"createInternalResourceDialogClose": "Fermer",
|
||||
"createInternalResourceDialogCreateClientResource": "Créer une ressource privée",
|
||||
"createInternalResourceDialogCreateClientResourceDescription": "Créer une nouvelle ressource qui ne sera accessible qu'aux clients connectés à l'organisation",
|
||||
"privateResourceGeneralDescription": "Configurez le nom, l'identifiant et d'autres paramètres généraux de la ressource.",
|
||||
"privateResourceCreatePageSeeAll": "Voir toutes les ressources privées",
|
||||
"privateResourceAllowIcmpPing": "Autoriser le ping ICMP",
|
||||
"privateResourceNetworkAccess": "Accès au réseau",
|
||||
@@ -3270,7 +3268,7 @@
|
||||
"editInternalResourceDialogAddUsers": "Ajouter des utilisateurs",
|
||||
"editInternalResourceDialogAddClients": "Ajouter des clients",
|
||||
"editInternalResourceDialogDestinationLabel": "Destination",
|
||||
"editInternalResourceDialogDestinationDescription": "Configurez comment les clients accèdent à cette ressource.",
|
||||
"editInternalResourceDialogDestinationDescription": "Choisissez où cette ressource fonctionne et comment les clients l'atteignent",
|
||||
"internalResourceFormMultiSiteRoutingHelp": "La sélection de plusieurs sites permet un routage résilient et un basculement pour une haute disponibilité.",
|
||||
"internalResourceFormMultiSiteRoutingHelpLearnMore": "En savoir plus",
|
||||
"editInternalResourceDialogPortRestrictionsDescription": "Restreindre l'accès à des ports TCP/UDP spécifiques ou autoriser/bloquer tous les ports.",
|
||||
|
||||
+1
-3
@@ -1462,7 +1462,6 @@
|
||||
"actionGenerateAccessToken": "Genera Token di Accesso",
|
||||
"actionDeleteAccessToken": "Elimina Token di Accesso",
|
||||
"actionListAccessTokens": "Elenca Token di Accesso",
|
||||
"actionCreateResourceSessionToken": "Crea Token di Sessione della Risorsa",
|
||||
"actionCreateResourceRule": "Crea Regola Risorsa",
|
||||
"actionDeleteResourceRule": "Elimina Regola Risorsa",
|
||||
"actionListResourceRules": "Elenca Regole Risorsa",
|
||||
@@ -2393,7 +2392,6 @@
|
||||
"createInternalResourceDialogClose": "Chiudi",
|
||||
"createInternalResourceDialogCreateClientResource": "Crea Risorsa Privata",
|
||||
"createInternalResourceDialogCreateClientResourceDescription": "Crea una nuova risorsa che sarà accessibile solo ai client connessi all'organizzazione",
|
||||
"privateResourceGeneralDescription": "Configura il nome, l'identificativo e altre impostazioni generali delle risorse.",
|
||||
"privateResourceCreatePageSeeAll": "Vedi Tutte le Risorse Private",
|
||||
"privateResourceAllowIcmpPing": "Consenti ICMP Ping",
|
||||
"privateResourceNetworkAccess": "Accesso alla Rete",
|
||||
@@ -3270,7 +3268,7 @@
|
||||
"editInternalResourceDialogAddUsers": "Aggiungi Utenti",
|
||||
"editInternalResourceDialogAddClients": "Aggiungi Clienti",
|
||||
"editInternalResourceDialogDestinationLabel": "Destinazione",
|
||||
"editInternalResourceDialogDestinationDescription": "Configura come i client raggiungono questa risorsa.",
|
||||
"editInternalResourceDialogDestinationDescription": "Scegli dove eseguire questa risorsa e come i client lo raggiungono",
|
||||
"internalResourceFormMultiSiteRoutingHelp": "Selezionare più siti consente un routing resiliente e Failover per alta disponibilità.",
|
||||
"internalResourceFormMultiSiteRoutingHelpLearnMore": "Scopri di più",
|
||||
"editInternalResourceDialogPortRestrictionsDescription": "Limita l'accesso a porte TCP/UDP specifiche o consenti/blocca tutte le porte.",
|
||||
|
||||
+1
-3
@@ -1462,7 +1462,6 @@
|
||||
"actionGenerateAccessToken": "액세스 토큰 생성",
|
||||
"actionDeleteAccessToken": "액세스 토큰 삭제",
|
||||
"actionListAccessTokens": "액세스 토큰 목록",
|
||||
"actionCreateResourceSessionToken": "리소스 세션 토큰 생성",
|
||||
"actionCreateResourceRule": "리소스 규칙 생성",
|
||||
"actionDeleteResourceRule": "리소스 규칙 삭제",
|
||||
"actionListResourceRules": "리소스 규칙 목록",
|
||||
@@ -2393,7 +2392,6 @@
|
||||
"createInternalResourceDialogClose": "닫기",
|
||||
"createInternalResourceDialogCreateClientResource": "사이트 리소스 생성",
|
||||
"createInternalResourceDialogCreateClientResourceDescription": "선택한 사이트에 연결된 클라이언트에 접근할 새 리소스를 생성합니다",
|
||||
"privateResourceGeneralDescription": "이름, 식별자, 기타 일반 리소스 설정을 구성합니다.",
|
||||
"privateResourceCreatePageSeeAll": "모든 개인 리소스 보기",
|
||||
"privateResourceAllowIcmpPing": "ICMP 핑 허용",
|
||||
"privateResourceNetworkAccess": "네트워크 접근",
|
||||
@@ -3270,7 +3268,7 @@
|
||||
"editInternalResourceDialogAddUsers": "사용자 추가",
|
||||
"editInternalResourceDialogAddClients": "클라이언트 추가",
|
||||
"editInternalResourceDialogDestinationLabel": "대상지",
|
||||
"editInternalResourceDialogDestinationDescription": "클라이언트가 이 리소스에 어떻게 도달하는지 구성합니다.",
|
||||
"editInternalResourceDialogDestinationDescription": "이 리소스가 실행되는 위치와 고객이 도달하는 방법 선택",
|
||||
"internalResourceFormMultiSiteRoutingHelp": "다중 사이트를 선택하면 높은 가용성을 위해 회복력 있는 라우팅 및 페일오버가 가능해집니다.",
|
||||
"internalResourceFormMultiSiteRoutingHelpLearnMore": "자세히 알아보기",
|
||||
"editInternalResourceDialogPortRestrictionsDescription": "특정 TCP/UDP 포트에 대한 접근을 제한하거나 모든 포트를 허용/차단하십시오.",
|
||||
|
||||
+1
-3
@@ -1462,7 +1462,6 @@
|
||||
"actionGenerateAccessToken": "Generer tilgangstoken",
|
||||
"actionDeleteAccessToken": "Slett tilgangstoken",
|
||||
"actionListAccessTokens": "List opp tilgangstokener",
|
||||
"actionCreateResourceSessionToken": "Opprett ressurs økt-token",
|
||||
"actionCreateResourceRule": "Opprett ressursregel",
|
||||
"actionDeleteResourceRule": "Slett ressursregel",
|
||||
"actionListResourceRules": "List opp ressursregler",
|
||||
@@ -2393,7 +2392,6 @@
|
||||
"createInternalResourceDialogClose": "Lukk",
|
||||
"createInternalResourceDialogCreateClientResource": "Opprett privat ressurs",
|
||||
"createInternalResourceDialogCreateClientResourceDescription": "Opprett en ny ressurs som bare vil være tilgjengelig for kunder som er koblet til organisasjonen",
|
||||
"privateResourceGeneralDescription": "Konfigurer navnet, identifikatoren og andre generelle ressursinnstillinger.",
|
||||
"privateResourceCreatePageSeeAll": "Se alle private ressurser",
|
||||
"privateResourceAllowIcmpPing": "Tillat ICMP Ping",
|
||||
"privateResourceNetworkAccess": "Nettverkstilgang",
|
||||
@@ -3270,7 +3268,7 @@
|
||||
"editInternalResourceDialogAddUsers": "Legg til brukere",
|
||||
"editInternalResourceDialogAddClients": "Legg til klienter",
|
||||
"editInternalResourceDialogDestinationLabel": "Destinasjon",
|
||||
"editInternalResourceDialogDestinationDescription": "Konfigurer hvordan klienter får tilgang til denne ressursen.",
|
||||
"editInternalResourceDialogDestinationDescription": "Velg hvor denne ressursen kjører og hvordan klienter når den",
|
||||
"internalResourceFormMultiSiteRoutingHelp": "Valg av flere nettsteder muliggjør motstandskraftig ruting og failover for høy tilgjengelighet.",
|
||||
"internalResourceFormMultiSiteRoutingHelpLearnMore": "Lær mer",
|
||||
"editInternalResourceDialogPortRestrictionsDescription": "Begrens tilgang til spesifikke TCP/UDP-porter eller tillate/blokkere alle porter.",
|
||||
|
||||
+1
-3
@@ -1462,7 +1462,6 @@
|
||||
"actionGenerateAccessToken": "Genereer Toegangstoken",
|
||||
"actionDeleteAccessToken": "Verwijder toegangstoken",
|
||||
"actionListAccessTokens": "Lijst toegangstokens",
|
||||
"actionCreateResourceSessionToken": "Maak Resource Sessie Token",
|
||||
"actionCreateResourceRule": "Bronregel aanmaken",
|
||||
"actionDeleteResourceRule": "Verwijder Resource Regel",
|
||||
"actionListResourceRules": "Bron regels weergeven",
|
||||
@@ -2393,7 +2392,6 @@
|
||||
"createInternalResourceDialogClose": "Sluiten",
|
||||
"createInternalResourceDialogCreateClientResource": "Privé bron maken",
|
||||
"createInternalResourceDialogCreateClientResourceDescription": "Maak een nieuwe bron aan die alleen toegankelijk is voor klanten die verbonden zijn met de organisatie",
|
||||
"privateResourceGeneralDescription": "Configureer de naam, identificatie en andere algemene resource-instellingen.",
|
||||
"privateResourceCreatePageSeeAll": "Bekijk Alle Privébronnen",
|
||||
"privateResourceAllowIcmpPing": "Sta ICMP Ping toe",
|
||||
"privateResourceNetworkAccess": "Netwerktoegang",
|
||||
@@ -3270,7 +3268,7 @@
|
||||
"editInternalResourceDialogAddUsers": "Gebruikers toevoegen",
|
||||
"editInternalResourceDialogAddClients": "Clienten toevoegen",
|
||||
"editInternalResourceDialogDestinationLabel": "Bestemming",
|
||||
"editInternalResourceDialogDestinationDescription": "Configureer hoe klanten toegang krijgen tot deze resource.",
|
||||
"editInternalResourceDialogDestinationDescription": "Kies waar deze bron draait en hoe clients deze bereiken",
|
||||
"internalResourceFormMultiSiteRoutingHelp": "Selecteren van meerdere sites maakt veerkrachtige routing en failover mogelijk voor hoge beschikbaarheid.",
|
||||
"internalResourceFormMultiSiteRoutingHelpLearnMore": "Meer informatie",
|
||||
"editInternalResourceDialogPortRestrictionsDescription": "Beperk toegang tot specifieke TCP/UDP-poorten of sta alle poorten toe/blokkeer.",
|
||||
|
||||
+1
-3
@@ -1462,7 +1462,6 @@
|
||||
"actionGenerateAccessToken": "Wygeneruj token dostępu",
|
||||
"actionDeleteAccessToken": "Usuń token dostępu",
|
||||
"actionListAccessTokens": "Lista tokenów dostępu",
|
||||
"actionCreateResourceSessionToken": "Utwórz token sesji zasobu",
|
||||
"actionCreateResourceRule": "Utwórz regułę zasobu",
|
||||
"actionDeleteResourceRule": "Usuń regułę zasobu",
|
||||
"actionListResourceRules": "Lista reguł zasobu",
|
||||
@@ -2393,7 +2392,6 @@
|
||||
"createInternalResourceDialogClose": "Zamknij",
|
||||
"createInternalResourceDialogCreateClientResource": "Utwórz zasób prywatny",
|
||||
"createInternalResourceDialogCreateClientResourceDescription": "Utwórz nowy zasób, który będzie dostępny tylko dla klientów podłączonych do organizacji",
|
||||
"privateResourceGeneralDescription": "Skonfiguruj nazwę, identyfikator i inne ogólne ustawienia zasobów.",
|
||||
"privateResourceCreatePageSeeAll": "Zobacz wszystkie zasoby prywatne",
|
||||
"privateResourceAllowIcmpPing": "Zezwalaj na ping ICMP",
|
||||
"privateResourceNetworkAccess": "Dostęp do sieci",
|
||||
@@ -3270,7 +3268,7 @@
|
||||
"editInternalResourceDialogAddUsers": "Dodaj użytkowników",
|
||||
"editInternalResourceDialogAddClients": "Dodaj klientów",
|
||||
"editInternalResourceDialogDestinationLabel": "Miejsce docelowe",
|
||||
"editInternalResourceDialogDestinationDescription": "Skonfiguruj sposób, w jaki klienci docierają do tego zasobu.",
|
||||
"editInternalResourceDialogDestinationDescription": "Wybierz, gdzie ten zasób działa i jak klienci go osiągają",
|
||||
"internalResourceFormMultiSiteRoutingHelp": "Wybór wielu stron umożliwia odporne trasowanie i awarię dla wysokiej dostępności.",
|
||||
"internalResourceFormMultiSiteRoutingHelpLearnMore": "Dowiedz się więcej",
|
||||
"editInternalResourceDialogPortRestrictionsDescription": "Ogranicz dostęp do konkretnych portów TCP/UDP lub zezwól/zablokuj wszystkie porty.",
|
||||
|
||||
+1
-3
@@ -1462,7 +1462,6 @@
|
||||
"actionGenerateAccessToken": "Gerar Token de Acesso",
|
||||
"actionDeleteAccessToken": "Eliminar Token de Acesso",
|
||||
"actionListAccessTokens": "Listar Tokens de Acesso",
|
||||
"actionCreateResourceSessionToken": "Criar Token de Sessão de Recurso",
|
||||
"actionCreateResourceRule": "Criar Regra de Recurso",
|
||||
"actionDeleteResourceRule": "Eliminar Regra de Recurso",
|
||||
"actionListResourceRules": "Listar Regras de Recurso",
|
||||
@@ -2393,7 +2392,6 @@
|
||||
"createInternalResourceDialogClose": "Fechar",
|
||||
"createInternalResourceDialogCreateClientResource": "Criar Recurso Privado",
|
||||
"createInternalResourceDialogCreateClientResourceDescription": "Criar um novo recurso que só será acessível para clientes conectados à organização",
|
||||
"privateResourceGeneralDescription": "Configure o nome, identificador e outras configurações gerais de recursos.",
|
||||
"privateResourceCreatePageSeeAll": "Ver Todos os Recursos Privados",
|
||||
"privateResourceAllowIcmpPing": "Permitir ICMP Ping",
|
||||
"privateResourceNetworkAccess": "Acesso à Rede",
|
||||
@@ -3270,7 +3268,7 @@
|
||||
"editInternalResourceDialogAddUsers": "Adicionar Usuários",
|
||||
"editInternalResourceDialogAddClients": "Adicionar Clientes",
|
||||
"editInternalResourceDialogDestinationLabel": "Destino",
|
||||
"editInternalResourceDialogDestinationDescription": "Configure como os clientes acessam este recurso.",
|
||||
"editInternalResourceDialogDestinationDescription": "Escolha onde este recurso é executado e como os clientes o acessam",
|
||||
"internalResourceFormMultiSiteRoutingHelp": "Selecionar múltiplos sites permite roteamento resiliente e failover para alta disponibilidade.",
|
||||
"internalResourceFormMultiSiteRoutingHelpLearnMore": "Saiba mais",
|
||||
"editInternalResourceDialogPortRestrictionsDescription": "Restrinja o acesso a portas TCP/UDP específicas ou permita/bloqueie todas as portas.",
|
||||
|
||||
+2
-4
@@ -1462,7 +1462,6 @@
|
||||
"actionGenerateAccessToken": "Сгенерировать токен доступа",
|
||||
"actionDeleteAccessToken": "Удалить токен доступа",
|
||||
"actionListAccessTokens": "Список токенов доступа",
|
||||
"actionCreateResourceSessionToken": "Создать токен сеанса ресурса",
|
||||
"actionCreateResourceRule": "Создать правило ресурса",
|
||||
"actionDeleteResourceRule": "Удалить правило ресурса",
|
||||
"actionListResourceRules": "Список правил ресурса",
|
||||
@@ -2393,7 +2392,6 @@
|
||||
"createInternalResourceDialogClose": "Закрыть",
|
||||
"createInternalResourceDialogCreateClientResource": "Создать приватный ресурс",
|
||||
"createInternalResourceDialogCreateClientResourceDescription": "Создать новый ресурс, который будет доступен только клиентам, подключенным к организации",
|
||||
"privateResourceGeneralDescription": "Настройте имя, идентификатор и другие общие параметры ресурса.",
|
||||
"privateResourceCreatePageSeeAll": "Посмотреть все частные ресурсы",
|
||||
"privateResourceAllowIcmpPing": "Разрешить ICMP Ping",
|
||||
"privateResourceNetworkAccess": "Сетевой доступ",
|
||||
@@ -3270,7 +3268,7 @@
|
||||
"editInternalResourceDialogAddUsers": "Добавить пользователей",
|
||||
"editInternalResourceDialogAddClients": "Добавить клиентов",
|
||||
"editInternalResourceDialogDestinationLabel": "Пункт назначения",
|
||||
"editInternalResourceDialogDestinationDescription": "Настройте, как клиенты получают доступ к этому ресурсу.",
|
||||
"editInternalResourceDialogDestinationDescription": "Выберите, где этот ресурс работает и как к нему получают доступ клиенты",
|
||||
"internalResourceFormMultiSiteRoutingHelp": "Выбор нескольких сайтов позволяет обеспечить отказоустойчивую маршрутизацию и фейловер для высокой доступности.",
|
||||
"internalResourceFormMultiSiteRoutingHelpLearnMore": "Узнать больше",
|
||||
"editInternalResourceDialogPortRestrictionsDescription": "Ограничьте доступ к определенным TCP/UDP-портам или разрешите/заблокируйте все порты.",
|
||||
@@ -3681,7 +3679,7 @@
|
||||
"resourceLauncherSaveForEveryoneDescription": "Поделитесь этим видом со всеми членами организации. Если не отмечено, видимость только для вас.",
|
||||
"resourceLauncherMakePersonal": "Сделать личным",
|
||||
"resourceLauncherFilter": "Фильтр",
|
||||
"resourceLauncherFilterWithCount": "Фильтр, применено {count}",
|
||||
"resourceLauncherFilterWithCount": "Filter, {count} applied",
|
||||
"resourceLauncherSort": "Сортировать",
|
||||
"resourceLauncherSortAscending": "Сортировать по возрастанию",
|
||||
"resourceLauncherSortDescending": "Сортировать по убыванию",
|
||||
|
||||
+1
-3
@@ -1462,7 +1462,6 @@
|
||||
"actionGenerateAccessToken": "Erişim Jetonu Oluştur",
|
||||
"actionDeleteAccessToken": "Erişim Jetonunu Sil",
|
||||
"actionListAccessTokens": "Erişim Jetonlarını Listele",
|
||||
"actionCreateResourceSessionToken": "Kaynak Oturum Otomasyonu Oluştur",
|
||||
"actionCreateResourceRule": "Kaynak Kuralı Oluştur",
|
||||
"actionDeleteResourceRule": "Kaynak Kuralını Sil",
|
||||
"actionListResourceRules": "Kaynak Kurallarını Listele",
|
||||
@@ -2393,7 +2392,6 @@
|
||||
"createInternalResourceDialogClose": "Kapat",
|
||||
"createInternalResourceDialogCreateClientResource": "Özel Kaynak Oluştur",
|
||||
"createInternalResourceDialogCreateClientResourceDescription": "Seçilen siteye bağlı istemcilere erişilebilir olacak yeni bir kaynak oluşturun",
|
||||
"privateResourceGeneralDescription": "Kaynağın adı, tanımlayıcı ve diğer genel ayarlarını yapılandırın.",
|
||||
"privateResourceCreatePageSeeAll": "Tüm Özel Kaynakları Gör",
|
||||
"privateResourceAllowIcmpPing": "ICMP Ping İzne Ver",
|
||||
"privateResourceNetworkAccess": "Ağ Erişimi",
|
||||
@@ -3270,7 +3268,7 @@
|
||||
"editInternalResourceDialogAddUsers": "Kullanıcılar Ekle",
|
||||
"editInternalResourceDialogAddClients": "Müşteriler Ekle",
|
||||
"editInternalResourceDialogDestinationLabel": "Hedef",
|
||||
"editInternalResourceDialogDestinationDescription": "Bu kaynağa müşterilerin nasıl erişeceğini yapılandırın.",
|
||||
"editInternalResourceDialogDestinationDescription": "Bu kaynağın nerede çalıştığını ve istemcilerin ona nasıl eriştiğini seçin",
|
||||
"internalResourceFormMultiSiteRoutingHelp": "Birden fazla site seçmek, yüksek kullanılabilirlik için dirençli yönlendirme ve yedeklik sağlar.",
|
||||
"internalResourceFormMultiSiteRoutingHelpLearnMore": "Daha fazla bilgi",
|
||||
"editInternalResourceDialogPortRestrictionsDescription": "Belirtilen TCP/UDP portlarına erişimi kısıtlayın veya tüm portlara izin/engelleme verin.",
|
||||
|
||||
+1
-3
@@ -1462,7 +1462,6 @@
|
||||
"actionGenerateAccessToken": "生成访问令牌",
|
||||
"actionDeleteAccessToken": "删除访问令牌",
|
||||
"actionListAccessTokens": "访问令牌",
|
||||
"actionCreateResourceSessionToken": "创建资源会话令牌",
|
||||
"actionCreateResourceRule": "创建资源规则",
|
||||
"actionDeleteResourceRule": "删除资源规则",
|
||||
"actionListResourceRules": "列出资源规则",
|
||||
@@ -2393,7 +2392,6 @@
|
||||
"createInternalResourceDialogClose": "关闭",
|
||||
"createInternalResourceDialogCreateClientResource": "创建私有资源",
|
||||
"createInternalResourceDialogCreateClientResourceDescription": "创建一个新资源只能为连接到组织的客户端访问",
|
||||
"privateResourceGeneralDescription": "配置名称、标识符和其他一般资源设置。",
|
||||
"privateResourceCreatePageSeeAll": "查看所有私人资源",
|
||||
"privateResourceAllowIcmpPing": "允许 ICMP Ping",
|
||||
"privateResourceNetworkAccess": "网络访问",
|
||||
@@ -3270,7 +3268,7 @@
|
||||
"editInternalResourceDialogAddUsers": "添加用户",
|
||||
"editInternalResourceDialogAddClients": "添加客户端",
|
||||
"editInternalResourceDialogDestinationLabel": "目标",
|
||||
"editInternalResourceDialogDestinationDescription": "配置客户端如何访问此资源。",
|
||||
"editInternalResourceDialogDestinationDescription": "选择该资源运行位置及客户端访问方式",
|
||||
"internalResourceFormMultiSiteRoutingHelp": "选择多个站点可以实现高可用性的弹性路由和故障转移。",
|
||||
"internalResourceFormMultiSiteRoutingHelpLearnMore": "了解更多",
|
||||
"editInternalResourceDialogPortRestrictionsDescription": "限制访问特定的TCP/UDP端口或允许/阻止所有端口。",
|
||||
|
||||
@@ -1099,7 +1099,6 @@
|
||||
"actionGenerateAccessToken": "生成訪問令牌",
|
||||
"actionDeleteAccessToken": "刪除訪問令牌",
|
||||
"actionListAccessTokens": "訪問令牌",
|
||||
"actionCreateResourceSessionToken": "建立資源工作階段權杖",
|
||||
"actionCreateResourceRule": "創建資源規則",
|
||||
"actionDeleteResourceRule": "刪除資源規則",
|
||||
"actionListResourceRules": "列出資源規則",
|
||||
|
||||
Generated
+4
-4
@@ -12,7 +12,7 @@
|
||||
"@asteasolutions/zod-to-openapi": "8.5.0",
|
||||
"@aws-sdk/client-s3": "3.1056.0",
|
||||
"@devolutions/iron-remote-desktop": "https://static.pangolin.net/packages/devolutions-iron-remote-desktop-0.0.0.tgz",
|
||||
"@devolutions/iron-remote-desktop-rdp": "https://static.pangolin.net/packages/devolutions-iron-remote-desktop-rdp-0.0.1.tgz",
|
||||
"@devolutions/iron-remote-desktop-rdp": "https://static.pangolin.net/packages/devolutions-iron-remote-desktop-rdp-0.0.0.tgz",
|
||||
"@headlessui/react": "2.2.10",
|
||||
"@hookform/resolvers": "5.4.0",
|
||||
"@monaco-editor/react": "4.7.0",
|
||||
@@ -1124,9 +1124,9 @@
|
||||
"integrity": "sha512-9o7PkCw9fdvGTPs0hgsUJG10QleGgcdsSCw1ekLpUOlVXtWCuiuPH+0bPDFhLWxqbVA+8pyVhwqdOI+t1T3TNA=="
|
||||
},
|
||||
"node_modules/@devolutions/iron-remote-desktop-rdp": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://static.pangolin.net/packages/devolutions-iron-remote-desktop-rdp-0.0.1.tgz",
|
||||
"integrity": "sha512-sIHllJ6rJfAgClsUFjJfVGFjIxm6ZQRyGfinwCzHYgwnHAMFE+Kvm0YzR9tg811Fhjm5F6gNUSLAll+7Eh0Deg=="
|
||||
"version": "0.0.0",
|
||||
"resolved": "https://static.pangolin.net/packages/devolutions-iron-remote-desktop-rdp-0.0.0.tgz",
|
||||
"integrity": "sha512-O0YVpOJDwUzekH3N2QKj+48WP+56wI0sj4VmaJkGoW5XgyAj2ONn2k3i+vk17Eavx+Vg6vAg3lwYRAOK4kKIDQ=="
|
||||
},
|
||||
"node_modules/@dotenvx/dotenvx": {
|
||||
"version": "1.69.1",
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
"dependencies": {
|
||||
"@asteasolutions/zod-to-openapi": "8.5.0",
|
||||
"@devolutions/iron-remote-desktop": "https://static.pangolin.net/packages/devolutions-iron-remote-desktop-0.0.0.tgz",
|
||||
"@devolutions/iron-remote-desktop-rdp": "https://static.pangolin.net/packages/devolutions-iron-remote-desktop-rdp-0.0.1.tgz",
|
||||
"@devolutions/iron-remote-desktop-rdp": "https://static.pangolin.net/packages/devolutions-iron-remote-desktop-rdp-0.0.0.tgz",
|
||||
"@aws-sdk/client-s3": "3.1056.0",
|
||||
"@headlessui/react": "2.2.10",
|
||||
"@hookform/resolvers": "5.4.0",
|
||||
|
||||
@@ -71,7 +71,6 @@ export enum ActionsEnum {
|
||||
setResourceWhitelist = "setResourceWhitelist",
|
||||
getResourceWhitelist = "getResourceWhitelist",
|
||||
generateAccessToken = "generateAccessToken",
|
||||
createResourceSessionToken = "createResourceSessionToken",
|
||||
deleteAcessToken = "deleteAcessToken",
|
||||
listAccessTokens = "listAccessTokens",
|
||||
createResourceRule = "createResourceRule",
|
||||
|
||||
@@ -34,6 +34,12 @@ import {
|
||||
rebuildClientAssociationsFromSiteResource,
|
||||
waitForSiteResourceRebuildIdle
|
||||
} from "../rebuildClientAssociations";
|
||||
import { build } from "@server/build";
|
||||
import HttpCode from "@server/types/HttpCode";
|
||||
import createHttpError from "http-errors";
|
||||
import next from "next";
|
||||
import { LimitId } from "../billing";
|
||||
import { usageService } from "../billing/usageService";
|
||||
|
||||
type ApplyBlueprintArgs = {
|
||||
orgId: string;
|
||||
|
||||
@@ -26,6 +26,9 @@ import { createCertificate } from "#dynamic/routers/certificates/createCertifica
|
||||
import { isLicensedOrSubscribed } from "#dynamic/lib/isLicencedOrSubscribed";
|
||||
import { tierMatrix } from "../billing/tierMatrix";
|
||||
import { build } from "@server/build";
|
||||
import HttpCode from "@server/types/HttpCode";
|
||||
import createHttpError from "http-errors";
|
||||
import next from "next";
|
||||
import { LimitId } from "../billing";
|
||||
import { usageService } from "../billing/usageService";
|
||||
|
||||
@@ -240,7 +243,8 @@ export async function updatePrivateResources(
|
||||
scheme: resourceData.scheme,
|
||||
destination: resourceData.destination,
|
||||
destinationPort: resourceData["destination-port"],
|
||||
enabled: resourceData.enabled ?? true,
|
||||
enabled: true, // hardcoded for now
|
||||
// enabled: resourceData.enabled ?? true,
|
||||
alias: resourceData.alias || null,
|
||||
disableIcmp:
|
||||
resourceData["disable-icmp"] ||
|
||||
@@ -492,7 +496,8 @@ export async function updatePrivateResources(
|
||||
scheme: resourceData.scheme,
|
||||
destination: resourceData.destination,
|
||||
destinationPort: resourceData["destination-port"],
|
||||
enabled: resourceData.enabled ?? true,
|
||||
enabled: true, // hardcoded for now
|
||||
// enabled: resourceData.enabled ?? true,
|
||||
alias: resourceData.alias || null,
|
||||
aliasAddress: aliasAddress,
|
||||
disableIcmp:
|
||||
|
||||
@@ -470,7 +470,7 @@ export const PrivateResourceSchema = z
|
||||
// proxyPort: z.int().positive().optional(),
|
||||
"destination-port": z.int().positive().optional(),
|
||||
destination: z.string().min(1).optional(),
|
||||
enabled: z.boolean().default(true),
|
||||
// enabled: z.boolean().default(true),
|
||||
"tcp-ports": portRangeStringSchema.optional().default("*"),
|
||||
"udp-ports": portRangeStringSchema.optional().default("*"),
|
||||
"disable-icmp": z.boolean().optional().default(false),
|
||||
|
||||
@@ -496,7 +496,6 @@ export function generateRemoteSubnets(
|
||||
): string[] {
|
||||
const remoteSubnets = allSiteResources
|
||||
.filter((sr) => {
|
||||
if (!sr.enabled) return false;
|
||||
if (!sr.destination) return false;
|
||||
|
||||
if (sr.mode === "cidr") {
|
||||
@@ -531,7 +530,6 @@ export function generateAliasConfig(allSiteResources: SiteResource[]): Alias[] {
|
||||
return allSiteResources
|
||||
.filter(
|
||||
(sr) =>
|
||||
sr.enabled &&
|
||||
sr.aliasAddress &&
|
||||
((sr.alias && (sr.mode == "host" || sr.mode == "ssh")) ||
|
||||
(sr.fullDomain && sr.mode == "http"))
|
||||
@@ -664,13 +662,6 @@ export async function generateSubnetProxyTargetV2(
|
||||
subnet: string | null;
|
||||
}[]
|
||||
): Promise<SubnetProxyTargetV2[] | undefined> {
|
||||
if (!siteResource.enabled) {
|
||||
logger.debug(
|
||||
`Site resource ${siteResource.siteResourceId} is disabled, skipping target generation.`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (clients.length === 0) {
|
||||
logger.debug(
|
||||
`No clients have access to site resource ${siteResource.siteResourceId}, skipping target generation.`
|
||||
|
||||
@@ -1561,19 +1561,9 @@ export async function handleMessagingForUpdatedSiteResource(
|
||||
updatedSiteResource.udpPortRangeString ||
|
||||
existingSiteResource.disableIcmp !==
|
||||
updatedSiteResource.disableIcmp);
|
||||
// Toggling enabled on/off doesn't change any of the fields above, but it
|
||||
// does change whether targets/peer data should exist at all, so it needs
|
||||
// to drive the same old->new diff machinery: going enabled->disabled
|
||||
// diffs "real data" against "nothing" (a remove), and disabled->enabled
|
||||
// diffs "nothing" against "real data" (an add). generateSubnetProxyTargetV2/
|
||||
// generateRemoteSubnets/generateAliasConfig already return nothing for a
|
||||
// disabled resource, so no other changes are needed here.
|
||||
const enabledChanged =
|
||||
existingSiteResource &&
|
||||
existingSiteResource.enabled !== updatedSiteResource.enabled;
|
||||
|
||||
logger.debug(
|
||||
`handleMessagingForUpdatedSiteResource: change flags destinationChanged=${Boolean(destinationChanged)} destinationPortChanged=${Boolean(destinationPortChanged)} aliasChanged=${Boolean(aliasChanged)} fullDomainChanged=${Boolean(fullDomainChanged)} sslChanged=${Boolean(sslChanged)} portRangesChanged=${Boolean(portRangesChanged)} enabledChanged=${Boolean(enabledChanged)}`
|
||||
`handleMessagingForUpdatedSiteResource: change flags destinationChanged=${Boolean(destinationChanged)} destinationPortChanged=${Boolean(destinationPortChanged)} aliasChanged=${Boolean(aliasChanged)} fullDomainChanged=${Boolean(fullDomainChanged)} sslChanged=${Boolean(sslChanged)} portRangesChanged=${Boolean(portRangesChanged)}`
|
||||
);
|
||||
|
||||
// if the existingSiteResource is undefined (new resource) we don't need to do anything here, the rebuild above handled it all
|
||||
@@ -1584,16 +1574,14 @@ export async function handleMessagingForUpdatedSiteResource(
|
||||
fullDomainChanged ||
|
||||
sslChanged ||
|
||||
portRangesChanged ||
|
||||
destinationPortChanged ||
|
||||
enabledChanged
|
||||
destinationPortChanged
|
||||
) {
|
||||
const shouldUpdateTargets =
|
||||
destinationChanged ||
|
||||
sslChanged ||
|
||||
portRangesChanged ||
|
||||
fullDomainChanged ||
|
||||
destinationPortChanged ||
|
||||
enabledChanged;
|
||||
destinationPortChanged;
|
||||
|
||||
logger.debug(
|
||||
`handleMessagingForUpdatedSiteResource: entering unchanged-site update path shouldUpdateTargets=${shouldUpdateTargets}`
|
||||
@@ -1669,22 +1657,20 @@ export async function handleMessagingForUpdatedSiteResource(
|
||||
peerDataUpdateBatch.push({
|
||||
clientId: client.clientId,
|
||||
siteId,
|
||||
remoteSubnets:
|
||||
destinationChanged || enabledChanged
|
||||
? {
|
||||
oldRemoteSubnets:
|
||||
!oldDestinationStillInUseBySite
|
||||
? generateRemoteSubnets([
|
||||
existingSiteResource
|
||||
])
|
||||
: [],
|
||||
newRemoteSubnets: generateRemoteSubnets([
|
||||
updatedSiteResource
|
||||
])
|
||||
}
|
||||
: undefined,
|
||||
remoteSubnets: destinationChanged
|
||||
? {
|
||||
oldRemoteSubnets: !oldDestinationStillInUseBySite
|
||||
? generateRemoteSubnets([
|
||||
existingSiteResource
|
||||
])
|
||||
: [],
|
||||
newRemoteSubnets: generateRemoteSubnets([
|
||||
updatedSiteResource
|
||||
])
|
||||
}
|
||||
: undefined,
|
||||
aliases:
|
||||
aliasChanged || fullDomainChanged || enabledChanged // the full domain is sent down as an alias
|
||||
aliasChanged || fullDomainChanged // the full domain is sent down as an alias
|
||||
? {
|
||||
oldAliases: generateAliasConfig([
|
||||
existingSiteResource
|
||||
|
||||
@@ -736,14 +736,11 @@ export async function verifyResourceSession(
|
||||
}
|
||||
}
|
||||
|
||||
// If headerAuthExtendedCompatibility is activated but no clientHeaderAuth provided, force client to challenge.
|
||||
// Skip the challenge when SSO is also enabled so browsers get the SSO redirect instead of a native Basic
|
||||
// Auth dialog; clients that proactively send Authorization: Basic are still accepted above.
|
||||
// If headerAuthExtendedCompatibility is activated but no clientHeaderAuth provided, force client to challenge
|
||||
if (
|
||||
headerAuthExtendedCompatibility &&
|
||||
headerAuthExtendedCompatibility.extendedCompatibilityIsActivated &&
|
||||
!clientHeaderAuth &&
|
||||
!sso
|
||||
!clientHeaderAuth
|
||||
) {
|
||||
return headerAuthChallenged(res, redirectPath, resource.orgId);
|
||||
}
|
||||
|
||||
@@ -808,16 +808,6 @@ authenticated.post(
|
||||
accessToken.generateAccessToken
|
||||
);
|
||||
|
||||
authenticated.post(
|
||||
`/resource/:resourceId/session-token`,
|
||||
verifyApiKeyResourceAccess,
|
||||
verifyApiKeyUserAccess,
|
||||
verifyLimits,
|
||||
verifyApiKeyHasAction(ActionsEnum.createResourceSessionToken),
|
||||
logActionAudit(ActionsEnum.createResourceSessionToken),
|
||||
resource.createResourceSessionToken
|
||||
);
|
||||
|
||||
authenticated.delete(
|
||||
`/access-token/:accessTokenId`,
|
||||
verifyApiKeyAccessTokenAccess,
|
||||
|
||||
@@ -148,12 +148,7 @@ export async function buildClientConfigurationForNewtClient(
|
||||
.from(siteResources)
|
||||
.innerJoin(networks, eq(siteResources.networkId, networks.networkId))
|
||||
.innerJoin(siteNetworks, eq(networks.networkId, siteNetworks.networkId))
|
||||
.where(
|
||||
and(
|
||||
eq(siteNetworks.siteId, siteId),
|
||||
eq(siteResources.enabled, true)
|
||||
)
|
||||
)
|
||||
.where(eq(siteNetworks.siteId, siteId))
|
||||
.then((rows) => rows.map((r) => r.siteResources));
|
||||
|
||||
const targetsToSend: SubnetProxyTargetV2[] = [];
|
||||
|
||||
@@ -94,13 +94,7 @@ async function flushSitePingsToDb(): Promise<void> {
|
||||
const pingsToFlush = new Map(pendingSitePings);
|
||||
pendingSitePings.clear();
|
||||
|
||||
// Sort by id ascending so concurrent writers (other app replicas, or
|
||||
// unrelated single-row updates elsewhere in the app) always acquire row
|
||||
// locks in the same order. Without this, overlapping batches/updates
|
||||
// that touch the same rows in different orders can deadlock each other.
|
||||
const entries = Array.from(pingsToFlush.entries()).sort(
|
||||
([a], [b]) => a - b
|
||||
);
|
||||
const entries = Array.from(pingsToFlush.entries());
|
||||
|
||||
const BATCH_SIZE = 50;
|
||||
for (let i = 0; i < entries.length; i += BATCH_SIZE) {
|
||||
@@ -199,11 +193,7 @@ async function flushClientPingsToDb(): Promise<void> {
|
||||
|
||||
// ── Flush client pings ─────────────────────────────────────────────
|
||||
if (pingsToFlush.size > 0) {
|
||||
// Sort ascending for consistent lock ordering (see note in
|
||||
// flushSitePingsToDb).
|
||||
const entries = Array.from(pingsToFlush.entries()).sort(
|
||||
([a], [b]) => a - b
|
||||
);
|
||||
const entries = Array.from(pingsToFlush.entries());
|
||||
|
||||
const BATCH_SIZE = 50;
|
||||
for (let i = 0; i < entries.length; i += BATCH_SIZE) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
generateRemoteSubnets
|
||||
} from "@server/lib/ip";
|
||||
import logger from "@server/logger";
|
||||
import { and, eq, inArray } from "drizzle-orm";
|
||||
import { eq, inArray } from "drizzle-orm";
|
||||
import { addPeer, deletePeer } from "../newt/peers";
|
||||
import config from "@server/lib/config";
|
||||
|
||||
@@ -70,13 +70,7 @@ export async function buildSiteConfigurationForOlmClient(
|
||||
.innerJoin(networks, eq(siteResources.networkId, networks.networkId))
|
||||
.innerJoin(siteNetworks, eq(networks.networkId, siteNetworks.networkId))
|
||||
.where(
|
||||
and(
|
||||
eq(
|
||||
clientSiteResourcesAssociationsCache.clientId,
|
||||
client.clientId
|
||||
),
|
||||
eq(siteResources.enabled, true)
|
||||
)
|
||||
eq(clientSiteResourcesAssociationsCache.clientId, client.clientId)
|
||||
);
|
||||
|
||||
const siteResourcesBySiteId = new Map<number, SiteResource[]>();
|
||||
|
||||
@@ -1,133 +0,0 @@
|
||||
import { Request, Response, NextFunction } from "express";
|
||||
import { z } from "zod";
|
||||
import { db } from "@server/db";
|
||||
import { resources, users, userOrgs } from "@server/db";
|
||||
import { eq, and } from "drizzle-orm";
|
||||
import { createResourceSession } from "@server/auth/sessions/resource";
|
||||
import HttpCode from "@server/types/HttpCode";
|
||||
import createHttpError from "http-errors";
|
||||
import { fromError } from "zod-validation-error";
|
||||
import logger from "@server/logger";
|
||||
import { createSession, generateSessionToken } from "@server/auth/sessions/app";
|
||||
import { response } from "@server/lib/response";
|
||||
|
||||
const createResourceSessionTokenParams = z.strictObject({
|
||||
resourceId: z.coerce.number().int().positive()
|
||||
});
|
||||
|
||||
const createResourceSessionTokenBody = z.strictObject({
|
||||
userId: z.string().nonempty(),
|
||||
idpId: z.coerce.number().int().positive().optional()
|
||||
});
|
||||
|
||||
export type CreateResourceSessionTokenResponse = {
|
||||
requestToken: string;
|
||||
};
|
||||
|
||||
export async function createResourceSessionToken(
|
||||
req: Request,
|
||||
res: Response,
|
||||
next: NextFunction
|
||||
): Promise<any> {
|
||||
try {
|
||||
const parsedParams = createResourceSessionTokenParams.safeParse(
|
||||
req.params
|
||||
);
|
||||
if (!parsedParams.success) {
|
||||
return next(
|
||||
createHttpError(
|
||||
HttpCode.BAD_REQUEST,
|
||||
fromError(parsedParams.error).toString()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
const parsedBody = createResourceSessionTokenBody.safeParse(req.body);
|
||||
if (!parsedBody.success) {
|
||||
return next(
|
||||
createHttpError(
|
||||
HttpCode.BAD_REQUEST,
|
||||
fromError(parsedBody.error).toString()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
const { resourceId } = parsedParams.data;
|
||||
const { userId, idpId } = parsedBody.data;
|
||||
|
||||
const [resource] = await db
|
||||
.select()
|
||||
.from(resources)
|
||||
.where(eq(resources.resourceId, resourceId))
|
||||
.limit(1);
|
||||
|
||||
if (!resource) {
|
||||
return next(
|
||||
createHttpError(
|
||||
HttpCode.NOT_FOUND,
|
||||
`Resource with ID ${resourceId} not found`
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
const candidates = await db
|
||||
.select({ userId: users.userId })
|
||||
.from(userOrgs)
|
||||
.innerJoin(users, eq(userOrgs.userId, users.userId))
|
||||
.where(
|
||||
and(
|
||||
eq(users.userId, userId),
|
||||
eq(userOrgs.orgId, resource.orgId)
|
||||
)
|
||||
);
|
||||
|
||||
if (candidates.length === 0) {
|
||||
return next(
|
||||
createHttpError(
|
||||
HttpCode.NOT_FOUND,
|
||||
`User not found in the organization that owns this resource`
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (candidates.length > 1) {
|
||||
return next(
|
||||
createHttpError(
|
||||
HttpCode.BAD_REQUEST,
|
||||
"Multiple users match this username (external users from different identity providers). Specify idpId to disambiguate."
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
const targetUserId = candidates[0].userId;
|
||||
|
||||
const appSessionToken = generateSessionToken();
|
||||
const appSession = await createSession(appSessionToken, targetUserId);
|
||||
|
||||
const requestToken = generateSessionToken();
|
||||
await createResourceSession({
|
||||
resourceId,
|
||||
token: requestToken,
|
||||
userSessionId: appSession.sessionId,
|
||||
isRequestToken: true,
|
||||
expiresAt: Date.now() + 1000 * 30, // 30 seconds
|
||||
sessionLength: 1000 * 30,
|
||||
doNotExtend: true
|
||||
});
|
||||
|
||||
logger.debug("Resource session token created successfully");
|
||||
|
||||
return response<CreateResourceSessionTokenResponse>(res, {
|
||||
data: { requestToken },
|
||||
success: true,
|
||||
error: false,
|
||||
message: "Resource session token created successfully",
|
||||
status: HttpCode.OK
|
||||
});
|
||||
} catch (error) {
|
||||
logger.error(error);
|
||||
return next(
|
||||
createHttpError(HttpCode.INTERNAL_SERVER_ERROR, "An error occurred")
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,6 @@ export * from "./getResourceWhitelist";
|
||||
export * from "./authWithWhitelist";
|
||||
export * from "./authWithAccessToken";
|
||||
export * from "./getExchangeToken";
|
||||
export * from "./createResourceSessionToken";
|
||||
export * from "./createResourceRule";
|
||||
export * from "./deleteResourceRule";
|
||||
export * from "./listResourceRules";
|
||||
|
||||
@@ -56,6 +56,7 @@ const createSiteResourceSchema = z
|
||||
siteId: z.number().int().positive().optional(), // DEPRECATED: for backward compatibility, we will convert this to siteIds array if provided
|
||||
destinationPort: z.int().positive().optional(),
|
||||
destination: z.string().min(1).nullish(),
|
||||
enabled: z.boolean().default(true),
|
||||
alias: z
|
||||
.string()
|
||||
.regex(
|
||||
@@ -274,6 +275,7 @@ export async function createSiteResource(
|
||||
scheme,
|
||||
destinationPort,
|
||||
destination,
|
||||
enabled,
|
||||
ssl,
|
||||
alias,
|
||||
userIds,
|
||||
@@ -537,6 +539,7 @@ export async function createSiteResource(
|
||||
destination: destination, // the ssh can be null
|
||||
scheme,
|
||||
destinationPort,
|
||||
enabled,
|
||||
alias: alias ? alias.trim() : null,
|
||||
aliasAddress,
|
||||
tcpPortRangeString: tcpPortRangeStringAdjusted,
|
||||
|
||||
@@ -152,11 +152,6 @@ const updateSiteResourceSchema = z
|
||||
)
|
||||
.refine(
|
||||
(data) => {
|
||||
// this is a partial update; only enforce destination when the
|
||||
// caller is actually changing mode or destination
|
||||
if (data.mode === undefined && data.destination === undefined) {
|
||||
return true;
|
||||
}
|
||||
// destination is only optional for ssh mode with native authDaemonMode
|
||||
if (data.mode === "ssh" && data.authDaemonMode === "native") {
|
||||
return true;
|
||||
@@ -416,10 +411,8 @@ export async function updateSiteResource(
|
||||
: [];
|
||||
const existingSiteIds = existingSiteNetworks.map((sn) => sn.siteId);
|
||||
|
||||
// undefined means "leave unchanged" (partial update); only nulled out
|
||||
// when the mode is explicitly being changed away from http
|
||||
let fullDomain: string | null | undefined = undefined;
|
||||
let finalSubdomain: string | null | undefined = undefined;
|
||||
let fullDomain: string | null = null;
|
||||
let finalSubdomain: string | null = null;
|
||||
if (domainId) {
|
||||
// Validate domain and construct full domain
|
||||
const domainResult = await validateAndConstructDomain(
|
||||
@@ -455,11 +448,6 @@ export async function updateSiteResource(
|
||||
)
|
||||
);
|
||||
}
|
||||
} else if (mode !== undefined && mode !== "http") {
|
||||
// mode is explicitly changing away from http, so the resource
|
||||
// can no longer have a domain associated with it
|
||||
fullDomain = null;
|
||||
finalSubdomain = null;
|
||||
}
|
||||
|
||||
// make sure the alias is unique within the org if provided
|
||||
@@ -528,28 +516,15 @@ export async function updateSiteResource(
|
||||
destination: destination,
|
||||
destinationPort: destinationPort,
|
||||
enabled: enabled,
|
||||
alias:
|
||||
alias !== undefined
|
||||
? alias
|
||||
? alias.trim()
|
||||
: null
|
||||
: mode !== undefined &&
|
||||
mode !== "host" &&
|
||||
mode !== "ssh"
|
||||
? null
|
||||
: undefined,
|
||||
alias: alias ? alias.trim() : null,
|
||||
tcpPortRangeString: tcpPortRangeStringAdjusted,
|
||||
udpPortRangeString:
|
||||
mode == "http" || mode == "ssh"
|
||||
? ""
|
||||
: udpPortRangeString,
|
||||
disableIcmp:
|
||||
mode !== undefined
|
||||
? disableIcmp ||
|
||||
(mode == "http" || mode == "ssh"
|
||||
? true
|
||||
: false)
|
||||
: disableIcmp,
|
||||
disableIcmp ||
|
||||
(mode == "http" || mode == "ssh" ? true : false),
|
||||
domainId,
|
||||
subdomain: finalSubdomain,
|
||||
fullDomain,
|
||||
|
||||
@@ -106,23 +106,17 @@ export function PrivateResourceNetworkAccessFields({
|
||||
embedInParentGrid = false
|
||||
}: PrivateResourceNetworkAccessFieldsProps) {
|
||||
const t = useTranslations();
|
||||
const resolvedInitialTcp = initialTcp !== undefined ? initialTcp : "*";
|
||||
const resolvedInitialUdp = initialUdp !== undefined ? initialUdp : "*";
|
||||
const [tcpPortMode, setTcpPortMode] = useState<PortMode>(() =>
|
||||
getPortModeFromString(resolvedInitialTcp)
|
||||
getPortModeFromString(initialTcp)
|
||||
);
|
||||
const [udpPortMode, setUdpPortMode] = useState<PortMode>(() =>
|
||||
getPortModeFromString(resolvedInitialUdp)
|
||||
getPortModeFromString(initialUdp)
|
||||
);
|
||||
const [tcpCustomPorts, setTcpCustomPorts] = useState(() =>
|
||||
resolvedInitialTcp && resolvedInitialTcp !== "*"
|
||||
? resolvedInitialTcp
|
||||
: ""
|
||||
initialTcp && initialTcp !== "*" ? initialTcp : ""
|
||||
);
|
||||
const [udpCustomPorts, setUdpCustomPorts] = useState(() =>
|
||||
resolvedInitialUdp && resolvedInitialUdp !== "*"
|
||||
? resolvedInitialUdp
|
||||
: ""
|
||||
initialUdp && initialUdp !== "*" ? initialUdp : ""
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -16,14 +16,12 @@ import { Button } from "@app/components/ui/button";
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
FormDescription,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage
|
||||
} from "@app/components/ui/form";
|
||||
import { Input } from "@app/components/ui/input";
|
||||
import { SwitchInput } from "@app/components/SwitchInput";
|
||||
import { createGeneralFormSchema } from "@app/lib/privateResourceForm";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useTranslations } from "next-intl";
|
||||
@@ -43,8 +41,7 @@ export default function PrivateResourceGeneralPage() {
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
name: siteResource.name,
|
||||
niceId: siteResource.niceId,
|
||||
enabled: siteResource.enabled
|
||||
niceId: siteResource.niceId
|
||||
}
|
||||
});
|
||||
|
||||
@@ -55,8 +52,7 @@ export default function PrivateResourceGeneralPage() {
|
||||
const data = form.getValues();
|
||||
await save({
|
||||
name: data.name,
|
||||
niceId: data.niceId,
|
||||
enabled: data.enabled
|
||||
niceId: data.niceId
|
||||
});
|
||||
}, null);
|
||||
|
||||
@@ -68,7 +64,7 @@ export default function PrivateResourceGeneralPage() {
|
||||
{t("resourceGeneral")}
|
||||
</SettingsSectionTitle>
|
||||
<SettingsSectionDescription>
|
||||
{t("privateResourceGeneralDescription")}
|
||||
{t("resourceGeneralDescription")}
|
||||
</SettingsSectionDescription>
|
||||
</SettingsSectionHeader>
|
||||
|
||||
@@ -80,42 +76,6 @@ export default function PrivateResourceGeneralPage() {
|
||||
id="private-resource-general-form"
|
||||
>
|
||||
<SettingsFormGrid>
|
||||
<SettingsFormCell span="full">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="enabled"
|
||||
render={() => (
|
||||
<FormItem>
|
||||
<FormControl>
|
||||
<SwitchInput
|
||||
id="enable-resource"
|
||||
defaultChecked={
|
||||
siteResource.enabled
|
||||
}
|
||||
label={t(
|
||||
"resourceEnable"
|
||||
)}
|
||||
onCheckedChange={(
|
||||
val
|
||||
) =>
|
||||
form.setValue(
|
||||
"enabled",
|
||||
val
|
||||
)
|
||||
}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormDescription>
|
||||
{t(
|
||||
"disabledResourceDescription"
|
||||
)}
|
||||
</FormDescription>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
</SettingsFormCell>
|
||||
|
||||
<SettingsFormCell span="half">
|
||||
<FormField
|
||||
control={form.control}
|
||||
|
||||
@@ -77,8 +77,7 @@ function getActionsCategories(root: boolean) {
|
||||
[t("actionDeleteSiteResource")]: "deleteSiteResource",
|
||||
[t("actionGetSiteResource")]: "getSiteResource",
|
||||
[t("actionListSiteResources")]: "listSiteResources",
|
||||
[t("actionUpdateSiteResource")]: "updateSiteResource",
|
||||
[t("actionCreateResourceSessionToken")]: "createResourceSessionToken"
|
||||
[t("actionUpdateSiteResource")]: "updateSiteResource"
|
||||
},
|
||||
|
||||
Target: {
|
||||
|
||||
@@ -23,7 +23,6 @@ import {
|
||||
PopoverContent,
|
||||
PopoverTrigger
|
||||
} from "@app/components/ui/popover";
|
||||
import { Switch } from "@app/components/ui/switch";
|
||||
import { useEnvContext } from "@app/hooks/useEnvContext";
|
||||
import { useNavigationContext } from "@app/hooks/useNavigationContext";
|
||||
import { useOptimisticLabels } from "@app/hooks/useOptimisticLabels";
|
||||
@@ -37,9 +36,7 @@ import { getPrivateResourceSettingsHref } from "@app/lib/launcherResourceAdminHr
|
||||
import { getNextSortOrder, getSortDirection } from "@app/lib/sortColumn";
|
||||
import { build } from "@server/build";
|
||||
import { tierMatrix } from "@server/lib/billing/tierMatrix";
|
||||
import { UpdateSiteResourceResponse } from "@server/routers/siteResource";
|
||||
import type { PaginationState } from "@tanstack/react-table";
|
||||
import { AxiosResponse } from "axios";
|
||||
import {
|
||||
ArrowDown01Icon,
|
||||
ArrowRight,
|
||||
@@ -52,17 +49,8 @@ import {
|
||||
import { useTranslations } from "next-intl";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/navigation";
|
||||
import {
|
||||
startTransition,
|
||||
useMemo,
|
||||
useOptimistic,
|
||||
useRef,
|
||||
useState,
|
||||
useTransition,
|
||||
type ComponentRef
|
||||
} from "react";
|
||||
import { startTransition, useMemo, useState, useTransition } from "react";
|
||||
import { useDebouncedCallback } from "use-debounce";
|
||||
import z from "zod";
|
||||
import { ColumnFilterButton } from "./ColumnFilterButton";
|
||||
import { LabelColumnFilterButton } from "./LabelColumnFilterButton";
|
||||
import { LabelsTableCell } from "./LabelsTableCell";
|
||||
@@ -126,11 +114,6 @@ function isSafeUrlForLink(href: string): boolean {
|
||||
}
|
||||
}
|
||||
|
||||
const booleanSearchFilterSchema = z
|
||||
.enum(["true", "false"])
|
||||
.optional()
|
||||
.catch(undefined);
|
||||
|
||||
type ClientResourcesTableProps = {
|
||||
internalResources: InternalResourceRow[];
|
||||
orgId: string;
|
||||
@@ -191,30 +174,6 @@ export default function PrivateResourcesTable({
|
||||
});
|
||||
};
|
||||
|
||||
async function toggleInternalResourceEnabled(
|
||||
val: boolean,
|
||||
resourceId: number
|
||||
) {
|
||||
try {
|
||||
await api.post<AxiosResponse<UpdateSiteResourceResponse>>(
|
||||
`site-resource/${resourceId}`,
|
||||
{
|
||||
enabled: val
|
||||
}
|
||||
);
|
||||
router.refresh();
|
||||
} catch (e) {
|
||||
toast({
|
||||
variant: "destructive",
|
||||
title: t("resourcesErrorUpdate"),
|
||||
description: formatAxiosError(
|
||||
e,
|
||||
t("resourcesErrorUpdateDescription")
|
||||
)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const deleteInternalResource = async (
|
||||
resourceId: number,
|
||||
siteId: number
|
||||
@@ -470,36 +429,6 @@ export default function PrivateResourcesTable({
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
accessorKey: "enabled",
|
||||
friendlyName: t("enabled"),
|
||||
header: () => (
|
||||
<ColumnFilterButton
|
||||
options={[
|
||||
{ value: "true", label: t("enabled") },
|
||||
{ value: "false", label: t("disabled") }
|
||||
]}
|
||||
selectedValue={booleanSearchFilterSchema.parse(
|
||||
searchParams.get("enabled")
|
||||
)}
|
||||
onValueChange={(value) =>
|
||||
handleFilterChange("enabled", value)
|
||||
}
|
||||
searchPlaceholder={t("searchPlaceholder")}
|
||||
emptyMessage={t("emptySearchOptions")}
|
||||
label={t("enabled")}
|
||||
className="p-3"
|
||||
/>
|
||||
),
|
||||
cell: ({ row }) => (
|
||||
<InternalResourceEnabledForm
|
||||
resource={row.original}
|
||||
onToggleInternalResourceEnabled={
|
||||
toggleInternalResourceEnabled
|
||||
}
|
||||
/>
|
||||
)
|
||||
},
|
||||
{
|
||||
id: "labels",
|
||||
accessorKey: "labels",
|
||||
@@ -714,39 +643,3 @@ function ClientResourceLabelCell({
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
type InternalResourceEnabledFormProps = {
|
||||
resource: InternalResourceRow;
|
||||
onToggleInternalResourceEnabled: (
|
||||
val: boolean,
|
||||
resourceId: number
|
||||
) => Promise<void>;
|
||||
};
|
||||
|
||||
function InternalResourceEnabledForm({
|
||||
resource,
|
||||
onToggleInternalResourceEnabled
|
||||
}: InternalResourceEnabledFormProps) {
|
||||
const [optimisticEnabled, setOptimisticEnabled] = useOptimistic(
|
||||
resource.enabled
|
||||
);
|
||||
|
||||
const formRef = useRef<ComponentRef<"form">>(null);
|
||||
|
||||
async function submitAction(formData: FormData) {
|
||||
const newEnabled = !(formData.get("enabled") === "on");
|
||||
setOptimisticEnabled(newEnabled);
|
||||
await onToggleInternalResourceEnabled(newEnabled, resource.id);
|
||||
}
|
||||
|
||||
return (
|
||||
<form action={submitAction} ref={formRef}>
|
||||
<Switch
|
||||
checked={optimisticEnabled}
|
||||
disabled={optimisticEnabled !== resource.enabled}
|
||||
name="enabled"
|
||||
onCheckedChange={() => formRef.current?.requestSubmit()}
|
||||
/>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -165,6 +165,7 @@ export function buildCreateSiteResourcePayload(
|
||||
siteIds: data.siteIds,
|
||||
mode: data.mode,
|
||||
destination: isNativeSsh ? undefined : (data.destination ?? undefined),
|
||||
enabled: true,
|
||||
...(data.mode === "http" && {
|
||||
scheme: data.scheme,
|
||||
ssl: data.ssl ?? false,
|
||||
@@ -341,8 +342,7 @@ export function createGeneralFormSchema(t: TranslateFn) {
|
||||
.string()
|
||||
.min(1)
|
||||
.max(255)
|
||||
.regex(/^[a-zA-Z0-9-]+$/),
|
||||
enabled: z.boolean()
|
||||
.regex(/^[a-zA-Z0-9-]+$/)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user