1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Implemented rough UI for accessing report results

This commit is contained in:
Jeremy Stretch
2017-09-22 12:11:10 -04:00
parent b5ab498e75
commit 79fdf641c0
6 changed files with 85 additions and 18 deletions

View File

@ -32,6 +32,10 @@ class Command(BaseCommand):
report = report_cls()
results = report.run()
# Record the results
ReportResult.objects.filter(report=report_name_full).delete()
ReportResult(report=report_name_full, failed=report.failed, data=results).save()
# Report on success/failure
status = self.style.ERROR('FAILED') if report.failed else self.style.SUCCESS('SUCCESS')
for test_name, attrs in results.items():