mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 17:22:59 -05:00
[SQL Migration] List resource groups based on available resources (#18846)
* WIP - implemented logic to show resource groups as derived from list of resources, instead of directly listing all resource groups * Remove comments * Remove getResourceGroupByName and craft resource group object manually instead * Update subscription and location list when tenant is changed * Define Azure resource types locally instead of modifying azurecore * Add SQL VM scenario * Split getAzureResourceGroupDropdownValues into four separate functions * Refresh only subscription list when tenant is changed * Create new DMS dialog should show all resource groups * Remove unnecessary async code
This commit is contained in:
@@ -1261,7 +1261,7 @@ export class DatabaseBackupPage extends MigrationWizardPage {
|
||||
private async loadNetworkStorageResourceGroup(): Promise<void> {
|
||||
this._networkShareStorageAccountResourceGroupDropdown.loading = true;
|
||||
try {
|
||||
this._networkShareStorageAccountResourceGroupDropdown.values = await this.migrationStateModel.getAzureResourceGroupDropdownValues(this.migrationStateModel._databaseBackup.subscription);
|
||||
this._networkShareStorageAccountResourceGroupDropdown.values = await this.migrationStateModel.getAzureResourceGroupForStorageAccountsDropdownValues(this.migrationStateModel._databaseBackup.subscription);
|
||||
selectDefaultDropdownValue(this._networkShareStorageAccountResourceGroupDropdown, this.migrationStateModel._databaseBackup?.networkShares[0]?.resourceGroup?.id, false);
|
||||
} catch (error) {
|
||||
logError(TelemetryViews.DatabaseBackupPage, 'ErrorLoadingNetworkStorageResourceGroup', error);
|
||||
@@ -1288,7 +1288,7 @@ export class DatabaseBackupPage extends MigrationWizardPage {
|
||||
private async loadBlobResourceGroup(): Promise<void> {
|
||||
this._blobContainerResourceGroupDropdowns.forEach(v => v.loading = true);
|
||||
try {
|
||||
const resourceGroupValues = await this.migrationStateModel.getAzureResourceGroupDropdownValues(this.migrationStateModel._databaseBackup.subscription);
|
||||
const resourceGroupValues = await this.migrationStateModel.getAzureResourceGroupForStorageAccountsDropdownValues(this.migrationStateModel._databaseBackup.subscription);
|
||||
this._blobContainerResourceGroupDropdowns.forEach((dropDown, index) => {
|
||||
dropDown.values = resourceGroupValues;
|
||||
selectDefaultDropdownValue(dropDown, this.migrationStateModel._databaseBackup?.blobs[index]?.resourceGroup?.id, false);
|
||||
|
||||
Reference in New Issue
Block a user