mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-20 17:22:51 -05:00
add error banner for failed migration cutover and cancel migration (#17106)
This commit is contained in:
@@ -158,8 +158,8 @@ export class CreateSqlMigrationServiceDialog {
|
||||
d => { try { d.dispose(); } catch { } });
|
||||
}));
|
||||
|
||||
return view.initializeModel(form).then(() => {
|
||||
this.populateSubscriptions();
|
||||
return view.initializeModel(form).then(async () => {
|
||||
await this.populateSubscriptions();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -167,15 +167,15 @@ export class CreateSqlMigrationServiceDialog {
|
||||
this._testConnectionButton.hidden = true;
|
||||
this._disposables.push(this._testConnectionButton.onClick(async (e) => {
|
||||
this._refreshLoadingComponent.loading = true;
|
||||
this._connectionStatus.updateCssStyles({
|
||||
await this._connectionStatus.updateCssStyles({
|
||||
'display': 'none'
|
||||
});
|
||||
try {
|
||||
await this.refreshStatus();
|
||||
} catch (e) {
|
||||
vscode.window.showErrorMessage(e);
|
||||
void vscode.window.showErrorMessage(e);
|
||||
}
|
||||
this._connectionStatus.updateCssStyles({
|
||||
await this._connectionStatus.updateCssStyles({
|
||||
'display': 'inline'
|
||||
});
|
||||
this._refreshLoadingComponent.loading = false;
|
||||
@@ -275,7 +275,7 @@ export class CreateSqlMigrationServiceDialog {
|
||||
name: createdResourceGroup.name
|
||||
};
|
||||
this.migrationServiceResourceGroupDropdown.loading = false;
|
||||
this.migrationServiceResourceGroupDropdown.focus();
|
||||
await this.migrationServiceResourceGroupDropdown.focus();
|
||||
}
|
||||
}));
|
||||
|
||||
@@ -547,7 +547,7 @@ export class CreateSqlMigrationServiceDialog {
|
||||
const state = migrationServiceStatus.properties.integrationRuntimeState;
|
||||
|
||||
if (state === 'Online') {
|
||||
this._connectionStatus.updateProperties(<azdata.InfoBoxComponentProperties>{
|
||||
await this._connectionStatus.updateProperties(<azdata.InfoBoxComponentProperties>{
|
||||
text: constants.SERVICE_READY(this._createdMigrationService!.name, this.irNodes.join(', ')),
|
||||
style: 'success',
|
||||
CSSStyles: {
|
||||
@@ -557,7 +557,7 @@ export class CreateSqlMigrationServiceDialog {
|
||||
this._dialogObject.okButton.enabled = true;
|
||||
} else {
|
||||
this._connectionStatus.text = constants.SERVICE_NOT_READY(this._createdMigrationService!.name);
|
||||
this._connectionStatus.updateProperties(<azdata.InfoBoxComponentProperties>{
|
||||
await this._connectionStatus.updateProperties(<azdata.InfoBoxComponentProperties>{
|
||||
text: constants.SERVICE_NOT_READY(this._createdMigrationService!.name),
|
||||
style: 'warning',
|
||||
CSSStyles: {
|
||||
@@ -581,9 +581,9 @@ export class CreateSqlMigrationServiceDialog {
|
||||
ariaLabel: constants.COPY_KEY1,
|
||||
}).component();
|
||||
|
||||
this._disposables.push(this._copyKey1Button.onDidClick((e) => {
|
||||
vscode.env.clipboard.writeText(<string>this.migrationServiceAuthKeyTable.dataValues![0][1].value);
|
||||
vscode.window.showInformationMessage(constants.SERVICE_KEY1_COPIED_HELP);
|
||||
this._disposables.push(this._copyKey1Button.onDidClick(async (e) => {
|
||||
await vscode.env.clipboard.writeText(<string>this.migrationServiceAuthKeyTable.dataValues![0][1].value);
|
||||
void vscode.window.showInformationMessage(constants.SERVICE_KEY1_COPIED_HELP);
|
||||
}));
|
||||
|
||||
this._copyKey2Button = this._view.modelBuilder.button().withProps({
|
||||
@@ -592,9 +592,9 @@ export class CreateSqlMigrationServiceDialog {
|
||||
ariaLabel: constants.COPY_KEY2,
|
||||
}).component();
|
||||
|
||||
this._disposables.push(this._copyKey2Button.onDidClick((e) => {
|
||||
vscode.env.clipboard.writeText(<string>this.migrationServiceAuthKeyTable.dataValues![1][1].value);
|
||||
vscode.window.showInformationMessage(constants.SERVICE_KEY2_COPIED_HELP);
|
||||
this._disposables.push(this._copyKey2Button.onDidClick(async (e) => {
|
||||
await vscode.env.clipboard.writeText(<string>this.migrationServiceAuthKeyTable.dataValues![1][1].value);
|
||||
void vscode.window.showInformationMessage(constants.SERVICE_KEY2_COPIED_HELP);
|
||||
}));
|
||||
|
||||
this._refreshKey1Button = this._view.modelBuilder.button().withProps({
|
||||
@@ -617,7 +617,7 @@ export class CreateSqlMigrationServiceDialog {
|
||||
//TODO: add refresh logic
|
||||
}));
|
||||
|
||||
this.migrationServiceAuthKeyTable.updateProperties({
|
||||
await this.migrationServiceAuthKeyTable.updateProperties({
|
||||
dataValues: [
|
||||
[
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user