Changeset 1795
- Timestamp:
- 08/13/08 14:45:13 (3 months ago)
- Files:
-
- cherokee/trunk/ChangeLog (modified) (1 diff)
- cherokee/trunk/admin/ModuleServerInfo.py (modified) (3 diffs)
- cherokee/trunk/cherokee/handler_server_info.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/ChangeLog
r1793 r1795 1 1 2008-08-13 Alvaro Lopez Ortega <alvaro@alobbs.com> 2 3 * cherokee/handler_server_info.c, admin/ModuleServerInfo.py: Both 4 the server info handler and its cherokee-admin module have been 5 reworked in order to make its configuration options more 6 consistent. It was showing too much internal stuff. 2 7 3 8 * cherokee/plugin_loader.c (cherokee_plugin_loader_get_mods_info): cherokee/trunk/admin/ModuleServerInfo.py
r1418 r1795 3 3 from Module import * 4 4 5 NOTE_JUST_ABOUT = 'Show only the most basic information.' 6 NOTE_CONNECTIONS = 'Show status of the ongoing connections.' 5 NOTE_INFORMATION = 'Which information should be shown.' 6 7 options = [ 8 ('normal', "Server Information"), 9 ('just_about', "Only version information"), 10 ('connection_details', "Server Information + Connections") 11 ] 7 12 8 13 class ModuleServerInfo (Module, FormHelper): 9 PROPERTIES = [ 10 'just_about', 11 'connection_details' 12 ] 14 PROPERTIES = [] 13 15 14 16 def __init__ (self, cfg, prefix, submit_url): … … 20 22 21 23 table = TableProps() 22 self.AddPropCheck (table, "Just 'About'", "%s!just_about" % (self._prefix), False, NOTE_JUST_ABOUT) 23 self.AddPropCheck (table, "Show Connections", "%s!connection_details" % (self._prefix), False, NOTE_CONNECTIONS) 24 self.AddPropOptions (table, "Show Information", 25 "%s!type" % (self._prefix), 26 options, NOTE_INFORMATION) 24 27 txt += self.Indent(table) 25 28 … … 27 30 28 31 def _op_apply_changes (self, uri, post): 29 self.ApplyChangesPrefix (self._prefix, ['just_about'], post)32 None cherokee/trunk/cherokee/handler_server_info.c
r1776 r1795 138 138 cherokee_config_node_t *subconf = CONFIG_NODE(i); 139 139 140 if (equal_buf_str (&subconf->key, "just_about")) { 141 props->just_about = atoi(subconf->val.buf); 142 } else if (equal_buf_str (&subconf->key, "connection_details")) { 143 props->connection_details = atoi(subconf->val.buf); 144 } else { 145 PRINT_MSG ("ERROR: Handler file: Unknown key: '%s'\n", subconf->key.buf); 146 return ret_error; 140 if (equal_buf_str (&subconf->key, "type")) { 141 if (equal_buf_str (&subconf->val, "normal")) { 142 143 } else if (equal_buf_str (&subconf->val, "just_about")) { 144 props->just_about = true; 145 146 } else if (equal_buf_str (&subconf->val, "connection_details")) { 147 props->connection_details = true; 148 149 } else { 150 PRINT_MSG ("ERROR: Handler server_info: Unknown key value: '%s'\n", 151 subconf->val.buf); 152 return ret_error; 153 } 147 154 } 148 155 }