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

new/Create a dashboard view #244

Merged
merged 3 commits into from
Jun 18, 2022
Merged

new/Create a dashboard view #244

merged 3 commits into from
Jun 18, 2022

Conversation

aspedrosa
Copy link
Contributor

@aspedrosa aspedrosa commented Jun 2, 2022

Fixes bioinformatics-ua/montra-pvt#1967

When opening the database dashboard on the EHDEN Portal of a database that has not yet uploaded Achilles files into the platform the following will appear:
image

As the issue at the top mentions, a message should be presented instead of rendering the dashboard with "no results" on the charts.

Implementation

Created a new view/endpoint uploader/[db hash]/dashboard which checks

  1. if the data source exists
  2. if it exists, checks if any upload was done.

If one of these conditions fails, the following simple page will render:
image
else the view/endpoint will redirect to Superset's database dashboard

from dashboards.ehden.eu/uploader/[db hash]/dashboard to https://superset.ehden.eu/superset/dashboard/database-level-dashboard/?standalone=1&preselect_filters=%7B%2269%22:%7B%22acronym%22:[%22DB_HASH%22]%7D%7D.

I tested on an iframe and the redirect works nicely.

Note: github actions errors addressed on #243

docker/docker-compose-dev.yml Show resolved Hide resolved
docker/docker-compose-dev.yml Show resolved Hide resolved
dashboard_viewer/dashboard_viewer/settings.py Show resolved Hide resolved
@joaorafaelalmeida joaorafaelalmeida merged commit 4752b7e into dev Jun 18, 2022
@joaorafaelalmeida joaorafaelalmeida deleted the imp/dashboard_view branch June 18, 2022 18:03
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