From: Tatjana Dehler Date: Fri, 24 Jan 2020 16:02:22 +0000 (+0100) Subject: mgr/dashboard: show checkboxes for booleans X-Git-Tag: v15.1.0~24^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=7e7cac98116e76bc9e4c52ac47796e3fcd880667;p=ceph-ci.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 --- diff --git a/src/pybind/mgr/dashboard/frontend/e2e/cluster/mgr-modules.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/cluster/mgr-modules.e2e-spec.ts index 4950e44ed5d..d143a55d378 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/cluster/mgr-modules.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/cluster/mgr-modules.e2e-spec.ts @@ -52,7 +52,7 @@ describe('Manager modules page', () => { }); it('should test editing on dashboard module', async () => { - const dashboardArr = [['rq', 'AUDIT_API_ENABLED'], ['rafa', 'GRAFANA_API_PASSWORD']]; + const dashboardArr = [['rq', 'RGW_API_USER_ID'], ['rafa', 'GRAFANA_API_PASSWORD']]; await mgrmodules.editMgrModule('dashboard', dashboardArr); }); diff --git a/src/pybind/mgr/dashboard/settings.py b/src/pybind/mgr/dashboard/settings.py index 9e1a6a95bc7..c73a8c988c5 100644 --- a/src/pybind/mgr/dashboard/settings.py +++ b/src/pybind/mgr/dashboard/settings.py @@ -163,7 +163,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