##// END OF EJS Templates
system-info: added usage info.
marcink -
r1391:0d5c781f default
parent child Browse files
Show More
@@ -609,11 +609,30 b' def server_info(environ):'
609 609 return SysInfoRes(value=value)
610 610
611 611
612 def usage_info():
613 from rhodecode.model.db import User, Repository
614 value = {
615 'users': User.query().count(),
616 'users_active': User.query().filter(User.active == True).count(),
617 'repositories': Repository.query().count(),
618 'repository_types': {
619 'hg': Repository.query().filter(
620 Repository.repo_type == 'hg').count(),
621 'git': Repository.query().filter(
622 Repository.repo_type == 'git').count(),
623 'svn': Repository.query().filter(
624 Repository.repo_type == 'svn').count(),
625 },
626 }
627 return SysInfoRes(value=value)
628
629
612 630 def get_system_info(environ):
613 631 environ = environ or {}
614 632 return {
615 633 'rhodecode_app': SysInfo(rhodecode_app_info)(),
616 634 'rhodecode_config': SysInfo(rhodecode_config)(),
635 'rhodecode_usage': SysInfo(usage_info)(),
617 636 'python': SysInfo(python_info)(),
618 637 'py_modules': SysInfo(py_modules)(),
619 638
General Comments 0
You need to be logged in to leave comments. Login now