Skip to content

Comments

Feature: Report Page#495

Open
sawankshrma wants to merge 3 commits intodevsecopsmaturitymodel:mainfrom
sawankshrma:new-feat-Report
Open

Feature: Report Page#495
sawankshrma wants to merge 3 commits intodevsecopsmaturitymodel:mainfrom
sawankshrma:new-feat-Report

Conversation

@sawankshrma
Copy link
Contributor

Description

A new "Report" page is created.
It "dumps" all activities at one page in order to provide it to an auditor, Preferably in a pdf format.

For now, a slightly modified version of the already existing ActivityDescriptionComponent is used in this page to display all/some activities on the page. => This is of-course not exportable/printable for now and will be fixed in later iterations.

The activities (types, individual) and their attributes are configurable as to what we'd like to show in the report and eventually provide to the auditor. The configurations are stored in the localStorage in the browser like all other informations.

Resolves Issue: #494

image

What's Changed?

  • A new ReportComponent is created which dumps all the activities rendered in a modified ActivityDescriptionComponent called ReportConfigModalComponent --> this component is going to be replaced by something better which can be exportable.
  • It contains a button to Adjust the Report's Configuration which opens a modal whose component is also a newly generated component called ReportConfigModalComponent. All the configurations of the report can be altered through this modal. The new configurations are then modified and saved in the localStorage and the Report page is then re-rendered with those modified configurations.
  • A new model file called report-config.ts is created which exports some functions and interfaces useful to the "Report" page.
  • The app-routing.module.ts and sidenav-buttons.component.ts files are modified to contain the new "Report" page.

@wurstbrot
Copy link
Collaborator

Than you @sawankshrma , comments in the review.

@wurstbrot wurstbrot requested review from 0x41head and vbakke February 21, 2026 09:56
@sawankshrma
Copy link
Contributor Author

Than you @sawankshrma , comments in the review.

HI @wurstbrot . Thank You for the review.

See, this component (ReportActivityComponent) was not built by me from Scratch. I just copy-pasted the already existing ActivityDescriptionComponent's code. I just changed some lines and/or commented some lines which were causing trouble in the "Report" Page. That's why it has some commented code and some extra lines which are not required here.

In further iterations I am going to replace this component completely to provide for an Exportable/Printable "Report" page. I hope you understand :)

@sawankshrma
Copy link
Contributor Author

What's Changed in the above commit?

  • The Page doesn't use any other component for displaying --> The ReportActivityComponent is completely removed now.
  • An Overview section has been added, providing a summary of the completion status for each level. (The contents of this section may be changed after further discussion.)

New Tabular Layout

  • The page is Sorted by Dimension > Sub-Dimension > Levels inside the Table
  1. Tabular Layout ensures the contents are print-friendly/auditor friendly.
  2. This Layout has columns namely :
    • Level
    • Activity Name
    • Description- (Configurable both as to - include this column or not. And also introduced is a new feature where Number of Words of the Description and be Capped from the Configuration Modal.) New functions are added to the component class for converting the Markdown Description into html which can be rendered inside a table cell (In this process, the width of the images of the Markdown is also altered to fit inside the table cell).
    • Other Columns can be either Teams or The Activity Status which can also be toggled in the Configuration Modal.

  • Selecting Teams is added to the Configuration Modal (Either individual teams or groups can be selected -- as to include them in the Report or not.
  • Max Level is directly interpreted from the SettingsService.
  • The position of the Page's Link is moved as mentioned in the issue's comment.
  • A print button has been added that triggers the simple window.print() command. It also displays an alert with recommended settings for optimal export. Additionally, the Report Page CSS has been updated to include print-specific styles. See exported-example.pdf
image
  • Awaiting review - happy to make further adjustments as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants