add remaining components to access intelligence page

This commit is contained in:
jaasen-livefront 2024-10-22 17:02:25 -07:00
parent 9b474264e6
commit cb8e826656
No known key found for this signature in database
3 changed files with 46 additions and 2 deletions

View File

@ -1,4 +1,20 @@
<app-header></app-header> <div class="tw-mb-1 text-primary" bitTypography="body1">{{ "accessIntelligence" | i18n }}</div>
<h1 bitTypography="h1">{{ "passwordRisk" | i18n }}</h1>
<div class="tw-text-muted">{{ "discoverAtRiskPasswords" | i18n }}</div>
<div class="tw-bg-background-alt tw-rounded tw-w-full tw-p-4 tw-my-4">
<i class="bwi bwi-exclamation-triangle text-muted" aria-hidden="true"></i>
<span class="tw-mx-4">{{
"dataLastUpdated" | i18n: (dataLastUpdated | date: "MMMM d, y 'at' h:mm a")
}}</span>
<a
bitButton
buttonType="unstyled"
class="tw-border-none tw-"
[bitAction]="refreshData.bind(this)"
>
{{ "refresh" | i18n }}
</a>
</div>
<bit-tab-group [(selectedIndex)]="tabIndex"> <bit-tab-group [(selectedIndex)]="tabIndex">
<bit-tab label="Raw Data"> <bit-tab label="Raw Data">
<tools-password-health></tools-password-health> <tools-password-health></tools-password-health>

View File

@ -5,7 +5,7 @@ import { ActivatedRoute } from "@angular/router";
import { first } from "rxjs"; import { first } from "rxjs";
import { JslibModule } from "@bitwarden/angular/jslib.module"; import { JslibModule } from "@bitwarden/angular/jslib.module";
import { TabsModule } from "@bitwarden/components"; import { AsyncActionsModule, ButtonModule, TabsModule } from "@bitwarden/components";
import { HeaderModule } from "../../layouts/header/header.module"; import { HeaderModule } from "../../layouts/header/header.module";
@ -25,6 +25,8 @@ export enum AccessIntelligenceTabType {
templateUrl: "./access-intelligence.component.html", templateUrl: "./access-intelligence.component.html",
imports: [ imports: [
ApplicationTableComponent, ApplicationTableComponent,
AsyncActionsModule,
ButtonModule,
CommonModule, CommonModule,
JslibModule, JslibModule,
HeaderModule, HeaderModule,
@ -36,11 +38,22 @@ export enum AccessIntelligenceTabType {
}) })
export class AccessIntelligenceComponent { export class AccessIntelligenceComponent {
tabIndex: AccessIntelligenceTabType; tabIndex: AccessIntelligenceTabType;
dataLastUpdated = new Date();
apps: any[] = []; apps: any[] = [];
priorityApps: any[] = []; priorityApps: any[] = [];
notifiedMembers: any[] = []; notifiedMembers: any[] = [];
async refreshData() {
// TODO: Implement
return new Promise((resolve) =>
setTimeout(() => {
this.dataLastUpdated = new Date();
resolve(true);
}, 1000),
);
}
constructor(route: ActivatedRoute) { constructor(route: ActivatedRoute) {
route.queryParams.pipe(takeUntilDestroyed(), first()).subscribe(({ tabIndex }) => { route.queryParams.pipe(takeUntilDestroyed(), first()).subscribe(({ tabIndex }) => {
this.tabIndex = !isNaN(tabIndex) ? tabIndex : AccessIntelligenceTabType.AllApps; this.tabIndex = !isNaN(tabIndex) ? tabIndex : AccessIntelligenceTabType.AllApps;

View File

@ -8,6 +8,21 @@
"accessIntelligence": { "accessIntelligence": {
"message": "Access Intelligence" "message": "Access Intelligence"
}, },
"passwordRisk": {
"message": "Password Risk"
},
"discoverAtRiskPasswords": {
"message": "Discover at-risk passwords and notify users to change those passwords."
},
"dataLastUpdated": {
"message": "Data last updated: $DATE$",
"placeholders": {
"date": {
"content": "$1",
"example": "2021-01-01"
}
}
},
"notifiedMembers": { "notifiedMembers": {
"message": "Notified members" "message": "Notified members"
}, },