add ability for md + text reports (#18667)

* add ability for md + text reports

* change report type

* re add types for ads

* match fields and add enum for mimetype

* rename preview report

* update type

* rename generate report type

* fix comment
This commit is contained in:
Aditya Bist
2022-03-09 15:48:21 -08:00
committed by GitHub
parent e50bded5d1
commit 822199c9be
8 changed files with 31 additions and 12 deletions

View File

@@ -178,10 +178,10 @@ export class TableDesignerComponentInput implements DesignerComponentInput {
sticky: true
});
let report;
let previewReportResult: azdata.designers.GeneratePreviewReportResult;
try {
this.updateState(this.valid, this.dirty, 'generateReport');
report = await this._provider.generatePreviewReport(this.tableInfo);
previewReportResult = await this._provider.generatePreviewReport(this.tableInfo);
reportNotificationHandle.close();
this.updateState(this.valid, this.dirty);
} catch (error) {
@@ -190,7 +190,7 @@ export class TableDesignerComponentInput implements DesignerComponentInput {
return;
}
const dialog = this._instantiationService.createInstance(TableDesignerPublishDialog);
const result = await dialog.open(<any>report.report);
const result = await dialog.open(previewReportResult.report, previewReportResult.mimeType);
if (result === TableDesignerPublishDialogResult.GenerateScript) {
await this.generateScript();
} else if (result === TableDesignerPublishDialogResult.UpdateDatabase) {