Changeset 1577
- Timestamp:
- 06/18/08 21:18:39 (3 months ago)
- Files:
-
- cherokee/trunk/ChangeLog (modified) (1 diff)
- cherokee/trunk/admin/CherokeeManagement.py (modified) (2 diffs)
- cherokee/trunk/admin/PageAdvanced.py (modified) (3 diffs)
- cherokee/trunk/cherokee/info.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/ChangeLog
r1576 r1577 1 1 2008-06-18 Alvaro Lopez Ortega <alvaro@alobbs.com> 2 3 * admin/CherokeeManagement.py (cherokee_has_polling_method), 4 admin/PageAdvanced.py (PageAdvanced._render_content): It shows 5 only the Polling methods that are available. It does not make 6 sense to show "Solaris ports" or "Select Win32" on MacOS X, for 7 instance. 2 8 3 9 * cherokee/info.c (cherokee_info_build_print): Print the polling cherokee/trunk/admin/CherokeeManagement.py
r1518 r1577 222 222 _built_in_list_done = False 223 223 224 225 def cherokee_build_info_has (filter, module): 226 # Let's see whether it's built-in 227 global _built_in_list 228 global _built_in_list_done 229 230 if not _built_in_list_done: 231 _built_in_list_done = True 232 233 try: 234 f = os.popen ("%s -i" % (CHEROKEE_SRV_PATH)) 235 cont = f.read() 236 f.close() 237 except: 238 pass 239 240 try: 241 filter_string = " %s: " % (filter) 242 for l in cont.split("\n"): 243 if l.startswith(filter_string): 244 line = l.replace (filter_string, "") 245 break 246 _built_in_list = line.split(" ") 247 except: 248 pass 249 250 return module in _built_in_list 251 224 252 def cherokee_has_plugin (module): 225 253 # Check for the dynamic plug-in … … 231 259 pass 232 260 233 # Let's see whether it's built-in 234 global _built_in_list 235 global _built_in_list_done 236 237 if not _built_in_list_done: 238 _built_in_list_done = True 239 240 try: 241 f = os.popen ("%s -i" % (CHEROKEE_SRV_PATH)) 242 cont = f.read() 243 f.close() 244 except: 245 pass 246 247 try: 248 line = filter(lambda x: x.startswith (" Built-in: "), cont.split("\n"))[0] 249 line = line.replace(" Built-in: ", "") 250 _built_in_list = line.split(" ") 251 except: 252 pass 253 254 return module in _built_in_list 255 261 return cherokee_build_info_has ("Built-in", module) 262 263 def cherokee_has_polling_method (module): 264 return cherokee_build_info_has ("Polling methods", module) cherokee/trunk/admin/PageAdvanced.py
r1435 r1577 5 5 from Form import * 6 6 from consts import * 7 from CherokeeManagement import * 7 8 8 9 DATA_VALIDATION = [ … … 50 51 51 52 def _render_content (self): 53 polling_methods = [] 54 for name, desc in POLL_METHODS: 55 if ((not name) or \ 56 cherokee_has_polling_method (name)): 57 polling_methods.append((name, desc)) 58 52 59 txt = "<h1>Advanced configuration</h1>" 53 60 txt += self.Dialog(WARNING, 'warning') … … 62 69 txt += "<h2>Server tweaking</h2>" 63 70 table = TableProps() 64 self.AddPropOptions (table, 'Polling Method', 'server!poll_method', POLL_METHODS, NOTE_POLLING)71 self.AddPropOptions (table, 'Polling Method', 'server!poll_method', polling_methods, NOTE_POLLING) 65 72 self.AddPropEntry (table, 'Sendfile min size', 'server!sendfile_min', NOTE_SENDFILE_MIN) 66 73 self.AddPropEntry (table, 'Sendfile max size', 'server!sendfile_max', NOTE_SENDFILE_MAX) cherokee/trunk/cherokee/info.c
r1576 r1577 98 98 #endif 99 99 100 printf (" polling methods: ");100 printf (" Polling methods: "); 101 101 #ifdef HAVE_PORT 102 102 printf ("ports ");