mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-05 01:25:38 -05:00
Support multiple database migrations using network share (#17796)
* update database backup model to take list of network shares * remove refreshMigrationTiles after startMigration in statemachine; add null checks
This commit is contained in:
@@ -60,7 +60,7 @@ export class RetryMigrationDialog {
|
||||
targetSubscription: migration.subscription,
|
||||
targetDatabaseNames: [migration.migrationContext.name],
|
||||
networkContainerType: null,
|
||||
networkShare: null,
|
||||
networkShares: [],
|
||||
blobs: [],
|
||||
|
||||
// Integration Runtime
|
||||
@@ -90,14 +90,16 @@ export class RetryMigrationDialog {
|
||||
if (sourceLocation?.fileShare) {
|
||||
savedInfo.networkContainerType = NetworkContainerType.NETWORK_SHARE;
|
||||
const storageAccountResourceId = migration.migrationContext.properties.backupConfiguration.targetLocation?.storageAccountResourceId!;
|
||||
savedInfo.networkShare = {
|
||||
password: '',
|
||||
networkShareLocation: sourceLocation?.fileShare?.path!,
|
||||
windowsUser: sourceLocation?.fileShare?.username!,
|
||||
storageAccount: getStorageAccount(storageAccountResourceId!),
|
||||
resourceGroup: getStorageAccountResourceGroup(storageAccountResourceId!),
|
||||
storageKey: ''
|
||||
};
|
||||
savedInfo.networkShares = [
|
||||
{
|
||||
password: '',
|
||||
networkShareLocation: sourceLocation?.fileShare?.path!,
|
||||
windowsUser: sourceLocation?.fileShare?.username!,
|
||||
storageAccount: getStorageAccount(storageAccountResourceId!),
|
||||
resourceGroup: getStorageAccountResourceGroup(storageAccountResourceId!),
|
||||
storageKey: ''
|
||||
}
|
||||
];
|
||||
} else if (sourceLocation?.azureBlob) {
|
||||
savedInfo.networkContainerType = NetworkContainerType.BLOB_CONTAINER;
|
||||
const storageAccountResourceId = sourceLocation?.azureBlob?.storageAccountResourceId!;
|
||||
|
||||
@@ -19,8 +19,8 @@ export class TargetDatabaseSummaryDialog {
|
||||
this._tableLength = 800;
|
||||
dialogWidth = 900;
|
||||
} else {
|
||||
this._tableLength = 200;
|
||||
dialogWidth = 'narrow';
|
||||
this._tableLength = 700;
|
||||
dialogWidth = 'medium';
|
||||
}
|
||||
this._dialogObject = azdata.window.createModelViewDialog(
|
||||
constants.DATABASE_TO_BE_MIGRATED,
|
||||
@@ -119,6 +119,15 @@ export class TargetDatabaseSummaryDialog {
|
||||
headerCssStyles: headerCssStyle,
|
||||
hidden: this._model._databaseBackup.migrationMode === MigrationMode.ONLINE
|
||||
});
|
||||
} else {
|
||||
columns.push({
|
||||
valueType: azdata.DeclarativeDataType.string,
|
||||
displayName: constants.NETWORK_SHARE_PATH,
|
||||
isReadOnly: true,
|
||||
width: columnWidth,
|
||||
rowCssStyles: rowCssStyle,
|
||||
headerCssStyles: headerCssStyle
|
||||
});
|
||||
}
|
||||
|
||||
const tableRows: azdata.DeclarativeTableCellValue[][] = [];
|
||||
@@ -146,6 +155,10 @@ export class TargetDatabaseSummaryDialog {
|
||||
value: this._model._databaseBackup.blobs[index].lastBackupFile!
|
||||
});
|
||||
}
|
||||
} else {
|
||||
tableRow.push({
|
||||
value: this._model._databaseBackup.networkShares[index].networkShareLocation
|
||||
});
|
||||
}
|
||||
tableRows.push(tableRow);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user