mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #3136] Dashboard incorrect number of hosts #2128
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#2128
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MrAlfabet on GitHub (Aug 16, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3136
Describe the bug
Dashboard displays the wrong number of hosts
Nginx Proxy Manager Version
2.10.3
To Reproduce
Create hosts as user X
Create user Y
Login as user Y
Expected behavior
Same number of hosts displayed for both accounts on the dashboard
Exactly this bug: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1679
But I managed to replicate it.
@gabviv73 commented on GitHub (Nov 23, 2023):
I confirm with 2.10.4: Items created with different users are not counted on the dashboard page, bit are manageable from the specfic pages.
@blockloop commented on GitHub (Dec 18, 2023):
I successfully recreated this issue by creating Proxy Hosts with a different user. I believe the count is only for proxy hosts (in my case) created by the current user. If I create a new host with my current user the count increases.
If you follow the chain:
github.com/NginxProxyManager/nginx-proxy-manager@e08a4d4490/frontend/js/app/dashboard/main.js (L54)github.com/NginxProxyManager/nginx-proxy-manager@e08a4d4490/frontend/js/app/api.js (L724-L726)github.com/NginxProxyManager/nginx-proxy-manager@e08a4d4490/backend/routes/api/reports.js (L21)github.com/NginxProxyManager/nginx-proxy-manager@e08a4d4490/backend/internal/report.js (L18)github.com/NginxProxyManager/nginx-proxy-manager@e08a4d4490/backend/internal/proxy-host.js (L448-L461)It looks like the
visibilityflag is not sent properly from the frontend call? The backend query is looking forSo it is limiting the count to only the active user.
@github-actions[bot] commented on GitHub (Jul 21, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@jasp106 commented on GitHub (Jul 23, 2024):
you can change this line:
if (visibility !== 'all') {
query.andWhere('owner_user_id', user_id);
}
to:
if (visibility && visibility !== 'all') {
query.andWhere('owner_user_id', user_id);
}
inject it with a volume mapping via docker compose like this for testing:
volumes:
@github-actions[bot] commented on GitHub (Jun 5, 2025):
Issue is now considered stale. If you want to keep it open, please comment 👍
@jotremb commented on GitHub (Jul 9, 2025):
Same issue, the above suggested change does fix the issue.
@github-actions[bot] commented on GitHub (Jan 23, 2026):
Issue is now considered stale. If you want to keep it open, please comment 👍