Closed denilsonsa closed 4 weeks ago
A simple fix would be to change these lines:
mem_current = 0 # instead of None
mem_total = 0 # instead of None
mem_percent = 0 # instead of None
Or just move those assignments to a few lines above, outside the conditional. This allows us to get rid of this else
.
However, it causes a side-effect: the UI will show a bunch of NaN
and undefined
in the memory stats. Thus, a "proper" fix would be to keep the Python code returning nulls, and update the Vue client-side code to handle null
as not having data. This may require a longer change, so that the client-side UI looks intuitive.
Also worth noting that the same NaN
UI bug will happen at the apps stats page: https://github.com/SelfhostedPro/Yacht/blob/d0253afa27d85325b7c7f60e0ad1df16bf267b25/backend/api/utils/apps.py#L288-L316
Describe the bug When trying to use Yacht on a Raspberry Pi 4 (arm64), the main dashboard is empty and there are tons of errors on the log.
To Reproduce Steps to reproduce the behavior:
Expected behavior It should work out of the box. Sure, I understand on some platforms (arm) you can't get the memory stats, that's fine. But everything else should work fine, no exceptions (I mean, the
Exception
type that gets thrown).Desktop (please complete the following information):
image: selfhostedpro/yacht
)Additional context This issue was mentioned in #115 and was supposed to be fixed by f2c949b65f0dd89553c1559dbbaaebc0894827f9. However, it was broken by cb6eb568ac74370c8e619fea42b39ad7cff3fcf5 when it introduced the
round(…)
function around themem_percent
variable. The fix should be easy enough (a couple of lines) in backend/api/actions/apps.py.Logs