diff --git a/apps/web/src/app/admin-console/organizations/reporting/bulk-collection-seeder/bulk-collection-seeder.component.html b/apps/web/src/app/admin-console/organizations/reporting/bulk-collection-seeder/bulk-collection-seeder.component.html deleted file mode 100644 index 29166f07c4d..00000000000 --- a/apps/web/src/app/admin-console/organizations/reporting/bulk-collection-seeder/bulk-collection-seeder.component.html +++ /dev/null @@ -1,77 +0,0 @@ - - -

Bulk Collection Seeder

-

- Create multiple collections at once for testing purposes. Enter one collection name per line. -

-
- -
- - Collection Names (one per line) - - Enter collection names, one per line. Use "/" for nested collections (e.g., - "Parent/Child"). - - -
- - -
- -
- -

{{ progressMessage() }}

-
- -
-

Results

-

- {{ successCount }} succeeded - , {{ failureCount }} failed -

- -
-
- - - {{ result.name }} - - {{ result.error }} -
-
-
-
-
diff --git a/apps/web/src/app/admin-console/organizations/reporting/bulk-collection-seeder/bulk-collection-seeder.component.ts b/apps/web/src/app/admin-console/organizations/reporting/bulk-collection-seeder/bulk-collection-seeder.component.ts deleted file mode 100644 index f23d1fc10b8..00000000000 --- a/apps/web/src/app/admin-console/organizations/reporting/bulk-collection-seeder/bulk-collection-seeder.component.ts +++ /dev/null @@ -1,149 +0,0 @@ -import { CommonModule } from "@angular/common"; -import { - Component, - ChangeDetectionStrategy, - DestroyRef, - inject, - OnInit, - signal, -} from "@angular/core"; -import { takeUntilDestroyed } from "@angular/core/rxjs-interop"; -import { FormsModule } from "@angular/forms"; -import { ActivatedRoute } from "@angular/router"; -import { firstValueFrom } from "rxjs"; - -import { CollectionAdminService, CollectionAdminView } from "@bitwarden/admin-console/common"; -import { JslibModule } from "@bitwarden/angular/jslib.module"; -import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; -import { getUserId } from "@bitwarden/common/auth/services/account.service"; -import { CollectionId, OrganizationId } from "@bitwarden/common/types/guid"; -import { - ButtonModule, - FormFieldModule, - ProgressModule, - SectionComponent, - SectionHeaderComponent, - TypographyModule, -} from "@bitwarden/components"; -import { HeaderModule } from "@bitwarden/web-vault/app/layouts/header/header.module"; - -interface CollectionCreationResult { - name: string; - success: boolean; - error?: string; - id?: CollectionId; -} - -@Component({ - selector: "app-bulk-collection-seeder", - templateUrl: "./bulk-collection-seeder.component.html", - standalone: true, - imports: [ - CommonModule, - FormsModule, - JslibModule, - HeaderModule, - ButtonModule, - FormFieldModule, - ProgressModule, - SectionComponent, - SectionHeaderComponent, - TypographyModule, - ], - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class BulkCollectionSeederComponent implements OnInit { - private destroyRef = inject(DestroyRef); - private route = inject(ActivatedRoute); - private collectionAdminService = inject(CollectionAdminService); - private accountService = inject(AccountService); - - protected organizationId: OrganizationId | null = null; - protected collectionNames = ""; - protected readonly isProcessing = signal(false); - protected readonly progress = signal(0); - protected readonly progressMessage = signal(""); - protected readonly results = signal([]); - protected readonly hasRun = signal(false); - - ngOnInit(): void { - this.route.params.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((params) => { - this.organizationId = params["organizationId"] as OrganizationId; - }); - } - - protected async createCollections(): Promise { - if (!this.organizationId || !this.collectionNames.trim()) { - return; - } - - const names = this.collectionNames - .split("\n") - .map((name) => name.trim()) - .filter((name) => name.length > 0); - - if (names.length === 0) { - return; - } - - this.isProcessing.set(true); - this.progress.set(0); - this.results.set([]); - this.hasRun.set(true); - - const results: CollectionCreationResult[] = []; - const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(getUserId)); - - for (let i = 0; i < names.length; i++) { - const name = names[i]; - this.progressMessage.set(`Creating collection ${i + 1} of ${names.length}: ${name}`); - this.progress.set(Math.round(((i + 1) / names.length) * 100)); - - try { - const collectionView = new CollectionAdminView({ - id: null as unknown as CollectionId, - organizationId: this.organizationId, - name: name, - }); - collectionView.groups = []; - collectionView.users = []; - - const response = await this.collectionAdminService.create(collectionView, userId); - - results.push({ - name, - success: true, - id: response.id, - }); - } catch (error) { - results.push({ - name, - success: false, - error: error instanceof Error ? error.message : String(error), - }); - } - - this.results.set([...results]); - } - - this.progressMessage.set( - `Completed: ${results.filter((r) => r.success).length} of ${names.length} collections created`, - ); - this.isProcessing.set(false); - } - - protected get successCount(): number { - return this.results().filter((r) => r.success).length; - } - - protected get failureCount(): number { - return this.results().filter((r) => !r.success).length; - } - - protected clearResults(): void { - this.results.set([]); - this.hasRun.set(false); - this.progress.set(0); - this.progressMessage.set(""); - } -} diff --git a/apps/web/src/app/admin-console/organizations/reporting/organization-reporting-routing.module.ts b/apps/web/src/app/admin-console/organizations/reporting/organization-reporting-routing.module.ts index 1ed789fbcaa..f2812e91e53 100644 --- a/apps/web/src/app/admin-console/organizations/reporting/organization-reporting-routing.module.ts +++ b/apps/web/src/app/admin-console/organizations/reporting/organization-reporting-routing.module.ts @@ -21,7 +21,6 @@ import { organizationPermissionsGuard } from "../guards/org-permissions.guard"; import { organizationRedirectGuard } from "../guards/org-redirect.guard"; import { EventsComponent } from "../manage/events.component"; -import { BulkCollectionSeederComponent } from "./bulk-collection-seeder/bulk-collection-seeder.component"; import { ReportsHomeComponent } from "./reports-home.component"; import { RiskInsightsPrototypeComponent } from "./risk-insights-prototype/risk-insights-prototype.component"; @@ -92,14 +91,6 @@ const routes: Routes = [ }, canActivate: [isPaidOrgGuard()], }, - { - path: "bulk-collection-seeder", - component: BulkCollectionSeederComponent, - data: { - titleId: "bulkCollectionSeeder", - }, - canActivate: [isPaidOrgGuard()], - }, ], }, { diff --git a/apps/web/src/app/admin-console/organizations/reporting/organization-reporting.module.ts b/apps/web/src/app/admin-console/organizations/reporting/organization-reporting.module.ts index 9f24f153430..3946e2ee7f5 100644 --- a/apps/web/src/app/admin-console/organizations/reporting/organization-reporting.module.ts +++ b/apps/web/src/app/admin-console/organizations/reporting/organization-reporting.module.ts @@ -4,7 +4,6 @@ import { ReportsSharedModule } from "../../../dirt/reports"; import { HeaderModule } from "../../../layouts/header/header.module"; import { SharedModule } from "../../../shared/shared.module"; -import { BulkCollectionSeederComponent } from "./bulk-collection-seeder/bulk-collection-seeder.component"; import { OrganizationReportingRoutingModule } from "./organization-reporting-routing.module"; import { ReportsHomeComponent } from "./reports-home.component"; import { RiskInsightsPrototypeComponent } from "./risk-insights-prototype/risk-insights-prototype.component"; @@ -16,7 +15,6 @@ import { RiskInsightsPrototypeComponent } from "./risk-insights-prototype/risk-i OrganizationReportingRoutingModule, HeaderModule, RiskInsightsPrototypeComponent, - BulkCollectionSeederComponent, ], declarations: [ReportsHomeComponent], }) diff --git a/apps/web/src/app/admin-console/organizations/reporting/reports-home.component.ts b/apps/web/src/app/admin-console/organizations/reporting/reports-home.component.ts index 7829c349029..69a08dc0230 100644 --- a/apps/web/src/app/admin-console/organizations/reporting/reports-home.component.ts +++ b/apps/web/src/app/admin-console/organizations/reporting/reports-home.component.ts @@ -83,10 +83,6 @@ export class ReportsHomeComponent implements OnInit { ? ReportVariant.Enabled : ReportVariant.RequiresEnterprise, }, - { - ...reports[ReportType.CipherHealthTest], - variant: reportRequiresUpgrade, - }, { ...reports[ReportType.RiskInsightsPrototype], variant: reportRequiresUpgrade, diff --git a/apps/web/src/app/dirt/reports/reports.ts b/apps/web/src/app/dirt/reports/reports.ts index b7ad8aed5c0..cb7772b98e9 100644 --- a/apps/web/src/app/dirt/reports/reports.ts +++ b/apps/web/src/app/dirt/reports/reports.ts @@ -20,7 +20,6 @@ export enum ReportType { Inactive2fa = "inactive2fa", DataBreach = "dataBreach", MemberAccessReport = "memberAccessReport", - CipherHealthTest = "cipherHealthTest", RiskInsightsPrototype = "riskInsightsPrototype", } @@ -69,12 +68,6 @@ export const reports: Record = { route: "member-access-report", icon: UserLockIcon, }, - [ReportType.CipherHealthTest]: { - title: "cipherHealthTest", - description: "cipherHealthTestDesc", - route: "cipher-health-test", - icon: UnlockedIcon, - }, [ReportType.RiskInsightsPrototype]: { title: "riskInsightsPrototype", description: "riskInsightsPrototypeDesc", diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index 41e92819c30..14ad91212a9 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -10739,12 +10739,6 @@ "memberAccessReportAuthenticationEnabledFalse": { "message": "Off" }, - "cipherHealthTest": { - "message": "Risk insights diagnostics" - }, - "cipherHealthTestDesc": { - "message": "Test password health and member access mapping in parallel. View detailed performance diagnostics and analyze cipher security risks." - }, "riskInsightsPrototype": { "message": "Risk Insights Prototype" },