mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 01:25:36 -05:00
Adding Azure AD tenant dropdown in migration wizard (#14637)
* Added dropdown to select azure tenant in accounts page * Added dropdown label for tenant dropdown * Moving deepcopy to utils Exporting tenant type from azurecore * Removing unnecessary stylings * removing unnecessary async
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import { azureResource } from 'azureResource';
|
||||
import * as azurecore from 'azurecore';
|
||||
import * as vscode from 'vscode';
|
||||
import * as mssql from '../../../mssql';
|
||||
import { getAvailableManagedInstanceProducts, getAvailableStorageAccounts, getBlobContainers, getFileShares, getMigrationControllers, getSubscriptions, SqlMigrationController, SqlManagedInstance, startDatabaseMigration, StartDatabaseMigrationRequest, StorageAccount, getAvailableSqlVMs, SqlVMServer } from '../api/azure';
|
||||
@@ -79,6 +80,7 @@ export interface StateChangeEvent {
|
||||
export class MigrationStateModel implements Model, vscode.Disposable {
|
||||
public _azureAccounts!: azdata.Account[];
|
||||
public _azureAccount!: azdata.Account;
|
||||
public _accountTenants!: azurecore.Tenant[];
|
||||
|
||||
public _subscriptions!: azureResource.AzureResourceSubscription[];
|
||||
|
||||
@@ -197,6 +199,19 @@ export class MigrationStateModel implements Model, vscode.Disposable {
|
||||
return this._azureAccounts[index];
|
||||
}
|
||||
|
||||
public getTenantValues(): azdata.CategoryValue[] {
|
||||
return this._accountTenants.map(tenant => {
|
||||
return {
|
||||
displayName: tenant.displayName,
|
||||
name: tenant.id
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
public getTenant(index: number): azurecore.Tenant {
|
||||
return this._accountTenants[index];
|
||||
}
|
||||
|
||||
public async getSubscriptionsDropdownValues(): Promise<azdata.CategoryValue[]> {
|
||||
let subscriptionsValues: azdata.CategoryValue[] = [];
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user