-
-
Notifications
You must be signed in to change notification settings - Fork 265
Add button to download health stats PDF #1756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
arkid15r
merged 20 commits into
OWASP:main
from
ahmedxgouda:dashboard/pdf-overview-client
Jul 30, 2025
Merged
Changes from 12 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
cf4b4d7
Add API endpoint
ahmedxgouda 49e01b1
Add frontend button and fetch method
ahmedxgouda f899442
Fix spelling
ahmedxgouda 731ca29
Add metrics route
ahmedxgouda 2c1ac07
Update tests
ahmedxgouda 6cb5f4d
Remove old urls.py
ahmedxgouda 17979fe
Update code
ahmedxgouda c6d93d7
Merge branch 'main' into dashboard/pdf-overview-client
ahmedxgouda d50304f
Dynamically generated file
ahmedxgouda df438b4
Update code
ahmedxgouda 69e6b8d
Update tests
ahmedxgouda b096464
Update with views
ahmedxgouda bfbede1
Add require GET
ahmedxgouda b622177
Update REST
ahmedxgouda 0b669ba
Merge branch 'main' into dashboard/pdf-overview-client
ahmedxgouda 858f35c
Update code
arkid15r aefbe91
Merge branch 'main' into dashboard/pdf-overview-client
ahmedxgouda e2faead
Apply suggestions
ahmedxgouda 48f1e31
Update code
arkid15r b8b37fc
Merge branch 'main' into dashboard/pdf-overview-client
arkid15r File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
15 changes: 15 additions & 0 deletions
15
backend/apps/owasp/api/internal/views/project_health_metrics.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| """Views for OWASP project health metrics.""" | ||
|
|
||
| from django.http import FileResponse | ||
|
|
||
| from apps.owasp.models.project_health_metrics import ProjectHealthMetrics | ||
|
|
||
|
|
||
| def generate_overview_pdf(_request): | ||
| """Generate a PDF overview of OWASP project health metrics.""" | ||
| pdf = ProjectHealthMetrics.generate_overview_pdf() | ||
| return FileResponse( | ||
| pdf, | ||
| as_attachment=True, | ||
| filename="owasp_project_health_metrics_overview.pdf", | ||
| ) | ||
ahmedxgouda marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| """URLs for OWASP project health metrics.""" | ||
|
|
||
| from django.urls import path | ||
|
|
||
| from apps.owasp.api.internal.views.project_health_metrics import generate_overview_pdf | ||
|
|
||
| urlpatterns = [ | ||
| path( | ||
| "project-health-metrics/overview/pdf/", | ||
| generate_overview_pdf, | ||
| name="project_health_metrics_overview_pdf", | ||
| ), | ||
| ] |
79 changes: 0 additions & 79 deletions
79
backend/apps/owasp/management/commands/owasp_generate_project_health_metrics_overview_pdf.py
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 0 additions & 64 deletions
64
...apps/owasp/management/commands/owasp_generate_project_health_metrics_overview_pdf_test.py
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.