mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-30 17:23:29 -05:00
sqlAssessment sync display fix (#14574)
* sqlAssessment sync display fix * making append data Thenable<void>
This commit is contained in:
@@ -159,8 +159,9 @@ export class AssessmentResultGrid implements vscode.Disposable {
|
||||
let filteredValues = this.filterOutNotSupportedKind(asmtResult.items);
|
||||
if (this.dataItems) {
|
||||
this.dataItems.push(...filteredValues);
|
||||
|
||||
}
|
||||
this.table.appendData(filteredValues.map(item => this.convertToDataView(item)));
|
||||
await this.table.appendData(filteredValues.map(item => this.convertToDataView(item)));
|
||||
}
|
||||
|
||||
private async showDetails(rowNumber: number) {
|
||||
|
||||
@@ -135,7 +135,7 @@ export class SqlAssessmentMainTab extends SqlAssessmentTab {
|
||||
if (append) {
|
||||
await this.resultGrid.appendResult(result);
|
||||
} else {
|
||||
this.displayResults(result, assessmentType);
|
||||
await this.displayResults(result, assessmentType);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -168,7 +168,7 @@ export class SqlAssessmentMainTab extends SqlAssessmentTab {
|
||||
if (append) {
|
||||
await this.resultGrid.appendResult(result);
|
||||
} else {
|
||||
this.displayResults(result, assessmentType);
|
||||
await this.displayResults(result, assessmentType);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -299,11 +299,11 @@ export class SqlAssessmentMainTab extends SqlAssessmentTab {
|
||||
).component();
|
||||
}
|
||||
|
||||
private displayResults(result: azdata.SqlAssessmentResult, assessmentType: AssessmentType): void {
|
||||
private async displayResults(result: azdata.SqlAssessmentResult, assessmentType: AssessmentType): Promise<void> {
|
||||
this.apiVersionPropItem.value = result.apiVersion;
|
||||
this.defaultRulesetPropItem.value = result.items?.length > 0 ? result.items[0].rulesetVersion : '';
|
||||
|
||||
this.resultGrid.displayResult(result, assessmentType);
|
||||
await this.resultGrid.displayResult(result, assessmentType);
|
||||
this.btnExportAsScript.enabled = this.btnHTMLExport.enabled = assessmentType === AssessmentType.InvokeAssessment;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ export async function readHistoryFileNames(targetName: string): Promise<TargetWi
|
||||
};
|
||||
|
||||
const datePart = `_${targetFile.split('_')[1]}`;
|
||||
result.children.push(...files.filter(f => f.endsWith(datePart)));
|
||||
result.children.push(...files.filter(f => f.endsWith(datePart) && f !== targetFile));
|
||||
result.children = result.children.map(c => path.join(dirPath, c));
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user