mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Removing stringify and replacing with constructed string. (#23403)
* Removing stringify and replacing with constructed string. * Addressing PR comments.
This commit is contained in:
@@ -76,6 +76,7 @@ export class LoginMigrationModel {
|
|||||||
private _currentStepIdx: number = 0;
|
private _currentStepIdx: number = 0;
|
||||||
private _logins: Map<string, Login>;
|
private _logins: Map<string, Login>;
|
||||||
private _loginMigrationSteps: LoginMigrationStep[] = [];
|
private _loginMigrationSteps: LoginMigrationStep[] = [];
|
||||||
|
public errorCountList: string[] = [];
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.resultsPerStep = new Map<contracts.LoginMigrationStep, contracts.StartLoginMigrationResult>();
|
this.resultsPerStep = new Map<contracts.LoginMigrationStep, contracts.StartLoginMigrationResult>();
|
||||||
@@ -179,7 +180,19 @@ export class LoginMigrationModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.errorCountMap.set(LoginMigrationStep[step], errorBuckets);
|
// Making a string of the map elements of errorBuckets
|
||||||
|
const errorBucketsString = JSON.stringify(
|
||||||
|
Array.from(errorBuckets.entries()).reduce((o: any, [key, value]) => {
|
||||||
|
o[key] = value;
|
||||||
|
return o;
|
||||||
|
}, {})
|
||||||
|
);
|
||||||
|
|
||||||
|
// Retaining this step in case a revert is needed, but we will be using errorCountList for telemetry
|
||||||
|
this.errorCountMap.set(LoginMigrationStep[step], errorBucketsString);
|
||||||
|
|
||||||
|
// Creating an array of the error codes and its counts for each step
|
||||||
|
this.errorCountList.push(`[${LoginMigrationStep[step]}: ${errorBucketsString}]`);
|
||||||
}
|
}
|
||||||
|
|
||||||
private setDurationPerStep(step: LoginMigrationStep, result: contracts.StartLoginMigrationResult) {
|
private setDurationPerStep(step: LoginMigrationStep, result: contracts.StartLoginMigrationResult) {
|
||||||
|
|||||||
@@ -458,7 +458,7 @@ export class LoginMigrationStatusPage extends MigrationWizardPage {
|
|||||||
{
|
{
|
||||||
...getTelemetryProps(this.migrationStateModel),
|
...getTelemetryProps(this.migrationStateModel),
|
||||||
'loginsAuthType': this.migrationStateModel._loginMigrationModel.loginsAuthType,
|
'loginsAuthType': this.migrationStateModel._loginMigrationModel.loginsAuthType,
|
||||||
'numberLoginsFailingPerStep': JSON.stringify(Array.from(this.migrationStateModel._loginMigrationModel.errorCountMap)),
|
'numberLoginsFailingPerStep': this.migrationStateModel._loginMigrationModel.errorCountList.toString(),
|
||||||
'durationPerStepTimestamp': JSON.stringify(Array.from(this.migrationStateModel._loginMigrationModel.durationPerStep)),
|
'durationPerStepTimestamp': JSON.stringify(Array.from(this.migrationStateModel._loginMigrationModel.durationPerStep)),
|
||||||
'hasSystemError': JSON.stringify(this.migrationStateModel._loginMigrationModel.hasSystemError),
|
'hasSystemError': JSON.stringify(this.migrationStateModel._loginMigrationModel.hasSystemError),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user