mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-30 17:23:29 -05:00
SQL-Migration: improve SQL DB table selection ux to include missing tables (#22659)
* add missing target tables ux * fix number formatting
This commit is contained in:
@@ -897,14 +897,16 @@ export class DatabaseBackupPage extends MigrationWizardPage {
|
||||
this._sqlSourceUsernameInput.value = username;
|
||||
this._sqlSourcePassword.value = (await getSourceConnectionCredentials()).password;
|
||||
|
||||
this._windowsUserAccountText.value =
|
||||
this.migrationStateModel._databaseBackup.networkShares[0]?.windowsUser
|
||||
?? this.migrationStateModel.savedInfo?.networkShares[0]?.windowsUser
|
||||
?? '';
|
||||
this._passwordText.value =
|
||||
this.migrationStateModel._databaseBackup.networkShares[0]?.password
|
||||
?? this.migrationStateModel.savedInfo?.networkShares[0]?.password
|
||||
?? '';
|
||||
const networkShares = this.migrationStateModel._databaseBackup?.networkShares?.length > 0
|
||||
? this.migrationStateModel._databaseBackup?.networkShares
|
||||
: this.migrationStateModel.savedInfo?.networkShares ?? [];
|
||||
|
||||
const networkShare = networkShares?.length > 0
|
||||
? networkShares[0]
|
||||
: undefined;
|
||||
|
||||
this._windowsUserAccountText.value = networkShare?.windowsUser ?? '';
|
||||
this._passwordText.value = networkShare?.password ?? '';
|
||||
|
||||
this._networkShareTargetDatabaseNames = [];
|
||||
this._networkShareLocations = [];
|
||||
@@ -1379,13 +1381,15 @@ export class DatabaseBackupPage extends MigrationWizardPage {
|
||||
break;
|
||||
case NetworkContainerType.NETWORK_SHARE:
|
||||
// All network share migrations use the same storage account
|
||||
const storageAccount = this.migrationStateModel._databaseBackup.networkShares[0]?.storageAccount;
|
||||
const storageKey = (await getStorageAccountAccessKeys(
|
||||
this.migrationStateModel._azureAccount,
|
||||
this.migrationStateModel._databaseBackup.subscription,
|
||||
storageAccount)).keyName1;
|
||||
for (let i = 0; i < this.migrationStateModel._databaseBackup.networkShares.length; i++) {
|
||||
this.migrationStateModel._databaseBackup.networkShares[i].storageKey = storageKey;
|
||||
if (this.migrationStateModel._databaseBackup.networkShares?.length > 0) {
|
||||
const storageAccount = this.migrationStateModel._databaseBackup.networkShares[0]?.storageAccount;
|
||||
const storageKey = (await getStorageAccountAccessKeys(
|
||||
this.migrationStateModel._azureAccount,
|
||||
this.migrationStateModel._databaseBackup.subscription,
|
||||
storageAccount)).keyName1;
|
||||
for (let i = 0; i < this.migrationStateModel._databaseBackup.networkShares.length; i++) {
|
||||
this.migrationStateModel._databaseBackup.networkShares[i].storageKey = storageKey;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import { MigrationWizardPage } from '../models/migrationWizardPage';
|
||||
import { MigrationMode, MigrationStateModel, NetworkContainerType, StateChangeEvent } from '../models/stateMachine';
|
||||
import { MigrationMode, MigrationStateModel, NetworkContainerType, NetworkShare, StateChangeEvent } from '../models/stateMachine';
|
||||
import * as constants from '../constants/strings';
|
||||
import { createHeadingTextComponent, createInformationRow, createLabelTextComponent } from './wizardController';
|
||||
import { getResourceGroupFromId } from '../api/azure';
|
||||
@@ -185,7 +185,10 @@ export class SummaryPage extends MigrationWizardPage {
|
||||
.withLayout({ flexFlow: 'column' })
|
||||
.component();
|
||||
|
||||
const networkShare = this.migrationStateModel._databaseBackup.networkShares[0];
|
||||
const networkShare = this.migrationStateModel._databaseBackup.networkShares?.length > 0
|
||||
? this.migrationStateModel._databaseBackup.networkShares[0]
|
||||
: <NetworkShare>{};
|
||||
|
||||
switch (this.migrationStateModel._databaseBackup.networkContainerType) {
|
||||
case NetworkContainerType.NETWORK_SHARE:
|
||||
flexContainer.addItems([
|
||||
|
||||
Reference in New Issue
Block a user