From fb311bfb4b9beca787faa884434a3410513fe733 Mon Sep 17 00:00:00 2001 From: Jordan Aasen <166539328+jaasen-livefront@users.noreply.github.com> Date: Mon, 15 Jul 2024 03:26:11 -0700 Subject: [PATCH] [PM-4964] migrate exposed passwords report components (#9952) * WIP - migrate exposed passwords report components * lint fix * migrate components in reports * migrate breach and unsecured websites reports * undo change routing * revert changes to reports * revert changes * fix icon and padding in exposed passwords report * fix icon and padding in exposed passwords report * fix exposed passwords report cipher state * [PM-4965] Migrate inactive two factor report (#10043) * migrate inactive two factor report * fix icon and padding in inactive two factor report * [PM-4967] Migrate reused passwords report components (#10044) * migrate components in reused passwords report * fix icon and padding in reused passwords report * [PM-4969] Migrate weak passwords report components (#10048) * migrate weak passwords report component * migrate weak passwords report component * Revert "migrate weak passwords report component" This reverts commit 0e453aafc154fee48f37bb22a7f24cdf2847a43c. * Revert "migrate weak passwords report component" This reverts commit e8e9b01997ce453e9292b7f49ccc8ac81bab690d. * Revert "Revert "migrate weak passwords report component"" This reverts commit 8cd2421cb0107cf579f3a83acb97f9f3dbf5e5e6. * fix padding and icon size in weak passwords report --------- Co-authored-by: jordan-bite --- .../reports/pages/cipher-report.component.ts | 5 + .../exposed-passwords-report.component.html | 49 ++++--- .../exposed-passwords-report.component.ts | 1 - .../inactive-two-factor-report.component.html | 127 +++++++++--------- .../reused-passwords-report.component.html | 49 ++++--- .../weak-passwords-report.component.html | 49 ++++--- 6 files changed, 139 insertions(+), 141 deletions(-) diff --git a/apps/web/src/app/tools/reports/pages/cipher-report.component.ts b/apps/web/src/app/tools/reports/pages/cipher-report.component.ts index 4e63dd5cc9..b6a34cf251 100644 --- a/apps/web/src/app/tools/reports/pages/cipher-report.component.ts +++ b/apps/web/src/app/tools/reports/pages/cipher-report.component.ts @@ -9,6 +9,7 @@ import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.servi import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { CipherRepromptType } from "@bitwarden/common/vault/enums/cipher-reprompt-type"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { TableDataSource } from "@bitwarden/components"; import { PasswordRepromptService } from "@bitwarden/vault"; import { AddEditComponent } from "../../../vault/individual-vault/add-edit.component"; @@ -24,6 +25,7 @@ export class CipherReportComponent implements OnDestroy { hasLoaded = false; ciphers: CipherView[] = []; allCiphers: CipherView[] = []; + dataSource = new TableDataSource(); organization: Organization; organizations: Organization[]; organizations$: Observable; @@ -104,6 +106,7 @@ export class CipherReportComponent implements OnDestroy { } else { this.ciphers = this.ciphers.filter((c: any) => c.orgFilterStatus === status); } + this.dataSource.data = this.ciphers; } async load() { @@ -193,6 +196,8 @@ export class CipherReportComponent implements OnDestroy { return ciph; }); + this.dataSource.data = this.ciphers; + if (this.filterStatus.length > 2) { this.showFilterToggle = true; this.vaultMsg = "vaults"; diff --git a/apps/web/src/app/tools/reports/pages/exposed-passwords-report.component.html b/apps/web/src/app/tools/reports/pages/exposed-passwords-report.component.html index 30801a42fd..5d2c87bdc4 100644 --- a/apps/web/src/app/tools/reports/pages/exposed-passwords-report.component.html +++ b/apps/web/src/app/tools/reports/pages/exposed-passwords-report.component.html @@ -6,13 +6,13 @@ {{ "checkExposedPasswords" | i18n }}
- + {{ "noExposedPasswords" | i18n }} - + - + {{ "exposedPasswordsFoundReportDesc" | i18n: (ciphers.length | number) : vaultMsg }} - + - - + + - - - + + + - - -
{{ "name" | i18n }} {{ "owner" | i18n }}
- + - + + {{ c.name }}{{ r.name }} - {{ c.name }} + {{ r.name }} - + {{ "shared" | i18n }} - + {{ "attachments" | i18n }}
- {{ c.subTitle }} + {{ r.subTitle }}
- {{ "exposedXTimes" | i18n: (exposedPasswordMap.get(c.id) | number) }} + {{ "exposedXTimes" | i18n: (exposedPasswordMap.get(r.id) | number) }}
+ +
diff --git a/apps/web/src/app/tools/reports/pages/exposed-passwords-report.component.ts b/apps/web/src/app/tools/reports/pages/exposed-passwords-report.component.ts index cabc7bdfa1..8503174a93 100644 --- a/apps/web/src/app/tools/reports/pages/exposed-passwords-report.component.ts +++ b/apps/web/src/app/tools/reports/pages/exposed-passwords-report.component.ts @@ -11,7 +11,6 @@ import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { PasswordRepromptService } from "@bitwarden/vault"; import { CipherReportComponent } from "./cipher-report.component"; - @Component({ selector: "app-exposed-passwords-report", templateUrl: "exposed-passwords-report.component.html", diff --git a/apps/web/src/app/tools/reports/pages/inactive-two-factor-report.component.html b/apps/web/src/app/tools/reports/pages/inactive-two-factor-report.component.html index ae03a3bcb8..a757f0edc5 100644 --- a/apps/web/src/app/tools/reports/pages/inactive-two-factor-report.component.html +++ b/apps/web/src/app/tools/reports/pages/inactive-two-factor-report.component.html @@ -11,13 +11,13 @@ {{ "loading" | i18n }}
- + {{ "noInactive2fa" | i18n }} - + - + {{ "inactive2faFoundReportDesc" | i18n: (ciphers.length | number) : vaultMsg }} - + - - + + - + - - - + + + - - - - -
{{ "name" | i18n }} {{ "owner" | i18n }}
- - - {{ - c.name - }} - - +
+ + + {{ r.name }} + + + {{ "shared" | i18n }} + + + + {{ "attachments" | i18n }} + +
+ {{ r.subTitle }} +
+ - - - - - {{ "instructions" | i18n }} -
+ > + + + + + {{ "instructions" | i18n }} + + + +
diff --git a/apps/web/src/app/tools/reports/pages/reused-passwords-report.component.html b/apps/web/src/app/tools/reports/pages/reused-passwords-report.component.html index 549773ba8c..06176cdcd5 100644 --- a/apps/web/src/app/tools/reports/pages/reused-passwords-report.component.html +++ b/apps/web/src/app/tools/reports/pages/reused-passwords-report.component.html @@ -11,13 +11,13 @@ {{ "loading" | i18n }}
- + {{ "noReusedPasswords" | i18n }} - + - + {{ "reusedPasswordsFoundReportDesc" | i18n: (ciphers.length | number) : vaultMsg }} - + - - + + - - - + + + - - -
{{ "name" | i18n }} {{ "owner" | i18n }}
- + - + + {{ c.name }}{{ r.name }} - {{ c.name }} + {{ r.name }} - + {{ "shared" | i18n }} - + {{ "attachments" | i18n }}
- {{ c.subTitle }} + {{ r.subTitle }}
- {{ "reusedXTimes" | i18n: passwordUseMap.get(c.login.password) }} + {{ "reusedXTimes" | i18n: passwordUseMap.get(r.login.password) }}
+ +
diff --git a/apps/web/src/app/tools/reports/pages/weak-passwords-report.component.html b/apps/web/src/app/tools/reports/pages/weak-passwords-report.component.html index a943c8c29e..36385dd087 100644 --- a/apps/web/src/app/tools/reports/pages/weak-passwords-report.component.html +++ b/apps/web/src/app/tools/reports/pages/weak-passwords-report.component.html @@ -11,13 +11,13 @@ {{ "loading" | i18n }}
- + {{ "noWeakPasswords" | i18n }} - + - + {{ "weakPasswordsFoundReportDesc" | i18n: (ciphers.length | number) : vaultMsg }} - + - - + + - - - + + + - -
{{ "name" | i18n }} {{ "owner" | i18n }}
- + - + {{ c.name }}{{ r.name }} - {{ c.name }} + {{ r.name }} - + {{ "shared" | i18n }} - + {{ "attachments" | i18n }}
- {{ c.subTitle }} + {{ r.subTitle }}
- - {{ passwordStrengthMap.get(c.id)[0] | i18n }} + + {{ passwordStrengthMap.get(r.id)[0] | i18n }}
+ +