Skip to content

feat(admin): country flags beside nodes in dashboard Node health - #139

Merged
hiddify-com merged 1 commit into
hiddify:devfrom
Hiddify-Official:feat/dashboard-node-flags
Nov 1, 2026
Merged

hiddify-com merged 1 commit into
hiddify:devfrom
Hiddify-Official:feat/dashboard-node-flags

Conversation

@Hiddify-Official

Copy link
Copy Markdown
Contributor

Problem

The dashboard's Node health lists the panel and its nodes by name only. The Nodes page already shows each node's country flag, but the dashboard didn't, so you couldn't tell at a glance where each server is.

Change

  • DashboardNodeStats gets a country (ISO code). node_system.attach_countries() fills it the same way the Nodes page does: node_country() (MaxMind, redis-cached for a day) on each child's address. For "This server" it uses the first public IP from hutils.network.get_ips_lazy(), which doesn't block. Files: hutils/node_system.py, dashboard_api.py, dashboard_schema.py.
  • NodeHealthCard.vue: a flag goes before the name in the chart legend, the table and the mobile cards. Hovering a flag shows the country name, which also serves as the aria-label.
  • The flag and country-name helpers move from NodesView.vue to the shared shared/utils/country.ts, so both pages use the same code.

Screenshots

Before After
before after
before after
before after

Tested

  • On main, with node1 and node2 as children: the dashboard API returns the right country for this server and both nodes, including the node that is offline. The flags match the Nodes page.
  • Checked that the Nodes page flags still render after moving the helpers.
  • The dashboard response time is unchanged, and the panel log has no errors after restarting.
  • Rebased on the latest dev and redeployed to check again.

Review

  • Confidence: High (>90%) — this reuses the cached country lookup the Nodes page already uses, and it was tested end to end on the servers.
  • Complexity: Simple — one new optional field in the dashboard response, and a small UI change in a single card.

🤖 Generated with Claude Code

…ealth

Each node's country comes from its address, by the same cached MaxMind
lookup as the Nodes page; This server's from its own public IP. The flag
shows before the name in the legend, the table and the phone cards; the
flag helpers move to shared/utils/country.ts for both pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hiddify-com
hiddify-com merged commit b7f3a74 into hiddify:dev Nov 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants