You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
660 B

5 years ago
  1. # -*- coding: utf-8 -*-
  2. from . import custom, dependencies
  3. def all_installed_checks(env):
  4. result = []
  5. installed_modules = env.registry._init_modules
  6. for module_name in installed_modules:
  7. result += custom.get_checks_for_module(module_name)
  8. result += dependencies.get_checks_for_module(module_name)
  9. return result
  10. def display_data(env, checks):
  11. response = []
  12. for check in checks:
  13. result = check.run(env)
  14. response.append({
  15. 'module': check.module,
  16. 'message': result.message,
  17. 'details': result.details,
  18. 'result': result.result
  19. })
  20. return response