]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Imrove error message of '/api/grafana/validation' API endpoint 45957/head
authorVolker Theile <vtheile@suse.com>
Wed, 30 Mar 2022 11:38:33 +0000 (13:38 +0200)
committerVolker Theile <vtheile@suse.com>
Tue, 19 Apr 2022 11:56:52 +0000 (13:56 +0200)
commit9351e6c25e3170cd472ba070a0ce1221fabeb5f6
tree7c0cb8381d52566cf1518662127d7261cededf08
parent6a3c584ec0eb0b0f40a1213c4a22d913986538b8
mgr/dashboard: Imrove error message of '/api/grafana/validation' API endpoint

In case the validation of the Grafana URL fails, e.g. because of an invalid SSL certificate, a useless and not helping default error message is displayed in the UI.
This PR will re-raise the exception as a DashboardException which includes the detailed description of what happened. This will help to identify SSL cert issues much easier for example.

Fixes: https://tracker.ceph.com/issues/55133
Signed-off-by: Volker Theile <vtheile@suse.com>
(cherry picked from commit 83524ed1bfb7c8cef307d7c21c3452cbe7a16c4b)
src/pybind/mgr/dashboard/controllers/grafana.py
src/pybind/mgr/dashboard/services/exception.py
src/pybind/mgr/dashboard/tests/test_grafana.py