mirror of
https://github.com/bitwarden/browser
synced 2026-02-11 22:13:32 +00:00
Adding the debug tabs to work off of a dev flag
This commit is contained in:
@@ -20,5 +20,7 @@
|
||||
}
|
||||
],
|
||||
"flags": {},
|
||||
"devFlags": {}
|
||||
"devFlags": {
|
||||
"showRiskInsightsDebug": false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ export class AllApplicationsComponent implements OnInit, OnDestroy {
|
||||
destroyRef = inject(DestroyRef);
|
||||
isLoading$: Observable<boolean> = of(false);
|
||||
isCriticalAppsFeatureEnabled = false;
|
||||
showDebugTabs = false;
|
||||
|
||||
async ngOnInit() {
|
||||
this.isCriticalAppsFeatureEnabled = await this.configService.getFeatureFlag(
|
||||
|
||||
@@ -44,5 +44,14 @@
|
||||
</ng-template>
|
||||
<tools-critical-applications></tools-critical-applications>
|
||||
</bit-tab>
|
||||
<bit-tab *ngIf="showDebugTabs" label="Raw Data">
|
||||
<tools-password-health></tools-password-health>
|
||||
</bit-tab>
|
||||
<bit-tab *ngIf="showDebugTabs" label="Raw Data + members">
|
||||
<tools-password-health-members></tools-password-health-members>
|
||||
</bit-tab>
|
||||
<bit-tab *ngIf="showDebugTabs" label="Raw Data + uri">
|
||||
<tools-password-health-members-uri></tools-password-health-members-uri>
|
||||
</bit-tab>
|
||||
</bit-tab-group>
|
||||
</ng-container>
|
||||
|
||||
@@ -10,12 +10,16 @@ import { RiskInsightsDataService } from "@bitwarden/bit-common/tools/reports/ris
|
||||
import { ApplicationHealthReportDetail } from "@bitwarden/bit-common/tools/reports/risk-insights/models/password-health";
|
||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
||||
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
||||
import { devFlagEnabled } from "@bitwarden/common/platform/misc/flags";
|
||||
import { AsyncActionsModule, ButtonModule, TabsModule } from "@bitwarden/components";
|
||||
import { HeaderModule } from "@bitwarden/web-vault/app/layouts/header/header.module";
|
||||
|
||||
import { AllApplicationsComponent } from "./all-applications.component";
|
||||
import { CriticalApplicationsComponent } from "./critical-applications.component";
|
||||
import { NotifiedMembersTableComponent } from "./notified-members-table.component";
|
||||
import { PasswordHealthMembersURIComponent } from "./password-health-members-uri.component";
|
||||
import { PasswordHealthMembersComponent } from "./password-health-members.component";
|
||||
import { PasswordHealthComponent } from "./password-health.component";
|
||||
|
||||
export enum RiskInsightsTabType {
|
||||
AllApps = 0,
|
||||
@@ -34,6 +38,9 @@ export enum RiskInsightsTabType {
|
||||
CriticalApplicationsComponent,
|
||||
JslibModule,
|
||||
HeaderModule,
|
||||
PasswordHealthComponent,
|
||||
PasswordHealthMembersComponent,
|
||||
PasswordHealthMembersURIComponent,
|
||||
NotifiedMembersTableComponent,
|
||||
TabsModule,
|
||||
],
|
||||
@@ -44,6 +51,7 @@ export class RiskInsightsComponent implements OnInit {
|
||||
dataLastUpdated: Date = new Date();
|
||||
|
||||
isCriticalAppsFeatureEnabled: boolean = false;
|
||||
showDebugTabs: boolean = false;
|
||||
|
||||
appsCount: number = 0;
|
||||
criticalAppsCount: number = 0;
|
||||
@@ -72,6 +80,8 @@ export class RiskInsightsComponent implements OnInit {
|
||||
FeatureFlag.CriticalApps,
|
||||
);
|
||||
|
||||
this.showDebugTabs = devFlagEnabled("showRiskInsightsDebug");
|
||||
|
||||
this.route.paramMap
|
||||
.pipe(
|
||||
takeUntilDestroyed(this.destroyRef),
|
||||
|
||||
@@ -13,6 +13,7 @@ export type SharedDevFlags = {
|
||||
noopNotifications: boolean;
|
||||
skipWelcomeOnInstall: boolean;
|
||||
configRetrievalIntervalMs: number;
|
||||
showRiskInsightsDebug: boolean;
|
||||
};
|
||||
|
||||
function getFlags<T>(envFlags: string | T): T {
|
||||
|
||||
Reference in New Issue
Block a user