mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 09:35:37 -05:00
Fixing bugs for migration extension private preview 1. (#14872)
* Fixing Database backup page target layout * Filtering out Azure sql db issues from assessment results Correcting the database count for issued databases in sku rec page. * Adding copy migration details button to migration status * Adding start migration button to toolbar * Fixing a syntax error in package.json * Adding rg and location to target selection page Filtering storage account by target location. * Fixing dashboard title to azure sql migration * Not making assessment targets selected by default. * Adding tooltip for database and instance table items. * Fixing duplicate task widget * Some fixes mentioned in the PR Localizing button text renaming a var changing null to undefined. * Adding enum for Migration target types * Fixing a critical multi db migration bug because of unhandled race condition * Adding Azure location api to azure core * Adding source database info in status
This commit is contained in:
@@ -332,12 +332,32 @@ export class DatabaseBackupPage extends MigrationWizardPage {
|
||||
this.migrationStateModel._databaseBackup.storageAccount = this.migrationStateModel.getStorageAccount(value.index);
|
||||
}
|
||||
});
|
||||
|
||||
const networkLocationInputBoxLabel = this._view.modelBuilder.text().withProps({
|
||||
value: constants.DATABASE_BACKUP_NETWORK_SHARE_LOCATION_LABEL,
|
||||
requiredIndicator: true
|
||||
}).component();
|
||||
const networkLocationInputBox = this._view.modelBuilder.inputBox().withProps({
|
||||
placeHolder: '\\\\Servername.domainname.com\\Backupfolder',
|
||||
required: true,
|
||||
validationErrorMessage: constants.INVALID_NETWORK_SHARE_LOCATION
|
||||
}).withValidation((component) => {
|
||||
if (this.migrationStateModel._databaseBackup.networkContainerType === NetworkContainerType.NETWORK_SHARE) {
|
||||
if (component.value) {
|
||||
if (!/(?<=\\\\)[^\\]*/.test(component.value)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}).component();
|
||||
networkLocationInputBox.onTextChanged((value) => {
|
||||
this.validateFields();
|
||||
this.migrationStateModel._databaseBackup.networkShareLocation = value;
|
||||
});
|
||||
|
||||
const networkShareDatabaseConfigHeader = view.modelBuilder.text().withProps({
|
||||
value: constants.ENTER_NETWORK_SHARE_INFORMATION
|
||||
}).component();
|
||||
|
||||
this._networkShareDatabaseConfigContainer = view.modelBuilder.flexContainer().withLayout({
|
||||
flexFlow: 'column'
|
||||
}).component();
|
||||
@@ -347,14 +367,16 @@ export class DatabaseBackupPage extends MigrationWizardPage {
|
||||
[
|
||||
azureAccountHelpText,
|
||||
networkShareHelpText,
|
||||
subscriptionLabel,
|
||||
this._networkShareContainerSubscriptionDropdown,
|
||||
storageAccountLabel,
|
||||
this._networkShareContainerStorageAccountDropdown,
|
||||
networkLocationInputBoxLabel,
|
||||
networkLocationInputBox,
|
||||
windowsUserAccountLabel,
|
||||
this._windowsUserAccountText,
|
||||
passwordLabel,
|
||||
this._passwordText,
|
||||
subscriptionLabel,
|
||||
this._networkShareContainerSubscriptionDropdown,
|
||||
storageAccountLabel,
|
||||
this._networkShareContainerStorageAccountDropdown,
|
||||
networkShareDatabaseConfigHeader,
|
||||
this._networkShareDatabaseConfigContainer
|
||||
]
|
||||
@@ -374,7 +396,6 @@ export class DatabaseBackupPage extends MigrationWizardPage {
|
||||
this._fileShareDropdowns = [];
|
||||
this._blobContainerDropdowns = [];
|
||||
this.migrationStateModel._targetDatabaseNames = [];
|
||||
this.migrationStateModel._databaseBackup.networkShareLocations = [];
|
||||
this.migrationStateModel._databaseBackup.fileShares = [];
|
||||
this.migrationStateModel._databaseBackup.blobContainers = [];
|
||||
this._networkShareDatabaseConfigContainer.clearItems();
|
||||
@@ -389,42 +410,16 @@ export class DatabaseBackupPage extends MigrationWizardPage {
|
||||
requiredIndicator: true
|
||||
}).component();
|
||||
const targetNameNetworkInputBox = this._view.modelBuilder.inputBox().withProps({
|
||||
required: true
|
||||
required: true,
|
||||
value: db
|
||||
}).component();
|
||||
targetNameNetworkInputBox.onTextChanged((value) => {
|
||||
this.migrationStateModel._targetDatabaseNames[index] = value;
|
||||
});
|
||||
|
||||
const networkLocationInputBoxLabel = this._view.modelBuilder.text().withProps({
|
||||
value: constants.TARGET_NETWORK_SHARE_LOCATION(db),
|
||||
requiredIndicator: true
|
||||
}).component();
|
||||
const networkLocationInputBox = this._view.modelBuilder.inputBox().withProps({
|
||||
placeHolder: '\\\\Servername.domainname.com\\Backupfolder',
|
||||
required: true,
|
||||
validationErrorMessage: constants.INVALID_NETWORK_SHARE_LOCATION
|
||||
}).withValidation((component) => {
|
||||
if (this.migrationStateModel._databaseBackup.networkContainerType === NetworkContainerType.NETWORK_SHARE) {
|
||||
if (component.value) {
|
||||
if (!/(?<=\\\\)[^\\]*/.test(component.value)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}).component();
|
||||
networkLocationInputBox.onTextChanged((value) => {
|
||||
this.validateFields();
|
||||
this.migrationStateModel._databaseBackup.networkShareLocations[index] = value;
|
||||
});
|
||||
this.migrationStateModel._databaseBackup.networkShareLocations.push(undefined!);
|
||||
this._networkShareLocations.push(networkLocationInputBox);
|
||||
this._networkShareDatabaseConfigContainer.addItems(
|
||||
[
|
||||
targetNameNetworkInputBoxLabel,
|
||||
targetNameNetworkInputBox,
|
||||
networkLocationInputBoxLabel,
|
||||
networkLocationInputBox
|
||||
targetNameNetworkInputBox
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user