Skip to content
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

API calls to /machine are deprecated; use /node #128

Open
l00ps opened this issue Dec 17, 2023 · 2 comments · May be fixed by #127
Open

API calls to /machine are deprecated; use /node #128

l00ps opened this issue Dec 17, 2023 · 2 comments · May be fixed by #127

Comments

@l00ps
Copy link

l00ps commented Dec 17, 2023

When running headscale-webui against headscale v0.22.3, multiple pages don't load:

Trace:

Dec 17 17:19:49 ip-172-31-86-15 poetry[35992]:   File "/home/ubuntu/src/headscale-webui/server.py", line 114, in decorated
Dec 17 17:19:49 ip-172-31-86-15 poetry[35992]:     return view_func(*args, **kwargs)
Dec 17 17:19:49 ip-172-31-86-15 poetry[35992]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 17 17:19:49 ip-172-31-86-15 poetry[35992]:   File "/home/ubuntu/src/headscale-webui/server.py", line 207, in machines_page
Dec 17 17:19:49 ip-172-31-86-15 poetry[35992]:     cards = renderer.render_machines_cards()
Dec 17 17:19:49 ip-172-31-86-15 poetry[35992]:             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 17 17:19:49 ip-172-31-86-15 poetry[35992]:   File "/home/ubuntu/src/headscale-webui/renderer.py", line 490, in render_machines_cards
Dec 17 17:19:49 ip-172-31-86-15 poetry[35992]:     num_threads = len(machines_list["machines"])
Dec 17 17:19:49 ip-172-31-86-15 poetry[35992]:                       ~~~~~~~~~~~~~^^^^^^^^^^^^
Dec 17 17:19:49 ip-172-31-86-15 poetry[35992]: KeyError: 'machines'

Cause:
Upon inspection of the headscale API, the correct endpoint is api/v1/node, and it returns a list named nodes. renderer.py currently calls api/v1/machine and expects a response containing a list called machines.

@l00ps l00ps linked a pull request Dec 17, 2023 that will close this issue
@Richy78
Copy link

Richy78 commented Mar 24, 2024

how can we chance the file? where are they located?

thanks

@wenco
Copy link

wenco commented Apr 22, 2024

fix: #131

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 a pull request may close this issue.

3 participants