feat(routing): add client picker to user rules (#6271)

* feat(routing): add client picker to user rules

Replace the free-text user criterion with a searchable multi-select backed by existing panel clients. Preserve saved values that no longer exist so editing legacy rules remains lossless.

* feat(routing): polish user picker states

Align the routing user selector with the inbound-tag multi-select, including search, clear, loading, empty, and error states. Localize the new copy across every supported locale and cover legacy saved users with a regression test.

* fix(routing): keep custom user identifiers

Use tags mode with comma tokenization so the user picker suggests panel clients without rejecting HTTP, Mixed, or raw-template identifiers. Restore the comma hint and cover custom entries with a regression test.
This commit is contained in:
Zane
2026-08-23 05:13:34 +08:00
committed by GitHub
parent 326009e9d3
commit 02002dc1c3
16 changed files with 206 additions and 4 deletions
+3
View File
@@ -1520,6 +1520,9 @@
"attributes": "الخصائص",
"value": "القيمة",
"user": "المستخدم",
"userPlaceholder": "اختر المستخدمين",
"userEmpty": "لا يوجد مستخدمون متاحون",
"userLoadError": "تعذر تحميل المستخدمين",
"inboundTags": "وسوم الواردات",
"outboundTag": "وسم الصادر",
"balancerTag": "وسم الموازن",
+3
View File
@@ -1638,6 +1638,9 @@
"attributes": "Attributes",
"value": "Value",
"user": "User",
"userPlaceholder": "Select users",
"userEmpty": "No users available",
"userLoadError": "Could not load users",
"inboundTags": "Inbound tags",
"outboundTag": "Outbound tag",
"balancerTag": "Balancer tag",
+3
View File
@@ -1520,6 +1520,9 @@
"attributes": "Atributos",
"value": "Valor",
"user": "Usuario",
"userPlaceholder": "Seleccionar usuarios",
"userEmpty": "No hay usuarios disponibles",
"userLoadError": "No se pudieron cargar los usuarios",
"inboundTags": "Etiquetas de entradas",
"outboundTag": "Etiqueta de salida",
"balancerTag": "Etiqueta de balanceador",
+3
View File
@@ -1520,6 +1520,9 @@
"attributes": "صفت‌ها",
"value": "مقدار",
"user": "کاربر",
"userPlaceholder": "انتخاب کاربران",
"userEmpty": "هیچ کاربری موجود نیست",
"userLoadError": "بارگیری کاربران ناموفق بود",
"inboundTags": "تگ‌های ورودی",
"outboundTag": "تگ خروجی",
"balancerTag": "تگ بالانسر",
+3
View File
@@ -1520,6 +1520,9 @@
"attributes": "Atribut",
"value": "Nilai",
"user": "Pengguna",
"userPlaceholder": "Pilih pengguna",
"userEmpty": "Tidak ada pengguna tersedia",
"userLoadError": "Gagal memuat pengguna",
"inboundTags": "Tag inbound",
"outboundTag": "Tag outbound",
"balancerTag": "Tag balancer",
+3
View File
@@ -1520,6 +1520,9 @@
"attributes": "属性",
"value": "値",
"user": "ユーザー",
"userPlaceholder": "ユーザーを選択",
"userEmpty": "利用可能なユーザーがいません",
"userLoadError": "ユーザーを読み込めませんでした",
"inboundTags": "インバウンドタグ",
"outboundTag": "アウトバウンドタグ",
"balancerTag": "バランサータグ",
+3
View File
@@ -1520,6 +1520,9 @@
"attributes": "Atributos",
"value": "Valor",
"user": "Usuário",
"userPlaceholder": "Selecionar usuários",
"userEmpty": "Nenhum usuário disponível",
"userLoadError": "Falha ao carregar usuários",
"inboundTags": "Tags de entradas",
"outboundTag": "Tag de saída",
"balancerTag": "Tag de balanceador",
+3
View File
@@ -1520,6 +1520,9 @@
"attributes": "Атрибуты",
"value": "Значение",
"user": "Пользователь",
"userPlaceholder": "Выберите пользователей",
"userEmpty": "Нет доступных пользователей",
"userLoadError": "Не удалось загрузить пользователей",
"inboundTags": "Теги входящих",
"outboundTag": "Тег исходящего",
"balancerTag": "Тег балансировщика",
+3
View File
@@ -1520,6 +1520,9 @@
"attributes": "Öznitelikler",
"value": "Değer",
"user": "Kullanıcı",
"userPlaceholder": "Kullanıcıları seçin",
"userEmpty": "Kullanılabilir kullanıcı yok",
"userLoadError": "Kullanıcılar yüklenemedi",
"inboundTags": "Gelen Bağlantı Etiketleri",
"outboundTag": "Giden Bağlantı Etiketi",
"balancerTag": "Dengeleyici Etiketi",
+3
View File
@@ -1520,6 +1520,9 @@
"attributes": "Атрибути",
"value": "Значення",
"user": "Користувач",
"userPlaceholder": "Виберіть користувачів",
"userEmpty": "Немає доступних користувачів",
"userLoadError": "Не вдалося завантажити користувачів",
"inboundTags": "Теги вхідних",
"outboundTag": "Тег вихідного",
"balancerTag": "Тег балансувальника",
+3
View File
@@ -1520,6 +1520,9 @@
"attributes": "Thuộc tính",
"value": "Giá trị",
"user": "Người dùng",
"userPlaceholder": "Chọn người dùng",
"userEmpty": "Không có người dùng khả dụng",
"userLoadError": "Không thể tải người dùng",
"inboundTags": "Tag inbound",
"outboundTag": "Tag outbound",
"balancerTag": "Tag balancer",
+3
View File
@@ -1520,6 +1520,9 @@
"attributes": "属性",
"value": "值",
"user": "用户",
"userPlaceholder": "选择用户",
"userEmpty": "暂无可用用户",
"userLoadError": "无法加载用户",
"inboundTags": "入站标签",
"outboundTag": "出站标签",
"balancerTag": "均衡器标签",
+3
View File
@@ -1520,6 +1520,9 @@
"attributes": "屬性",
"value": "值",
"user": "使用者",
"userPlaceholder": "選擇使用者",
"userEmpty": "暫無可用使用者",
"userLoadError": "無法載入使用者",
"inboundTags": "入站標籤",
"outboundTag": "出站標籤",
"balancerTag": "均衡器標籤",