From 256bbaae1b59df38af9564216a1b0c5e6bf0b7a5 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 15 Aug 2025 14:27:39 -0400 Subject: [PATCH] html file for no data modal --- .../no-data-modal.component.html | 86 +++++++++++++ .../no-data-modal.component.ts | 113 ++---------------- 2 files changed, 97 insertions(+), 102 deletions(-) create mode 100644 bitwarden_license/bit-web/src/app/dirt/access-intelligence/no-data-modal.component.html diff --git a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/no-data-modal.component.html b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/no-data-modal.component.html new file mode 100644 index 00000000000..bf1c1d64b98 --- /dev/null +++ b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/no-data-modal.component.html @@ -0,0 +1,86 @@ +
+
+ +
+ +
+

+ Welcome to Risk insights +

+
+ + +
+
+ +

+ To get started, follow these steps to find potential security risks. +

+ + +
+ +
+
+
+ 1 +
+
+

+ Remove individual vaults + (recommended) +

+

+ Turn on the + + Remove individual vault policy + + to get complete visibility of all organization vault data. This setting can be + enabled at any time. +

+
+
+
+ + +
+
+
+ 2 +
+
+

Run the report

+

+ Run the report to see a detailed view of potential at-risk passwords across your + most critical applications. +

+
+
+
+
+
+
+ + +
+ +
+
diff --git a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/no-data-modal.component.ts b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/no-data-modal.component.ts index 167e54321ca..0627596412b 100644 --- a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/no-data-modal.component.ts +++ b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/no-data-modal.component.ts @@ -6,98 +6,7 @@ import { ButtonModule } from "@bitwarden/components"; @Component({ selector: "tools-no-data-modal", - template: ` -
-
- -
- -
-

- Welcome to Risk insights -

-
- - -
-
- -

- To get started, follow these steps to find potential security risks. -

- - -
- -
-
-
- 1 -
-
-

- Remove individual vaults - (recommended) -

-

- Turn on the - - Remove individual vault policy - - to get complete visibility of all organization vault data. This setting can be - enabled at any time. -

-
-
-
- - -
-
-
- 2 -
-
-

Run the report

-

- Run the report to see a detailed view of potential at-risk passwords across your - most critical applications. -

-
-
-
-
-
-
- - -
- -
-
- `, + templateUrl: "./no-data-modal.component.html", standalone: true, imports: [ButtonModule], }) @@ -116,19 +25,19 @@ export class NoDataModalComponent { // Close the modal first this.dialogRef.close(true); - + // Add a small delay to ensure modal closes before navigation - await new Promise(resolve => setTimeout(resolve, 100)); - + await new Promise((resolve) => setTimeout(resolve, 100)); + // Try to navigate using router first try { const result = await this.router.navigate([ - '/organizations', + "/organizations", this.data.organizationId, - 'settings', - 'policies' + "settings", + "policies", ]); - + // If router navigation fails, use window.location as fallback if (!result) { window.location.href = `/#/organizations/${this.data.organizationId}/settings/policies`; @@ -142,10 +51,10 @@ export class NoDataModalComponent { async runReport(): Promise { // Close the modal first this.dialogRef.close(true); - + // Add a small delay to ensure modal closes before triggering the report - await new Promise(resolve => setTimeout(resolve, 100)); - + await new Promise((resolve) => setTimeout(resolve, 100)); + // Trigger the report generation if (this.data.riskInsightsDataService) { this.data.riskInsightsDataService.triggerReport();