]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard : Add cephadm config params to dashboard 67414/head
authorAbhishek Desai <abhishek.desai1@ibm.com>
Thu, 19 Feb 2026 09:08:33 +0000 (14:38 +0530)
committerAbhishek Desai <abhishek.desai1@ibm.com>
Thu, 26 Feb 2026 05:27:23 +0000 (10:57 +0530)
fixes : https://tracker.ceph.com/issues/75109
Signed-off-by: Abhishek Desai <abhishek.desai1@ibm.com>
src/pybind/mgr/dashboard/controllers/cluster_configuration.py
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.ts

index 292f381d79f0138a65e025b0d10ac61b3a5c5f88..eeda4289eb8c3d9f34ad509dae936a5cd8fef669 100644 (file)
@@ -33,6 +33,44 @@ FILTER_SCHEMA = [{
 @APIDoc("Manage Cluster Configurations", "ClusterConfiguration")
 class ClusterConfiguration(RESTController):
 
+    def _get_cephadm_options(self):
+        """
+        Fetches all cephadm module options and formats them like config options.
+        :return: list of cephadm options formatted as config options
+        """
+        cephadm_options = []
+        mgr_map = mgr.get('mgr_map')
+
+        # Get cephadm module config from mgr_map
+        cephadm_module_config = None
+        for module_config in mgr_map.get('available_modules', []):
+            if module_config['name'] == 'cephadm':
+                cephadm_module_config = module_config
+                break
+
+        if not cephadm_module_config:
+            return cephadm_options
+
+        module_options = cephadm_module_config.get('module_options', {})
+
+        for option_name, opt in module_options.items():
+            current_value = mgr.get_module_option_ex(
+                'cephadm', option_name, opt.get('default_value'))
+
+            option = dict(opt)
+            option['name'] = f'mgr/cephadm/{option_name}'
+            option['default'] = option.pop('default_value', None)
+            option['daemon_default'] = option['default']
+            option['enum_values'] = option.pop('enum_allowed', [])
+            option['services'] = ['mgr']
+            option['can_update_at_runtime'] = True
+            option['value'] = [{'section': 'mgr', 'value': current_value}]
+            option['source'] = 'mgr_module'
+
+            cephadm_options.append(option)
+
+        return cephadm_options
+
     def _append_config_option_values(self, options):
         """
         Appends values from the config database (if available) to the given options
@@ -56,7 +94,10 @@ class ClusterConfiguration(RESTController):
 
     def list(self):
         options = mgr.get('config_options')['options']
-        return self._append_config_option_values(options)
+        options = self._append_config_option_values(options)
+        # Append all cephadm module options
+        options.extend(self._get_cephadm_options())
+        return options
 
     def get(self, name):
         return self._get_config_option(name)
@@ -127,6 +168,10 @@ class ClusterConfiguration(RESTController):
             if option['name'] == name:
                 return self._append_config_option_values([option])[0]
 
+        for cephadm_option in self._get_cephadm_options():
+            if cephadm_option['name'] == name:
+                return cephadm_option
+
         raise cherrypy.HTTPError(404)
 
     def _updateable_at_runtime(self, config_option_names, force_update=False):
index 47c45dabc11f29ba10de9409050277857545512f..1fb4b4cf4654c336478cdc3b8dddb0a9718dc494 100644 (file)
@@ -72,13 +72,40 @@ export class ConfigurationComponent extends ListWithDetails implements OnInit {
     {
       name: $localize`Source`,
       prop: 'source',
-      filterOptions: ['mon'],
+      filterOptions: ['mon', 'mgr_module'],
       filterPredicate: (row, value) => {
         if (!row.hasOwnProperty('source')) {
           return false;
         }
         return row.source.includes(value);
       }
+    },
+    {
+      name: $localize`Module`,
+      prop: 'module',
+      filterOptions: ['cephadm'],
+      filterPredicate: (row, value) => {
+        if (value === 'cephadm') {
+          return row.name?.startsWith('mgr/cephadm/');
+        }
+        return false;
+      }
+    },
+    {
+      name: $localize`Category`,
+      prop: 'category',
+      filterOptions: [$localize`certificate`],
+      filterPredicate: (row, value) => {
+        if (value === 'certificate') {
+          return (
+            row.name?.toLowerCase().includes('certificate') ||
+            row.name?.toLowerCase().includes('cert') ||
+            row.name?.toLowerCase().includes('ssl') ||
+            row.name?.toLowerCase().includes('tls')
+          );
+        }
+        return false;
+      }
     }
   ];