-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Unifi widget does not set widget.fields if none are configured #2771
Comments
The concern is the method of limiting the displayed fields by limiting the |
We can cross that bridge if we get there... |
At bare minimum, the documentation is incorrect and should be updated to properly list the supported fields. |
Additionally, because I do not have a switch or gateway product in my installation, it is broken for my install and installs like mine. I cannot get the lan field to display under any circumstances without installing new hardware. This is counter-intuitive to users. |
Nor does uptime display without a gateway installed (from looking at the code and JSON). |
Thats a different issue. If you'd like to FR using something else for uptime that'd be fine. I dont think anyone has raised that issue (and it's been this way for a while). And homepage/src/widgets/unifi/component.jsx Lines 36 to 39 in 98499cd
|
With my local setup, I have no lan devices -- but as a user, if I try and configure |
Yea I can see how that’s not obvious but I already added a commit adding the fields you correctly noted are missing and a note about this. I added you as author of that commit so you get ‘credit’ eg from the PR that you opened |
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. |
Description
The unifi widget returns different data blocks that it calculates without respecting or setting the widget.fields described in the documentation. The data blocks should always be returned as is consistent with other widgets. Blocks displayed should be filtered according to the fields configured or a default set of fields that the widget sets. Preventing configured fields from being displayed because the widget does not provide data is inconsistent with the behavior of other widgets and unexpected from an end user point of view.
Additionally, the fields described in the documentation are incomplete. Additional fields
lan
,lan_devices
,wlan
, andwlan_devices
can be configured and should be added to the documentation.With my setup, a self-hosted controller and 2 access points, using the configuration attached, I see one field instead of four:
With no fields configured, I see:
(the additional fields are configurable with "wlan_devices" and "wlan" respectively)
I have a preliminary PR prepared that I will submit to address this bug.
Steps to reproduce
fields: ["uptime", "wan", "lan_users", "wlan_users"]
homepage version
v0.8.6
Installation method
Source
Configuration
Container Logs
No response
Browser Logs
No response
Troubleshooting
n/a
Other
This issue was discovered while testing the PR prepared for #2764 and fixes that interaction.
Before submitting, I have made sure to
The text was updated successfully, but these errors were encountered: