]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Handle errors for /api/osd/settings 55643/head
authorAfreen <afreen23.git@gmail.com>
Tue, 13 Feb 2024 10:26:09 +0000 (15:56 +0530)
committerAfreen <afreen23.git@gmail.com>
Wed, 21 Feb 2024 10:19:32 +0000 (15:49 +0530)
commit518bff9c7ed6f6756aff8aa8013c48a5bfdd7b32
tree77ed9e63d9b51f7577508be6b328749a0d845622
parent98242a71bf52346f5e9be023aa2d20501fd99a21
mgr/dashboard: Handle errors for /api/osd/settings

Fixes https://tracker.ceph.com/issues/62089

issue:
=====
/api/osd/settings returns "TypeError: string indices must be
integers" sometimes.
The result is coming from `osd dump` command which instead of returning
an object returns an error message which then displays error on
dashboard.

fix:
====
Added a try-catch block to handle error and updated frontend code to
handle those

Signed-off-by: Afreen <afreen23.git@gmail.com>
src/pybind/mgr/dashboard/controllers/osd.py
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/dashboard-pie/dashboard-pie.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/usage-bar/usage-bar.component.html