openfun / potsie

:bar_chart: Grafana dashboards suite for learning analytics
https://demo.potsie.education
MIT License
10 stars 2 forks source link

"No data" in all charts for local demo #70

Closed x86-39 closed 1 year ago

x86-39 commented 1 year ago

Bug Report

In the local demo and a Rancher cluster with Grafana and Potsie installed (with the proper data sources in fixtures/) all views don't contain any data

image

The course key and video popups are empty, manually inserting these does not show any data either. Expected behavior/code In the local demo the dashboards should look like the demo on https://demo.potsie.education/

Actual Behavior A clear and concise description of the behavior.

Steps to Reproduce

  1. Clone this repository
  2. Run make bootstrap
  3. Vew 127.0.0.1:3000 and go to a dashboard

Environment

Additional context/Screenshots image image

Is this a bug or is an additional step needed for the data to render properly?

x86-39 commented 1 year ago

On the "Course videos overview" panel the bottom graph "Course run video views" shows the error db query error: pq: syntax error at or near ")"

quitterie-lcs commented 1 year ago

Hi @diademiemi, thanks for testing Potsie !

2 points are necessary to focus on to get the render you expect.

First of all, environment variables used for ralph service in docker-compose.yml file are outdated, in the latest version of ralph, the names of these variables have changed: could you update the ralph service in docker-compose as followed? (We will soon address this modification in a PR to fix the bug on main).

ralph:
    image: fundocker/ralph:latest
    user: "${DOCKER_USER:-1000}"
    entrypoint: ["ralph"]
    environment:
      - RALPH_BACKENDS__DATABASE__ES__HOSTS=http://elasticsearch:9200
      - RALPH_BACKENDS__DATABASE__ES__INDEX=statements

The second one concerns the account with which you are testing, are you logged in with admin:pass credentials? If yes, please log in with teacher:funfunfun credentials. The reason is that the admin is not related to any courses. As dashboards concerns metrics for teacher teams, only with this account you can have access to the awaited display.

Let us know if you have any trouble !

x86-39 commented 1 year ago

I see, fixing those two things did indeed allow dashboards to render properly! I'll look into how the teacher user is configured and try to replicate it on the Rancher cluster. The README says to log in with admin:pass which is why I didn't realise the teacher user also exists in this demo.

quitterie-lcs commented 1 year ago

Thanks for your feedback, the README might need some clarification about this two coexisting users for the demo. We will update the README soon

x86-39 commented 1 year ago

How would I be able to configure a new user that is also able to view the panels?

quitterie-lcs commented 1 year ago

Currently, there is no way to create a new user in a persistant way. You can still do it on the Grafana interface from the admin account, see following documentation , but be aware that your user will disappear when you run a new bootstrap from the project

x86-39 commented 1 year ago

I understand that but you mentioned earlier that the reason the admin user can't see the panels is since it's not related to any courses. How do I make a user that is related to courses, where is this relation set? Is it coded in the dashboards? I've added the temporary user to the Teacher group but still can't see the panels data.