Skip to content

Commit fdee9cf

Browse files
Support for TrueNAS' WebSocket APIs (#98)
1 parent a0f43dc commit fdee9cf

23 files changed

Lines changed: 484 additions & 135 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
update integration set parameters = parameters::jsonb || '{"legacyApi": true}'::jsonb where driver = 'TRUENAS';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
update integration set parameters = json_patch(parameters, '{"legacyApi": true}') where driver = 'TRUENAS';

frontend/src/core/i18n/I18nService.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@ export default class I18nService {
4646

4747
private async loadDictionary(targetLanguage: string | null) {
4848
const context = I18nContext.get()
49-
const resolvedLanguage = resolveLanguageTag(
50-
context.availableLanguages,
51-
targetLanguage ?? context.currentLanguage,
52-
context.defaultLanguage,
53-
)
49+
const resolvedLanguage = resolveLanguageTag(context.availableLanguages, targetLanguage, context.defaultLanguage)
5450

5551
if (context.loadedDictionaries[resolvedLanguage]) return
5652

frontend/src/domain/host/components/HostRoutes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export default class HostRoutes extends React.Component<HostRoutesProps, HostRou
186186
}
187187
/>
188188
</Form.Item>
189-
{this.renderTargetUriField(field, index, MessageKey.FrontendHostComponentsHostroutesDestinationUrl)}
189+
{this.renderTargetUriField(field, index, MessageKey.FrontendHostComponentsHostroutesDestinationPath)}
190190
</>
191191
)
192192
}

i18n/messages_bn.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,7 @@ frontend/host/components/hostbindings/protocol=প্রোটোকল
10321032
frontend/host/components/hostbindings/ssl-certificate=SSL সার্টিফিকেট
10331033
frontend/host/components/hostroutes/add-route=রাউট যোগ করুন
10341034
frontend/host/components/hostroutes/body-payload=বডি / পেলোড
1035+
frontend/host/components/hostroutes/destination-path=গন্তব্য পথ
10351036
frontend/host/components/hostroutes/destination-url=গন্তব্য URL
10361037
frontend/host/components/hostroutes/headers-help=প্রতি লাইনে একটি, [key]: [value] হিসেবে
10371038
frontend/host/components/hostroutes/headers=হেডারস
@@ -1420,6 +1421,8 @@ integration/docker/resolver/no-network=ID ${id} সহ কন্টেইনা
14201421
integration/docker/resolver/no-nodes-found=নোড IP সমাধান করতে অক্ষম: কোনো নোড পাওয়া যায়নি
14211422
integration/docker/resolver/no-running-tasks=নোড IP সমাধান করতে অক্ষম: সার্ভিস ${id} এর জন্য কোনো চলমান টাস্ক পাওয়া যায়নি
14221423
integration/truenas/description=TrueNAS, অন্যান্য অনেক কিছুর পাশাপাশি, Docker কন্টেইনারের অধীনে আপনার প্রিয় অ্যাপগুলো চালানোর অনুমতি দেয়। এই ইন্টিগ্রেশন সক্রিয় করে, আপনি সহজেই আপনার TrueNAS-এ একটি সার্ভিস এক্সপোজ করা যেকোনো অ্যাপকে আপনার nginx ignition-এর হোস্ট রাউটের টার্গেট হিসেবে বেছে নিতে সক্ষম হবেন।
1424+
integration/truenas/legacy-api-help=সক্ষম হলে, WebSocket API-এর পরিবর্তে পুরানো REST API ব্যবহার করে। এটি শুধুমাত্র তখন সক্ষম করুন যদি আপনার TrueNAS সংস্করণ WebSocket API সমর্থন না করে।
1425+
integration/truenas/legacy-api=লেগেসি REST API ব্যবহার করুন
14231426
integration/truenas/name=TrueNAS
14241427
integration/truenas/proxy-url-help=TrueNAS অ্যাপে রিকোয়েস্ট প্রক্সি করার সময় ব্যবহৃত URL। এটি ব্যবহার করুন যদি অ্যাপগুলো অন্য অ্যাড্রেসে এক্সপোজ করা থাকে যা উপরের মেইন URL এর মতো নয়।
14251428
integration/truenas/proxy-url-resolution-failed=${id} এর জন্য প্রক্সি URL সমাধান করতে অক্ষম: সার্ভিসটি সম্ভবত অফলাইন/বন্ধ আছে

