-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PM-16104] [PM-15929] Org at risk members click on the card (#12732)
* Org at risk members click on the card * Fixing at risk member counts * At risk member text modification * Changing ok button to close
- Loading branch information
Showing
9 changed files
with
185 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...cense/bit-web/src/app/tools/access-intelligence/app-at-risk-members-dialog.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<bit-dialog> | ||
<span bitDialogTitle>{{ applicationName }}</span> | ||
<ng-container bitDialogContent> | ||
<div class="tw-flex tw-flex-col tw-gap-2"> | ||
<span bitDialogTitle>{{ "atRiskMembersWithCount" | i18n: members.length }} </span> | ||
<span class="tw-text-muted">{{ | ||
"atRiskMembersDescriptionWithApp" | i18n: applicationName | ||
}}</span> | ||
<div class="tw-mt-1"> | ||
<ng-container *ngFor="let member of members"> | ||
<div>{{ member.email }}</div> | ||
</ng-container> | ||
</div> | ||
</div> | ||
</ng-container> | ||
<ng-container bitDialogFooter> | ||
<button bitButton bitDialogClose buttonType="secondary" type="button"> | ||
{{ "close" | i18n }} | ||
</button> | ||
</ng-container> | ||
</bit-dialog> |
35 changes: 35 additions & 0 deletions
35
...license/bit-web/src/app/tools/access-intelligence/app-at-risk-members-dialog.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { DIALOG_DATA } from "@angular/cdk/dialog"; | ||
import { CommonModule } from "@angular/common"; | ||
import { Component, Inject } from "@angular/core"; | ||
|
||
import { JslibModule } from "@bitwarden/angular/jslib.module"; | ||
import { MemberDetailsFlat } from "@bitwarden/bit-common/tools/reports/risk-insights/models/password-health"; | ||
import { ButtonModule, DialogModule, DialogService } from "@bitwarden/components"; | ||
|
||
type AppAtRiskMembersDialogParams = { | ||
members: MemberDetailsFlat[]; | ||
applicationName: string; | ||
}; | ||
|
||
export const openAppAtRiskMembersDialog = ( | ||
dialogService: DialogService, | ||
dialogConfig: AppAtRiskMembersDialogParams, | ||
) => | ||
dialogService.open<boolean, AppAtRiskMembersDialogParams>(AppAtRiskMembersDialogComponent, { | ||
data: dialogConfig, | ||
}); | ||
|
||
@Component({ | ||
standalone: true, | ||
templateUrl: "./app-at-risk-members-dialog.component.html", | ||
imports: [ButtonModule, CommonModule, JslibModule, DialogModule], | ||
}) | ||
export class AppAtRiskMembersDialogComponent { | ||
protected members: MemberDetailsFlat[]; | ||
protected applicationName: string; | ||
|
||
constructor(@Inject(DIALOG_DATA) private params: AppAtRiskMembersDialogParams) { | ||
this.members = params.members; | ||
this.applicationName = params.applicationName; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
...cense/bit-web/src/app/tools/access-intelligence/org-at-risk-members-dialog.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<bit-dialog> | ||
<ng-container bitDialogTitle> | ||
<span bitDialogTitle>{{ "atRiskMembersWithCount" | i18n: atRiskMembers.length }} </span> | ||
</ng-container> | ||
<ng-container bitDialogContent> | ||
<div class="tw-flex tw-flex-col tw-gap-2"> | ||
<span bitTypography="body2" class="tw-text-muted">{{ | ||
"atRiskMembersDescription" | i18n | ||
}}</span> | ||
<div class="tw-flex tw-justify-between tw-mt-2 tw-text-muted"> | ||
<div bitTypography="body2" class="tw-font-bold">{{ "email" | i18n }}</div> | ||
<div bitTypography="body2" class="tw-font-bold">{{ "atRiskPasswords" | i18n }}</div> | ||
</div> | ||
<ng-container *ngFor="let member of atRiskMembers"> | ||
<div class="tw-flex tw-justify-between tw-mt-2"> | ||
<div>{{ member.email }}</div> | ||
<div>{{ member.atRiskPasswordCount }}</div> | ||
</div> | ||
</ng-container> | ||
</div> | ||
</ng-container> | ||
<ng-container bitDialogFooter> | ||
<button bitButton bitDialogClose buttonType="secondary" type="button"> | ||
{{ "close" | i18n }} | ||
</button> | ||
</ng-container> | ||
</bit-dialog> |
24 changes: 24 additions & 0 deletions
24
...license/bit-web/src/app/tools/access-intelligence/org-at-risk-members-dialog.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { DIALOG_DATA } from "@angular/cdk/dialog"; | ||
import { CommonModule } from "@angular/common"; | ||
import { Component, Inject } from "@angular/core"; | ||
|
||
import { JslibModule } from "@bitwarden/angular/jslib.module"; | ||
import { AtRiskMemberDetail } from "@bitwarden/bit-common/tools/reports/risk-insights/models/password-health"; | ||
import { ButtonModule, DialogModule, DialogService, TypographyModule } from "@bitwarden/components"; | ||
|
||
export const openOrgAtRiskMembersDialog = ( | ||
dialogService: DialogService, | ||
dialogConfig: AtRiskMemberDetail[], | ||
) => | ||
dialogService.open<boolean, AtRiskMemberDetail[]>(OrgAtRiskMembersDialogComponent, { | ||
data: dialogConfig, | ||
}); | ||
|
||
@Component({ | ||
standalone: true, | ||
templateUrl: "./org-at-risk-members-dialog.component.html", | ||
imports: [ButtonModule, CommonModule, DialogModule, JslibModule, TypographyModule], | ||
}) | ||
export class OrgAtRiskMembersDialogComponent { | ||
constructor(@Inject(DIALOG_DATA) protected atRiskMembers: AtRiskMemberDetail[]) {} | ||
} |