1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

[PM-25613] Add report trigger logic (#16615)

* Add password trigger logic to report service. Also updated api to use classes that properly handle encstring with placeholders for upcoming usage

* Fix merged test case conflict

* Fix type errors and test cases. Make create data functions for report and summary
This commit is contained in:
Leslie Tilton
2025-09-29 14:37:23 -05:00
committed by GitHub
parent 4f79cc8c52
commit e784622f67
16 changed files with 630 additions and 374 deletions

View File

@@ -10,6 +10,7 @@ import {
RiskInsightsDataService,
RiskInsightsReportService,
} from "@bitwarden/bit-common/dirt/reports/risk-insights";
import { createNewSummaryData } from "@bitwarden/bit-common/dirt/reports/risk-insights/helpers";
import {
LEGACY_ApplicationHealthReportDetailWithCriticalFlag,
LEGACY_ApplicationHealthReportDetailWithCriticalFlagAndCipher,
@@ -66,17 +67,7 @@ export class AllApplicationsComponent implements OnInit {
protected organization = new Organization();
noItemsIcon = Security;
protected markingAsCritical = false;
protected applicationSummary: OrganizationReportSummary = {
totalMemberCount: 0,
totalAtRiskMemberCount: 0,
totalApplicationCount: 0,
totalAtRiskApplicationCount: 0,
totalCriticalMemberCount: 0,
totalCriticalAtRiskMemberCount: 0,
totalCriticalApplicationCount: 0,
totalCriticalAtRiskApplicationCount: 0,
newApplications: [],
};
protected applicationSummary: OrganizationReportSummary = createNewSummaryData();
destroyRef = inject(DestroyRef);
isLoading$: Observable<boolean> = of(false);

View File

@@ -146,6 +146,9 @@ export class RiskInsightsComponent implements OnInit {
this._isDrawerOpen = details.open;
});
}
runReport = () => {
this.dataService.triggerReport();
};
/**
* Refreshes the data by re-fetching the applications report.