-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
mgr/dashboard: display helpfull message when the iframe-embedded Grafana dashboard failed to load #45012
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nSedrickm Can you add screenshot for the message shown and also unit-test for checking 500 error msg? Thanks!
bd1b40b
to
28c85c0
Compare
Hello @avanthakkar here's a screenshot The test is done in the grafana components getFrame method |
src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.html
Outdated
Show resolved
Hide resolved
09956fc
to
17e28b3
Compare
jenkins retest this please |
@nSedrickm have you tested if the error warning badge disappears when the user accepts the invalid certificate? At least in my case it didn't work and the reason is that what the There you see 2 simultaneous failures: the first one is a 500 coming form the Dashboard back-end when trying to access Grafana from the backend, and the second one is from the front-end, when the browser tries to embed Grafana inside the That's basically because you accept the Grafana self-signed certificate in your browser, but the Dashboard back-end doesn't know anything about browsers. It uses the
Therefore you have to modify that part of the back-end code to launch a So the problem is still there! Lesson learnt: you cannot rely on the back-end for this. You have to do your magic with just the front-end. Let's explore the alternatives:
|
@epuertat thanks for the review. I noticed the backend still throws even if the user has accepted the certificate but wasn't sure if it was ok to edit the backend code. I will make changes focusing on the front-end only |
bb1adf8
to
749c26b
Compare
@epuertat warning badge now disappears after user accepts certificate and reloads page. I found the onload event fires when the iframe successfully loads even with the server exception which helped. I tried using the srcdoc attribute but the message just replaced the dashboard after the user accepts the certificate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review here @nSedrickm
When we show the new error information, can we hide the Grafana Timepicker and the iframe thing so that only the error is there and user don't have to worry about the blank frame below?
Also, once we accept the privacy concern we don't need to show the error again. Right now, even if we accept the privacy the message appears. So could you hide it when the user accepts that privacy message?
src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.html
Outdated
Show resolved
Hide resolved
I just noticed that its working good in firefox but when you try with chrome something is getting messed up. I am not sure if its a local issue of mine so an additional local testing would be good here. @ceph/dashboard |
Hi @nizamial09, thanks for the review. I will test some more with chrome |
@nSedrickm this is still the old approach, right? Can you plz update the PR with the front-end only check? Thanks! |
Hi! @epuertat, yes, this is the old approach. I only made changes in the grafana html and ts file |
adbfd95
to
df407c2
Compare
df407c2
to
f9e1ca3
Compare
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
f9e1ca3
to
c581125
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Some suggestions over there.
src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.html
Outdated
Show resolved
Hide resolved
src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.html
Outdated
Show resolved
Hide resolved
src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.html
Outdated
Show resolved
Hide resolved
src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.html
Outdated
Show resolved
Hide resolved
…when the iframe-embedded Grafana dashboard failed to load This commit adds checks for successful grafana panel loads before displaying dashboards and informs the user if the request is blocked by the browser Fixes: https://tracker.ceph.com/issues/54206 Signed-off-by: Ngwa Sedrick Meh <nsedrick101@gmail.com>
c581125
to
a4b66ef
Compare
jenkins test api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I am running some teuthology tests for this branch here: @nSedrickm you may not be able to access this link if you don't have access to the Sepia VPN, but I will summarize the results here once the tests finish running. |
Hi @ljflores thanks, I can't access the link |
@nSedrickm you'd need access to the VPN. No worries though, the results were all good! |
This commit checks if there is an error while loading a grafana panel and informs the user
Fixes: https://tracker.ceph.com/issues/54206
Signed-off-by: Ngwa Sedrick Meh nsedrick101@gmail.com
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox