[bug]: textIP is checked for objects, but not for states - same settings, different behaviour
No existing issues.
- [X] There is no existing issue for my problem.
Describe the bug
/opt/iobroker/iobroker-data/iobroker.json contains:
"objects": {
"type": "jsonl",
"// type": "Possible values: 'file' - [port 9001], 'jsonl' - [port 9001], 'redis' - [port 6379 or 26379 for sentinel].",
"host": "127.0.0.1",
"port": 9001,
...
and
"states": {
"type": "jsonl",
"// type": "Possible values: 'file' - [port 9000], 'redis' - [port 6379].",
"host": "127.0.0.1",
"port": 9000,
...
Settings show
https://github.com/ioBroker/ioBroker.admin/blob/89b20a71d423ebef0c2d8b85f00c31264fa193a1/packages/admin/src/src/components/BaseSettings/BaseSettingsObjects.jsx#L95
https://github.com/ioBroker/ioBroker.admin/blob/89b20a71d423ebef0c2d8b85f00c31264fa193a1/packages/admin/src/src/components/BaseSettings/BaseSettingsObjects.jsx#L115
and
https://github.com/ioBroker/ioBroker.admin/blob/89b20a71d423ebef0c2d8b85f00c31264fa193a1/packages/admin/src/src/components/BaseSettings/BaseSettingsStates.jsx#L96
https://github.com/ioBroker/ioBroker.admin/blob/89b20a71d423ebef0c2d8b85f00c31264fa193a1/packages/admin/src/src/components/BaseSettings/BaseSettingsStates.jsx#L115
To Reproduce
- enable expert mode
- go to hosts
- edit settings of host
Expected behavior
Both values are the same, so both should be checked (or unchecked).
Screenshots & Logfiles
see above
Adapter version
6.13.15
js-controller version
5.0.17
Node version
20.10.0
Operating system
Debian 12 lxc
Additional context
No response
this.props.socket.getIpAddresses is different. This part doesn't exist in the BaseSettingsObjects
https://github.com/ioBroker/ioBroker.admin/blob/89b20a71d423ebef0c2d8b85f00c31264fa193a1/packages/admin/src/src/components/BaseSettings/BaseSettingsObjects.jsx#L131-L135
should be refactored in a shared method used by both components and I think this is even buggy
https://github.com/ioBroker/ioBroker.admin/blob/89b20a71d423ebef0c2d8b85f00c31264fa193a1/packages/admin/src/src/components/BaseSettings/BaseSettingsObjects.jsx#L132
X.includes(X)