i18n/messages_de.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,7 @@ frontend/host/components/hostbindings/protocol=Protokoll
10321032
frontend/host/components/hostbindings/ssl-certificate=SSL-Zertifikat
10331033
frontend/host/components/hostroutes/add-route=Route hinzufügen
10341034
frontend/host/components/hostroutes/body-payload=Body / Payload
1035+
frontend/host/components/hostroutes/destination-path=Zielpfad
10351036
frontend/host/components/hostroutes/destination-url=Ziel-URL
10361037
frontend/host/components/hostroutes/headers-help=Einer pro Zeile, als [Schlüssel]: [Wert]
10371038
frontend/host/components/hostroutes/headers=Header
@@ -1420,6 +1421,8 @@ integration/docker/resolver/no-network=Kein Netzwerk oder IP-Adresse für den Co
14201421
integration/docker/resolver/no-nodes-found=Node-IPs konnten nicht aufgelöst werden: keine Nodes gefunden
14211422
integration/docker/resolver/no-running-tasks=Node-IPs konnten nicht aufgelöst werden: keine laufenden Tasks für Service ${id} gefunden
14221423
integration/truenas/description=TrueNAS ermöglicht es, neben vielen anderen Dingen, Ihre Lieblings-Apps unter Docker-Containern auszuführen. Mit dieser aktivierten Integration können Sie einfach jede App, die einen Dienst in Ihrem TrueNAS offenlegt, als Ziel für Ihre nginx ignition Host-Routen auswählen.
1424+
integration/truenas/legacy-api-help=Bei Aktivierung wird die veraltete REST-API anstelle der WebSocket-API verwendet. Aktivieren Sie diese Option nur, wenn Ihre TrueNAS-Version die WebSocket-API nicht unterstützt.
1425+
integration/truenas/legacy-api=Legacy-REST-API verwenden
14231426
integration/truenas/name=TrueNAS
14241427
integration/truenas/proxy-url-help=Die URL, die verwendet werden soll, wenn eine Anfrage an eine TrueNAS-App weitergeleitet wird. Verwenden Sie dies, wenn die Apps unter einer anderen Adresse offengelegt werden, die nicht dieselbe wie die Haupt-URL oben ist.
14251428
integration/truenas/proxy-url-resolution-failed=Proxy-URL für ${id} konnte nicht aufgelöst werden: Dienst ist wahrscheinlich offline/gestoppt

i18n/messages_en.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,7 @@ frontend/host/components/hostbindings/protocol=Protocol
10321032
frontend/host/components/hostbindings/ssl-certificate=SSL certificate
10331033
frontend/host/components/hostroutes/add-route=Add route
10341034
frontend/host/components/hostroutes/body-payload=Body / Payload
1035+
frontend/host/components/hostroutes/destination-path=Destination path
10351036
frontend/host/components/hostroutes/destination-url=Destination URL
10361037
frontend/host/components/hostroutes/headers-help=One per line, as [key]: [value]
10371038
frontend/host/components/hostroutes/headers=Headers
@@ -1420,6 +1421,8 @@ integration/docker/resolver/no-network=No network or IP address found for the co
14201421
integration/docker/resolver/no-nodes-found=Unable to resolve node IPs: no nodes found
14211422
integration/docker/resolver/no-running-tasks=Unable to resolve node IPs: no running tasks found for service ${id}
14221423
integration/truenas/description=TrueNAS allows, alongside many other things, to run your favorite apps under Docker containers. With this integration enabled, you will be able to easily pick any app exposing a service in your TrueNAS as a target for your nginx ignition's host routes.
1424+
integration/truenas/legacy-api-help=When enabled, uses the deprecated REST API instead of the WebSocket API. Enable this only if your TrueNAS version does not support the WebSocket API.
1425+
integration/truenas/legacy-api=Use legacy REST API
14231426
integration/truenas/name=TrueNAS
14241427
integration/truenas/proxy-url-help=The URL to be used when proxying a request to a TrueNAS app. Use this if the apps are exposed in another address that isn't the same as the main URL above.
14251428
integration/truenas/proxy-url-resolution-failed=Unable to resolve proxy URL for ${id}: service is probably offline/stopped

