Editing a tag rule in the UI form drops the addresses of its tags

Đang mở Phù hợp với người mới
#1,649 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 8 ngày

@AsperforMias đang làm issue này rồi.

Từ ngày 22/11/2026.

  • #1651 của @AsperforMias — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript, yaml
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu từ ui-vue3/src/views/traffic/tagRule/tabs/updateByFormView.vue: tìm nơi quy tắc được tải và nơi mỗi thẻ nhận giá trị mặc định addresses, cùng bước gửi biểu mẫu chỉ dựng lại thẻ từ name và match. Kiểm tra tag.addresses được sao chép cả khi tải lẫn khi gửi, và bảo vệ việc lặp qua tagItem.match cho các thẻ không có labels. Hoàn thành khi chỉnh sửa và vô hiệu hóa một quy tắc trong biểu mẫu vẫn giữ addresses[] trong YAML đã lưu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Environment
  • Deploy env: vm (local), Dubbo Admin develop (65bce33)
  • Dubbo application version: dubbo-go 3.3.2 and develop
  • Registry: Nacos v2.5.2, ZooKeeper 3.9.4
Issue description

Editing a tag rule in the UI form, including turning it off, removes the addresses of its tags. After saving, a rule such as

tags:
  - name: gray
    addresses: ["0.0.0.0:20001"]

is written back without addresses, so the tag no longer selects any instance.

In ui-vue3/src/views/traffic/tagRule/tabs/updateByFormView.vue:

  • When the rule is loaded, each tag gets addresses: { condition: '=', addressesStr: '' } and only tagItem.match is copied into the form (as labels). The tag's addresses are never read.
  • The addresses match type is commented out in matchConditionTypeOptions, so it cannot be entered again in the form.
  • On submit, each tag is rebuilt from name and match only.

tagItem.match is also iterated without a check, which matters for tags that only have addresses.

Expected: editing a tag rule keeps the addresses of its tags, or the form shows and edits them.

Workaround: edit the rule in the YAML view, or add addresses back in the YAML view after editing in the form.

Logs
Click me to check logs
No error is reported; the saved rule has no addresses.
Ngôn ngữ chính
Go
Star
4.1k
Fork
2.2k
Merge trung bình
6 ngày 2 giờ
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/dubbo-admin

Tất cả issue của apache/dubbo-admin

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.