[Bug] Customapi makes to much calls
TimoTielens opened this issue · comments
Description
I have create a custom api widget that tries to fetch 3 fields. This all works nice, however I think it's make to much calls. I expect the widget to fetch the data once and then fetch the correct data from it, however it seems that it fetches the data for every field.
Steps to reproduce
- Create a custom widget with more then one field
- Log the amount of request.
- Notice every time the refreshInterval is hit, it will do the same amount of request as fields that are configured
homepage version
v0.8.6 (cd29cbb, Jan 21, 2024)
Installation method
Docker
Configuration
- Network:
- item1:
icon: unifi.svg
widget:
type: customapi
url: http://10.0.0.1:1880/GetNetworkStats
refreshInterval: 100000 # optional - in milliseconds, defaults to 10s
method: GET # optional, e.g. POST
mappings:
- field: wan
label: ISP
- field: www
label: Internet
- field: clients
label: Clients
- field: alarms
label: Alarms
Container Logs
No response
Browser Logs
No response
Troubleshooting
Looked quickly in the code but couldn't find a solution directly.
Other
No response
Before submitting, I have made sure to
- Check the documentation
- Follow the troubleshooting guide (please include output above if applicable).
- Search existing issues and discussions.
Wanting something to work differently doesn’t make it a bug.
Also, this is not accurate, it makes one call which by default refreshes every 10s (which you can change) or on page focus like all other widgets.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns. See our contributing guidelines for more details.