i18n/messages_es.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,7 @@ frontend/host/components/hostbindings/protocol=Protocolo
10321032
frontend/host/components/hostbindings/ssl-certificate=Certificado SSL
10331033
frontend/host/components/hostroutes/add-route=Añadir ruta
10341034
frontend/host/components/hostroutes/body-payload=Cuerpo / Payload
1035+
frontend/host/components/hostroutes/destination-path=Ruta de destino
10351036
frontend/host/components/hostroutes/destination-url=URL de destino
10361037
frontend/host/components/hostroutes/headers-help=Uno por línea, como [clave]: [valor]
10371038
frontend/host/components/hostroutes/headers=Encabezados
@@ -1420,6 +1421,8 @@ integration/docker/resolver/no-network=No se encontró red o dirección IP para
14201421
integration/docker/resolver/no-nodes-found=No se pudieron resolver las IPs de nodo: no se encontraron nodos
14211422
integration/docker/resolver/no-running-tasks=No se pudieron resolver las IPs de nodo: no se encontraron tareas en ejecución para el servicio ${id}
14221423
integration/truenas/description=TrueNAS permite, junto con muchas otras cosas, ejecutar sus aplicaciones favoritas bajo contenedores Docker. Con esta integración habilitada, podrá elegir fácilmente cualquier aplicación que exponga un servicio en su TrueNAS como destino para las rutas de host de nginx ignition.
1424+
integration/truenas/legacy-api-help=Cuando está habilitada, usa la API REST obsoleta en lugar de la API WebSocket. Habilite esto solo si su versión de TrueNAS no admite la API WebSocket.
1425+
integration/truenas/legacy-api=Usar API REST heredada
14231426
integration/truenas/name=TrueNAS
14241427
integration/truenas/proxy-url-help=La URL que se utilizará al proxear una solicitud a una aplicación TrueNAS. Use esto si las aplicaciones están expuestas en otra dirección que no sea la misma que la URL principal anterior.
14251428
integration/truenas/proxy-url-resolution-failed=No se pudo resolver la URL del proxy para ${id}: el servicio probablemente esté desconectado/detenido

