Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Marigold committed Nov 11, 2024
1 parent c4a823a commit eb1d285
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/wizard/utils/cached.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def load_latest_population():

@st.cache_data
def get_tailscale_ip_to_user_map():
"""Get the mapping of Tailscale IPs to user display names."""
proc = subprocess.run(["tailscale", "status", "--json"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)

if proc.returncode != 0:
Expand Down Expand Up @@ -201,6 +202,7 @@ def get_tailscale_ip_to_user_map():

@st.cache_data
def get_grapher_user_id(user_ip: str) -> Optional[int]:
"""Get the Grapher user ID associated with the given Tailscale IP address."""
# Get Tailscale IP-to-User mapping
ip_to_user_map = get_tailscale_ip_to_user_map()

Expand Down

0 comments on commit eb1d285

Please sign in to comment.