mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
sqlAssessment sync display fix (#14574)
* sqlAssessment sync display fix * making append data Thenable<void>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"name": "sql-assessment",
|
||||
"displayName": "%displayName%",
|
||||
"description": "%description%",
|
||||
"version": "0.6.0",
|
||||
"version": "0.6.1",
|
||||
"publisher": "Microsoft",
|
||||
"preview": true,
|
||||
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt",
|
||||
|
||||
@@ -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;
|
||||
|
||||
2
src/sql/azdata.proposed.d.ts
vendored
2
src/sql/azdata.proposed.d.ts
vendored
@@ -970,7 +970,7 @@ declare module 'azdata' {
|
||||
/**
|
||||
* Append data to an existing table data.
|
||||
*/
|
||||
appendData(data: any[][]): void;
|
||||
appendData(data: any[][]): Thenable<void>;
|
||||
}
|
||||
|
||||
export interface IconColumnCellValue {
|
||||
|
||||
@@ -1440,8 +1440,8 @@ class TableComponentWrapper extends ComponentWrapper implements azdata.TableComp
|
||||
return emitter && emitter.event;
|
||||
}
|
||||
|
||||
public appendData(v: any[][]): void {
|
||||
this.doAction(ModelViewAction.AppendData, v);
|
||||
public appendData(v: any[][]): Thenable<void> {
|
||||
return this.doAction(ModelViewAction.AppendData, v);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user