mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
add confirmation message to update project from db dialog (#18199)
This commit is contained in:
@@ -270,6 +270,7 @@ export const updateAction = localize('updateAction', "Update action");
|
||||
export const compareActionRadioButtonLabel = localize('compareActionRadiButtonLabel', "View changes in Schema Compare");
|
||||
export const updateActionRadioButtonLabel = localize('updateActionRadiButtonLabel', "Apply all changes");
|
||||
export const actionLabel = localize('actionLabel', "Action");
|
||||
export const applyConfirmation: string = localize('applyConfirmation', "Are you sure you want to update the target project?");
|
||||
|
||||
// Update project from database
|
||||
|
||||
|
||||
@@ -497,6 +497,8 @@ export class UpdateProjectFromDatabaseDialog {
|
||||
}
|
||||
|
||||
public async handleUpdateButtonClick(): Promise<void> {
|
||||
await vscode.window.showWarningMessage(constants.applyConfirmation, { modal: true }, constants.yesString).then(async (result) => {
|
||||
if (result === constants.yesString) {
|
||||
const serverDropdownValue = this.serverDropdown!.value! as azdata.CategoryValue as ConnectionDropdownValue;
|
||||
const ownerUri = await getAzdataApi()!.connection.getUriForConnection(serverDropdownValue.connection.connectionId);
|
||||
|
||||
@@ -558,11 +560,11 @@ export class UpdateProjectFromDatabaseDialog {
|
||||
targetEndpointInfo: targetEndpointInfo,
|
||||
action: this.action!
|
||||
};
|
||||
|
||||
getAzdataApi()!.window.closeDialog(this.dialog);
|
||||
await this.updateProjectFromDatabaseCallback!(model);
|
||||
void this.updateProjectFromDatabaseCallback!(model);
|
||||
}
|
||||
|
||||
this.dispose();
|
||||
});
|
||||
}
|
||||
|
||||
async validate(): Promise<boolean> {
|
||||
|
||||
Reference in New Issue
Block a user