]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: show checkboxes for booleans
authorTatjana Dehler <tdehler@suse.com>
Fri, 24 Jan 2020 16:02:22 +0000 (17:02 +0100)
committerTatjana Dehler <tdehler@suse.com>
Mon, 27 Jan 2020 10:52:56 +0000 (11:52 +0100)
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 <tdehler@suse.com>
src/pybind/mgr/dashboard/frontend/e2e/cluster/mgr-modules.e2e-spec.ts
src/pybind/mgr/dashboard/settings.py

index 4950e44ed5d64396c06d304dbe1897765ca9f9da..d143a55d37868604c4eedb62908205025ac96a1e 100644 (file)
@@ -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);
     });
 
index 9e1a6a95bc74b6e45510b2982fdd685a2e3b4f73..c73a8c988c58abb71c4438a240d649b35b7714f9 100644 (file)
@@ -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