AsperforMias opened a new issue, #1649:
URL: https://github.com/apache/dubbo-admin/issues/1649
### 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
```yaml
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
<details><summary>Click me to check logs</summary>
```
No error is reported; the saved rule has no addresses.
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]