diff --git a/src/common/config.cc b/src/common/config.cc
index 9642ccd311175..86e92b36dce93 100644
--- a/src/common/config.cc
+++ b/src/common/config.cc
@@ -393,6 +393,17 @@ void md_config_t::show_config(Formatter *f)
_show_config(NULL, f);
}
+void md_config_t::config_options(Formatter *f)
+{
+ Mutex::Locker l(lock);
+ f->open_array_section("options");
+ for (const auto& i: schema) {
+ const Option &opt = i.second;
+ opt.dump(f);
+ }
+ f->close_section();
+}
+
void md_config_t::_show_config(std::ostream *out, Formatter *f)
{
if (out) {
diff --git a/src/common/config.h b/src/common/config.h
index 6fbdbc098e52d..5fbcd662d1281 100644
--- a/src/common/config.h
+++ b/src/common/config.h
@@ -181,6 +181,9 @@ struct md_config_t {
void show_config(std::ostream& out);
/// dump all config values to a formatter
void show_config(Formatter *f);
+
+ /// dump all config settings to a formatter
+ void config_options(Formatter *f);
/// obtain a diff between our config values and another md_config_t values
void diff(const md_config_t *other,
diff --git a/src/mgr/ActivePyModules.cc b/src/mgr/ActivePyModules.cc
index 7b370800926e3..f684a30ba2ccb 100644
--- a/src/mgr/ActivePyModules.cc
+++ b/src/mgr/ActivePyModules.cc
@@ -186,9 +186,13 @@ PyObject *ActivePyModules::get_python(const std::string &what)
}
});
return f.get();
- } else if (what == "config") {
+ } else if (what.substr(0, 6) == "config") {
PyFormatter f;
- g_conf->show_config(&f);
+ if (what == "config_options") {
+ g_conf->config_options(&f);
+ } else if (what == "config") {
+ g_conf->show_config(&f);
+ }
return f.get();
} else if (what == "mon_map") {
PyFormatter f;
diff --git a/src/pybind/mgr/dashboard/base.html b/src/pybind/mgr/dashboard/base.html
index 6dbeaf5511d28..0beac4a2f99a3 100644
--- a/src/pybind/mgr/dashboard/base.html
+++ b/src/pybind/mgr/dashboard/base.html
@@ -346,7 +346,7 @@
Cluster health
-
+
Cluster
@@ -362,6 +362,9 @@
Monitors
+
+ Configuration
+
diff --git a/src/pybind/mgr/dashboard/config_options.html b/src/pybind/mgr/dashboard/config_options.html
new file mode 100644
index 0000000000000..e8367a0722dc8
--- /dev/null
+++ b/src/pybind/mgr/dashboard/config_options.html
@@ -0,0 +1,120 @@
+
+{% extends "base.html" %}
+
+{% block content %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name |
+ Description |
+ Long description |
+ Type |
+ Level |
+ Default |
+ Daemon default |
+ Tags |
+ Services |
+ See_also |
+ Max |
+ Min |
+
+
+
+
+ {opt.name} |
+ {opt.desc} |
+ {opt.long_desc} |
+ |
+ {opt.level} |
+ |
+ {opt.daemon_default} |
+
+ | |
+
+ | {opt.max} |
+ {opt.min} |
+
+
+
+
+
+
+
+
+{% endblock %}
diff --git a/src/pybind/mgr/dashboard/module.py b/src/pybind/mgr/dashboard/module.py
index 5f879162ba725..0a4026d113d2b 100644
--- a/src/pybind/mgr/dashboard/module.py
+++ b/src/pybind/mgr/dashboard/module.py
@@ -760,6 +760,28 @@ def servers(self):
toplevel_data=json.dumps(self._toplevel_data(), indent=2),
content_data=json.dumps(self._servers(), indent=2)
)
+
+ @cherrypy.expose
+ def config_options(self, service="any"):
+ template = env.get_template("config_options.html")
+ return template.render(
+ url_prefix = global_instance().url_prefix,
+ ceph_version=global_instance().version,
+ path_info=cherrypy.request.path_info,
+ toplevel_data=json.dumps(self._toplevel_data(), indent=2),
+ content_data=json.dumps(self.config_options_data(service), indent=2)
+ )
+
+ @cherrypy.expose
+ @cherrypy.tools.json_out()
+ def config_options_data(self, service):
+ options = {}
+ options = global_instance().get("config_options")
+
+ return {
+ 'options': options,
+ 'service': service,
+ }
@cherrypy.expose
def monitors(self):
diff --git a/src/pybind/mgr/dashboard/monitors.html b/src/pybind/mgr/dashboard/monitors.html
index 60b34ad62c505..722ee8d2ebf0e 100644
--- a/src/pybind/mgr/dashboard/monitors.html
+++ b/src/pybind/mgr/dashboard/monitors.html
@@ -35,7 +35,8 @@
diff --git a/src/pybind/mgr/dashboard/osd_perf.html b/src/pybind/mgr/dashboard/osd_perf.html
index 2c36613517f7f..38355282abdb6 100644
--- a/src/pybind/mgr/dashboard/osd_perf.html
+++ b/src/pybind/mgr/dashboard/osd_perf.html
@@ -118,6 +118,7 @@
diff --git a/src/pybind/mgr/dashboard/rgw_detail.html b/src/pybind/mgr/dashboard/rgw_detail.html
index 3f224ac4c59cf..c881ef2d806d6 100644
--- a/src/pybind/mgr/dashboard/rgw_detail.html
+++ b/src/pybind/mgr/dashboard/rgw_detail.html
@@ -21,6 +21,7 @@