i18n/messages_fr.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,7 @@ frontend/host/components/hostbindings/protocol=Protocole
10321032
frontend/host/components/hostbindings/ssl-certificate=Certificat SSL
10331033
frontend/host/components/hostroutes/add-route=Ajouter une route
10341034
frontend/host/components/hostroutes/body-payload=Corps / Charge utile
1035+
frontend/host/components/hostroutes/destination-path=Chemin de destination
10351036
frontend/host/components/hostroutes/destination-url=URL de destination
10361037
frontend/host/components/hostroutes/headers-help=Un par ligne, comme [clé]: [valeur]
10371038
frontend/host/components/hostroutes/headers=En-têtes
@@ -1420,6 +1421,8 @@ integration/docker/resolver/no-network=Pas de réseau ou d'adresse IP trouvé po
14201421
integration/docker/resolver/no-nodes-found=Impossible de résoudre les IPs des nœuds : aucun nœud trouvé
14211422
integration/docker/resolver/no-running-tasks=Impossible de résoudre les IPs des nœuds : aucune tâche en cours trouvée pour le service ${id}
14221423
integration/truenas/description=TrueNAS permet, à côté de beaucoup d'autres choses, de faire tourner vos apps favorites sous des conteneurs Docker. Avec cette intégration activée, vous pourrez facilement choisir n'importe quelle app exposant un service dans votre TrueNAS comme cible pour vos routes d'hôte nginx ignition.
1424+
integration/truenas/legacy-api-help=Lorsqu'elle est activée, utilise l'API REST dépréciée à la place de l'API WebSocket. Activez ceci uniquement si votre version de TrueNAS ne prend pas en charge l'API WebSocket.
1425+
integration/truenas/legacy-api=Utiliser l'API REST héritée
14231426
integration/truenas/name=TrueNAS
14241427
integration/truenas/proxy-url-help=L'URL à utiliser lors de la procuration d'une requête vers une app TrueNAS. Utilisez ceci si les apps sont exposées à une autre adresse qui n'est pas la même que l'URL principale ci-dessus.
14251428
integration/truenas/proxy-url-resolution-failed=Impossible de résoudre l'URL proxy pour ${id} : le service est probablement hors ligne/arrêté

i18n/messages_hi.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,7 @@ frontend/host/components/hostbindings/protocol=प्रोटोकॉल
10321032
frontend/host/components/hostbindings/ssl-certificate=SSL प्रमाणपत्र
10331033
frontend/host/components/hostroutes/add-route=रूट जोड़ें
10341034
frontend/host/components/hostroutes/body-payload=बॉडी / पेलोड
1035+
frontend/host/components/hostroutes/destination-path=गंतव्य पथ
10351036
frontend/host/components/hostroutes/destination-url=गंतव्य URL
10361037
frontend/host/components/hostroutes/headers-help=प्रति पंक्ति एक, जैसे [key]: [value]
10371038
frontend/host/components/hostroutes/headers=हेडर
@@ -1420,6 +1421,8 @@ integration/docker/resolver/no-network=ID ${id} वाले कंटेनर
14201421
integration/docker/resolver/no-nodes-found=नोड IPs को हल करने में असमर्थ: कोई नोड नहीं मिला
14211422
integration/docker/resolver/no-running-tasks=नोड IPs को हल करने में असमर्थ: सेवा ${id} के लिए कोई चल रहे कार्य नहीं मिले
14221423
integration/truenas/description=TrueNAS, कई अन्य चीजों के साथ, आपको Docker कंटेनर के तहत अपने पसंदीदा ऐप्स चलाने की अनुमति देता है। इस इंटीग्रेशन के सक्षम होने के साथ, आप अपने nginx ignition के होस्ट रूट्स के लिए लक्ष्य के रूप में अपने TrueNAS में सेवा को उजागर करने वाले किसी भी ऐप को आसानी से चुन सकेंगे।
1424+
integration/truenas/legacy-api-help=सक्षम होने पर, WebSocket API के बजाय पुरानी REST API का उपयोग करता है। इसे केवल तभी सक्षम करें जब आपका TrueNAS संस्करण WebSocket API का समर्थन नहीं करता हो।
1425+
integration/truenas/legacy-api=लेगेसी REST API का उपयोग करें
14231426
integration/truenas/name=TrueNAS
14241427
integration/truenas/proxy-url-help=TrueNAS ऐप के लिए अनुरोध को प्रॉक्सी करते समय उपयोग किया जाने वाला URL। इसका उपयोग तब करें जब ऐप्स किसी अन्य पते पर उजागर हों जो ऊपर दिए गए मुख्य URL के समान न हो।
14251428
integration/truenas/proxy-url-resolution-failed=${id} के लिए प्रॉक्सी URL को हल करने में असमर्थ: सेवा शायद ऑफ़लाइन/रोकी गई है

0 commit comments

Comments
 (0)