Changeset 188 for cleverbox/trunk
- Timestamp:
- 08/14/07 13:29:11 (5 years ago)
- Files:
-
- 1 modified
-
cleverbox/trunk/cleverbox/scripts/admin.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cleverbox/trunk/cleverbox/scripts/admin.py
r187 r188 14 14 style = dummy() 15 15 style.ERROR = termcolors.make_style(fg='red', opts=('bold',)) 16 style.SUCCESS = termcolors.make_style(fg='green', opts=('bold',)) 17 style.H1 = termcolors.make_style(fg='white', opts=('bold', 'underline')) 18 style.ENABLED = termcolors.make_style(fg='green') 19 style.DISABLED = termcolors.make_style(fg='red') 16 20 del dummy 17 21 … … 268 272 269 273 def _do_project_list(self, line=None): 270 """271 TODO : Nicer formatting272 """273 274 print275 print "Available projects :"276 print "--------------------"277 274 278 275 client_projects = {} 279 276 280 clients = client.get() 277 clients = client.get(self.env) 278 clients.sort() 281 279 for client_name in clients: 282 client_projects[client_name] = project.get(self.env, client_name) 283 284 print client_projects 280 print style.H1("%s :" % client_name) 281 enabled_projects = project.get(self.env, client_name, 'enabled') 282 disabled_projects = project.get(self.env, client_name, 'disabled') 283 284 if enabled_projects: 285 enabled_projects.sort() 286 print " Enabled :" 287 for project_name in enabled_projects: 288 print style.ENABLED(" - %s" % project_name) 289 290 if disabled_projects: 291 disabled_projects.sort() 292 print " Disabled :" 293 for project_name in disabled_projects: 294 print style.DISABLED(" - %s" % project_name) 295 285 296 286 297
