mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 17:22:29 -05:00
Added fetch logic for controllers (#14380)
* . Added fetch logic for controllers (no need to create a new one everytime) . Fixed retention logic * Fix field reloading logic. Fixed localized string Removing hardcoded colors
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as vscode from 'vscode';
|
||||
import { azureResource } from 'azureResource';
|
||||
import { DatabaseMigration, SqlManagedInstance } from '../api/azure';
|
||||
import { DatabaseMigration, MigrationController, SqlManagedInstance } from '../api/azure';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
|
||||
@@ -35,7 +35,13 @@ export class MigrationLocalStorage {
|
||||
return dataBaseMigrations;
|
||||
}
|
||||
|
||||
public static saveMigration(connectionProfile: azdata.connection.ConnectionProfile, migrationContext: DatabaseMigration, targetMI: SqlManagedInstance, azureAccount: azdata.Account, subscription: azureResource.AzureResourceSubscription): void {
|
||||
public static saveMigration(
|
||||
connectionProfile: azdata.connection.ConnectionProfile,
|
||||
migrationContext: DatabaseMigration,
|
||||
targetMI: SqlManagedInstance,
|
||||
azureAccount: azdata.Account,
|
||||
subscription: azureResource.AzureResourceSubscription,
|
||||
controller: MigrationController): void {
|
||||
try {
|
||||
const migrationMementos: MigrationContext[] = this.context.globalState.get(this.mementoToken) || [];
|
||||
migrationMementos.push({
|
||||
@@ -43,7 +49,8 @@ export class MigrationLocalStorage {
|
||||
migrationContext: migrationContext,
|
||||
targetManagedInstance: targetMI,
|
||||
subscription: subscription,
|
||||
azureAccount: azureAccount
|
||||
azureAccount: azureAccount,
|
||||
controller: controller
|
||||
});
|
||||
this.context.globalState.update(this.mementoToken, migrationMementos);
|
||||
} catch (e) {
|
||||
@@ -61,5 +68,6 @@ export interface MigrationContext {
|
||||
migrationContext: DatabaseMigration,
|
||||
targetManagedInstance: SqlManagedInstance,
|
||||
azureAccount: azdata.Account,
|
||||
subscription: azureResource.AzureResourceSubscription
|
||||
subscription: azureResource.AzureResourceSubscription,
|
||||
controller: MigrationController
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user