mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 01:25:37 -05:00
Adding database specific settings, cancel migration and other dark UI fixes (#14626)
* Made dashboard dark ui compat * foundations for sql vm * WIP * Added cancel migration Added refresh migraiton table Added multi db config * disabling cancel migration button if the migration is not in progress. * Addressing some PR based coments - Removing (s) from loc strings - Adding return type to cancel migration - removing _ from public vars - localizing strings - Adding name to dialogs for telemetry * Adding todo comment for offline mode
This commit is contained in:
@@ -52,15 +52,15 @@ export interface NetworkShare {
|
||||
export interface DatabaseBackupModel {
|
||||
migrationCutover: MigrationCutover;
|
||||
networkContainerType: NetworkContainerType;
|
||||
networkShareLocation: string;
|
||||
networkShareLocations: string[];
|
||||
windowsUser: string;
|
||||
password: string;
|
||||
subscription: azureResource.AzureResourceSubscription;
|
||||
storageAccount: StorageAccount;
|
||||
storageKey: string;
|
||||
azureSecurityToken: string;
|
||||
fileShare: azureResource.FileShare;
|
||||
blobContainer: azureResource.BlobContainer;
|
||||
fileShares: azureResource.FileShare[];
|
||||
blobContainers: azureResource.BlobContainer[];
|
||||
}
|
||||
export interface Model {
|
||||
readonly sourceConnectionId: string;
|
||||
@@ -91,6 +91,8 @@ export class MigrationStateModel implements Model, vscode.Disposable {
|
||||
public _storageAccounts!: StorageAccount[];
|
||||
public _fileShares!: azureResource.FileShare[];
|
||||
public _blobContainers!: azureResource.BlobContainer[];
|
||||
public _refreshNetworkShareLocation!: azureResource.BlobContainer[];
|
||||
public _targetDatabaseNames!: string[];
|
||||
|
||||
public _migrationController!: SqlMigrationController;
|
||||
public _migrationControllers!: SqlMigrationController[];
|
||||
@@ -102,7 +104,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
|
||||
private _skuRecommendations: SKURecommendations | undefined;
|
||||
private _assessmentResults: mssql.SqlMigrationAssessmentResultItem[] | undefined;
|
||||
|
||||
|
||||
public refreshDatabaseBackupPage!: boolean;
|
||||
|
||||
constructor(
|
||||
private readonly _extensionContext: vscode.ExtensionContext,
|
||||
@@ -467,7 +469,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
|
||||
},
|
||||
SourceLocation: {
|
||||
FileShare: {
|
||||
Path: this._databaseBackup.networkShareLocation,
|
||||
Path: '',
|
||||
Username: this._databaseBackup.windowsUser,
|
||||
Password: this._databaseBackup.password,
|
||||
}
|
||||
@@ -482,19 +484,19 @@ export class MigrationStateModel implements Model, vscode.Disposable {
|
||||
}
|
||||
};
|
||||
|
||||
this._migrationDbs.forEach(async (db) => {
|
||||
this._migrationDbs.forEach(async (db, index) => {
|
||||
|
||||
requestBody.properties.SourceDatabaseName = db;
|
||||
try {
|
||||
requestBody.properties.BackupConfiguration.SourceLocation.FileShare.Path = this._databaseBackup.networkShareLocations[index];
|
||||
const response = await startDatabaseMigration(
|
||||
this._azureAccount,
|
||||
this._targetSubscription,
|
||||
this._migrationController?.properties.location!,
|
||||
this._targetServerInstance,
|
||||
db,
|
||||
this._targetDatabaseNames[index],
|
||||
requestBody
|
||||
);
|
||||
|
||||
if (response.status === 201) {
|
||||
MigrationLocalStorage.saveMigration(
|
||||
currentConnection!,
|
||||
|
||||
Reference in New Issue
Block a user