add a show_session_speed option

add a get_config() method to the web api
This commit is contained in:
Damien Churchill 2009-08-19 23:16:19 +00:00
parent 219a509bee
commit b4547c0bf0
2 changed files with 17 additions and 0 deletions

View File

@ -693,3 +693,19 @@ class WebApi(JSONComponent):
self.host_list.save() self.host_list.save()
d.callback(True) d.callback(True)
return d return d
@export
def get_config(self):
"""
Get the configuration dictionary for the web interface.
:rtype: dictionary
:returns: the configuration
"""
config = component.get("DelugeWeb").config.config.copy()
del config["sessions"]
del config["pwd_salt"]
del config["pwd_sha1"]
return config

View File

@ -90,6 +90,7 @@ CONFIG_DEFAULTS = {
"sidebar_show_zero": False, "sidebar_show_zero": False,
"sidebar_show_trackers": False, "sidebar_show_trackers": False,
"show_keyword_search": False, "show_keyword_search": False,
"show_session_speed": False,
"show_sidebar": True, "show_sidebar": True,
"cache_templates": False, "cache_templates": False,
"https": False, "https": False,