mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-27 17:23:21 -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 _logins: Map<string, Login>;
|
||||
private _loginMigrationSteps: LoginMigrationStep[] = [];
|
||||
public errorCountList: string[] = [];
|
||||
|
||||
constructor() {
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user