mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
only show confirmation message for apply all changes, not for view changes in schema compare (#18520)
This commit is contained in:
@@ -1382,6 +1382,8 @@ export class ProjectsController {
|
|||||||
if (model.action === UpdateProjectAction.Compare) {
|
if (model.action === UpdateProjectAction.Compare) {
|
||||||
await vscode.commands.executeCommand(constants.schemaCompareRunComparisonCommand, model.sourceEndpointInfo, model.targetEndpointInfo, true, undefined);
|
await vscode.commands.executeCommand(constants.schemaCompareRunComparisonCommand, model.sourceEndpointInfo, model.targetEndpointInfo, true, undefined);
|
||||||
} else if (model.action === UpdateProjectAction.Update) {
|
} else if (model.action === UpdateProjectAction.Update) {
|
||||||
|
await vscode.window.showWarningMessage(constants.applyConfirmation, { modal: true }, constants.yesString).then(async (result) => {
|
||||||
|
if (result === constants.yesString) {
|
||||||
await vscode.window.withProgress(
|
await vscode.window.withProgress(
|
||||||
{
|
{
|
||||||
location: vscode.ProgressLocation.Notification,
|
location: vscode.ProgressLocation.Notification,
|
||||||
@@ -1393,6 +1395,8 @@ export class ProjectsController {
|
|||||||
|
|
||||||
void vscode.commands.executeCommand(constants.refreshDataWorkspaceCommand);
|
void vscode.commands.executeCommand(constants.refreshDataWorkspaceCommand);
|
||||||
utils.getDataWorkspaceExtensionApi().showProjectsView();
|
utils.getDataWorkspaceExtensionApi().showProjectsView();
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`Unknown UpdateProjectAction: ${model.action}`);
|
throw new Error(`Unknown UpdateProjectAction: ${model.action}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -497,8 +497,6 @@ export class UpdateProjectFromDatabaseDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async handleUpdateButtonClick(): Promise<void> {
|
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 serverDropdownValue = this.serverDropdown!.value! as azdata.CategoryValue as ConnectionDropdownValue;
|
||||||
const ownerUri = await getAzdataApi()!.connection.getUriForConnection(serverDropdownValue.connection.connectionId);
|
const ownerUri = await getAzdataApi()!.connection.getUriForConnection(serverDropdownValue.connection.connectionId);
|
||||||
|
|
||||||
@@ -560,11 +558,9 @@ export class UpdateProjectFromDatabaseDialog {
|
|||||||
targetEndpointInfo: targetEndpointInfo,
|
targetEndpointInfo: targetEndpointInfo,
|
||||||
action: this.action!
|
action: this.action!
|
||||||
};
|
};
|
||||||
void this.updateProjectFromDatabaseCallback!(model);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
void this.updateProjectFromDatabaseCallback!(model);
|
||||||
this.dispose();
|
this.dispose();
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async validate(): Promise<boolean> {
|
async validate(): Promise<boolean> {
|
||||||
|
|||||||
Reference in New Issue
Block a user