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

Static datasource images broken in multi_org setup #5256

Open
mangrose opened this issue Nov 3, 2020 · 4 comments · Fixed by metr-systems/redash#1
Open

Static datasource images broken in multi_org setup #5256

mangrose opened this issue Nov 3, 2020 · 4 comments · Fixed by metr-systems/redash#1

Comments

@mangrose
Copy link

mangrose commented Nov 3, 2020

Issue Summary

Using the AWS AMI and successfully enabling multi_org support in Redash, I have found that the static images that illustrate datasources are broken. Looking at the source it looks like the culprit is in "client/app/services/data-source.js" and the IMG_ROOT variable. Adding a leading slash in the path would probably fix this.

Steps to Reproduce

  1. Enable multi_org support
  2. Create datasource in organisation
  3. All datasource images are broken

Static datasource images are shown correctly in a non multi_org setup and I think it should work in a multi_org setup as well.

Technical details:

  • Redash Version: Version: 9.0.0-beta (8d548ec)
  • Browser/OS: Chrome/MacOS
  • How did you install Redash: AWS AMI
@kravets-levko
Copy link
Collaborator

Looks this issue is addressed in this PR: #5229

@mangrose
Copy link
Author

mangrose commented Nov 3, 2020

Yes, looks like it. Thanks for the update. Would be good if it could be configurable as mentioned in the PR.

@keleyes
Copy link

keleyes commented Nov 6, 2020

you can use nginx solve this problem.
add in nginx configuration:
   location ~^/.*/static/images/ {
     rewrite ^/.*/static/images/(.*)    /static/images/$1;
  }

@mangrose
Copy link
Author

mangrose commented Nov 8, 2020

you can use nginx solve this problem.
add in nginx configuration:
   location ~^/./static/images/ {
     rewrite ^/.
/static/images/(.*)    /static/images/$1;
  }

This worked perfectly, thanks!

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