Skip to content

Template insights: Insights page keeps loading forever #8763

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

Closed
matifali opened this issue Jul 27, 2023 · 6 comments · Fixed by #8794
Closed

Template insights: Insights page keeps loading forever #8763

matifali opened this issue Jul 27, 2023 · 6 comments · Fixed by #8794
Assignees
Labels
s2 Broken use cases or features (with a workaround). Only humans may set this.

Comments

@matifali
Copy link
Member

See screenshot:
image

Also, browser console logs show.
image

Failed to load resource: the server responded with a status of 403 ()
/api/v2/insights/user-latency?template_ids=0d286645-29aa-4eaf-9b52-cc5d2740c90b&start_time=2023-07-19T00%3A00%3A00Z&end_time=2023-07-26T00%3A00%3A00Z:1     Failed to load resource: the server responded with a status of 403 ()
/api/v2/insights/templates?template_ids=0d286645-29aa-4eaf-9b52-cc5d2740c90b&start_time=2023-07-19T00%3A00%3A00Z&end_time=2023-07-26T00%3A00%3A00Z&interval=day:1     Failed to load resource: the server responded with a status of 403 ()

Visiting https://dev.coder.com/api/v2/insights/user-latency?template_ids=0d286645-29aa-4eaf-9b52-cc5d2740c90b&start_time=2023-07-19T00%3A00%3A00Z&end_time=2023-07-26T00%3A00%3A00Z
and
https://dev.coder.com/api/v2/deployment/stats

{"message":"Forbidden."}

A template admin should be able to see insights for the template he is the admin of. We can make a user template admin for a specific template while his general role is a member. In that case, also he should be able to see the insights for the said template.

cc: @bpmct @mtojek @BrunoQuaresma

@matifali matifali added s2 Broken use cases or features (with a workaround). Only humans may set this. bug labels Jul 27, 2023
@mtojek
Copy link
Member

mtojek commented Jul 27, 2023

A template admin should be able to see insights for the template he is the admin of. We can make a user template admin for a specific template while his general role is a member. In that case, also he should be able to see the insights for the said template.

I know that we invested in restricting access to information about other users. An owner can see everyone, but what about the template admin? I'm asking as the Insights page reveals information about users (names, avatars, location?).

@bpmct WDYT? Based on this decision we will know which party should we fix - BE, FE, or both.

@matifali
Copy link
Member Author

Can reproduce with a member role who is admin for only 1 template.

@matifali
Copy link
Member Author

This is again happening on dev.coder.com

@matifali matifali reopened this Aug 17, 2023
@matifali
Copy link
Member Author

matifali commented Aug 17, 2023

cc: @mtojek @bpmct

@matifali
Copy link
Member Author

I am unable to reproduce it anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s2 Broken use cases or features (with a workaround). Only humans may set this.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants