diff --git a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/all-activity.component.html b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/all-activity.component.html index 963b1948993..8459dc565ae 100644 --- a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/all-activity.component.html +++ b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/all-activity.component.html @@ -5,11 +5,11 @@ } @if (!(isLoading$ | async) && (noData$ | async)) { -
+

- {{ organization?.name }} + {{ "noAppsInOrgTitle" | i18n: organization?.name }}

diff --git a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/all-activity.component.ts b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/all-activity.component.ts index b73bdf69eab..da78f385cbd 100644 --- a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/all-activity.component.ts +++ b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/all-activity.component.ts @@ -1,7 +1,7 @@ import { Component, DestroyRef, inject, OnInit } from "@angular/core"; import { takeUntilDestroyed } from "@angular/core/rxjs-interop"; import { ActivatedRoute } from "@angular/router"; -import { BehaviorSubject, firstValueFrom, of, switchMap } from "rxjs"; +import { BehaviorSubject, combineLatest, firstValueFrom, of, switchMap } from "rxjs"; import { CriticalAppsService, @@ -13,6 +13,7 @@ import { Organization } from "@bitwarden/common/admin-console/models/domain/orga import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; import { getUserId } from "@bitwarden/common/auth/services/account.service"; import { getById } from "@bitwarden/common/platform/misc"; +import { OrganizationId } from "@bitwarden/common/types/guid"; import { SharedModule } from "@bitwarden/web-vault/app/shared"; import { ActivityCardComponent } from "./activity-card.component"; @@ -41,20 +42,24 @@ export class AllActivityComponent implements OnInit { (await firstValueFrom( this.organizationService.organizations$(userId).pipe(getById(organizationId)), )) ?? null; - } - this.dataService.applications$ - .pipe( - takeUntilDestroyed(this.destroyRef), - switchMap((apps) => { - const atRiskMembers = this.reportService.generateAtRiskMemberList(apps ?? []); - return of({ apps, atRiskMembers }); - }), - ) - .subscribe(({ apps, atRiskMembers }) => { - this.noData$.next((apps?.length ?? 0) === 0); - this.atRiskMemberCount = atRiskMembers?.length; - }); + combineLatest([ + this.dataService.applications$, + this.criticalAppsService.getAppsListForOrg(organizationId as OrganizationId), + ]) + .pipe( + takeUntilDestroyed(this.destroyRef), + switchMap(([apps, criticalApps]) => { + const atRiskMembers = this.reportService.generateAtRiskMemberList(apps ?? []); + return of({ apps, atRiskMembers, criticalApps }); + }), + ) + .subscribe(({ apps, atRiskMembers, criticalApps }) => { + this.noData$.next((apps?.length ?? 0) === 0); + this.atRiskMemberCount = atRiskMembers?.length ?? 0; + this.criticalApplicationsCount = criticalApps?.length ?? 0; + }); + } } constructor(