Add progress indicator for arc instance deletion (#12510)

This commit is contained in:
Charles Gagnon
2020-09-19 12:48:03 -07:00
committed by GitHub
parent 2feaca5537
commit ca4663001b
3 changed files with 21 additions and 2 deletions

View File

@@ -199,7 +199,16 @@ export class MiaaDashboardOverviewPage extends DashboardPage {
deleteButton.enabled = false;
try {
if (await promptForInstanceDeletion(this._miaaModel.info.name)) {
await this._azdataApi.azdata.arc.sql.mi.delete(this._miaaModel.info.name);
await vscode.window.withProgress(
{
location: vscode.ProgressLocation.Notification,
title: loc.deletingInstance(this._miaaModel.info.name),
cancellable: false
},
(_progress, _token) => {
return this._azdataApi.azdata.arc.sql.mi.delete(this._miaaModel.info.name);
}
);
await this._controllerModel.refreshTreeNode();
vscode.window.showInformationMessage(loc.instanceDeleted(this._miaaModel.info.name));
}

View File

@@ -182,7 +182,16 @@ export class PostgresOverviewPage extends DashboardPage {
deleteButton.enabled = false;
try {
if (await promptForInstanceDeletion(this._postgresModel.info.name)) {
await this._azdataApi.azdata.arc.postgres.server.delete(this._postgresModel.info.name);
await vscode.window.withProgress(
{
location: vscode.ProgressLocation.Notification,
title: loc.deletingInstance(this._postgresModel.info.name),
cancellable: false
},
(_progress, _token) => {
return this._azdataApi.azdata.arc.postgres.server.delete(this._postgresModel.info.name);
}
);
await this._controllerModel.refreshTreeNode();
vscode.window.showInformationMessage(loc.instanceDeleted(this._postgresModel.info.name));
}