From: Tatjana Dehler Date: Fri, 24 Jan 2020 16:02:22 +0000 (+0100) Subject: mgr/dashboard: show checkboxes for booleans X-Git-Tag: v14.2.10~215^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c070796fc661e1f881a2ceb0bd0ce32ed0494c53;p=ceph.git mgr/dashboard: show checkboxes for booleans The frontend showed textboxes for the dashboard settings because the actual type information was missing here. The REST API then returned the default type 'str'. Edit the e2e test case in order to update a different setting as the 'editMgrModule' method can't handle checkboxes. Fixes: https://tracker.ceph.com/issues/43769 Signed-off-by: Tatjana Dehler (cherry picked from commit 7e7cac98116e76bc9e4c52ac47796e3fcd880667) --- diff --git a/src/pybind/mgr/dashboard/settings.py b/src/pybind/mgr/dashboard/settings.py index bda0dda04133..31e09fac5ed2 100644 --- a/src/pybind/mgr/dashboard/settings.py +++ b/src/pybind/mgr/dashboard/settings.py @@ -153,7 +153,8 @@ def options_schema_list(): for option, value in inspect.getmembers(Options, filter_attr): if option.startswith('_'): continue - result.append({'name': option, 'default': value[0]}) + result.append({'name': option, 'default': value[0], + 'type': value[1].__name__}) return result