2021-08-27 14:50:58 +02:00
|
|
|
import { Component } from "@angular/core";
|
2018-12-14 20:42:04 +01:00
|
|
|
import { ActivatedRoute } from "@angular/router";
|
|
|
|
|
2022-06-14 17:10:53 +02:00
|
|
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
|
|
|
import { CipherService } from "@bitwarden/common/abstractions/cipher.service";
|
|
|
|
import { MessagingService } from "@bitwarden/common/abstractions/messaging.service";
|
|
|
|
import { OrganizationService } from "@bitwarden/common/abstractions/organization.service";
|
|
|
|
import { PasswordRepromptService } from "@bitwarden/common/abstractions/passwordReprompt.service";
|
|
|
|
import { StateService } from "@bitwarden/common/abstractions/state.service";
|
|
|
|
import { CipherView } from "@bitwarden/common/models/view/cipherView";
|
2021-08-27 14:50:58 +02:00
|
|
|
|
2022-03-29 21:55:47 +02:00
|
|
|
import { UnsecuredWebsitesReportComponent as BaseUnsecuredWebsitesReportComponent } from "../../reports/unsecured-websites-report.component";
|
2018-12-14 20:42:04 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: "app-unsecured-websites-report",
|
2022-03-29 21:55:47 +02:00
|
|
|
templateUrl: "../../reports/unsecured-websites-report.component.html",
|
2018-12-14 20:42:04 +01:00
|
|
|
})
|
|
|
|
export class UnsecuredWebsitesReportComponent extends BaseUnsecuredWebsitesReportComponent {
|
2021-08-27 14:50:58 +02:00
|
|
|
constructor(
|
|
|
|
cipherService: CipherService,
|
|
|
|
modalService: ModalService,
|
2021-12-14 17:10:26 +01:00
|
|
|
messagingService: MessagingService,
|
|
|
|
stateService: StateService,
|
|
|
|
private route: ActivatedRoute,
|
|
|
|
private organizationService: OrganizationService,
|
|
|
|
passwordRepromptService: PasswordRepromptService
|
|
|
|
) {
|
|
|
|
super(cipherService, modalService, messagingService, stateService, passwordRepromptService);
|
2018-12-14 20:42:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
async ngOnInit() {
|
2021-02-03 18:41:33 +01:00
|
|
|
this.route.parent.parent.params.subscribe(async (params) => {
|
2021-12-14 17:10:26 +01:00
|
|
|
this.organization = await this.organizationService.get(params.organizationId);
|
2018-12-14 20:42:04 +01:00
|
|
|
await super.ngOnInit();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
getAllCiphers(): Promise<CipherView[]> {
|
|
|
|
return this.cipherService.getAllFromApiForOrganization(this.organization.id);
|
|
|
|
}
|
|
|
|
}
|