mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Save And Close Functionality (#17000)
* save and close * wip * working save and close * cleanup * pr changes * pr changes * fix capitalization * fix build * pr fix
This commit is contained in:
@@ -24,6 +24,7 @@ export class AccountsSelectionPage extends MigrationWizardPage {
|
||||
}
|
||||
|
||||
protected async registerContent(view: azdata.ModelView): Promise<void> {
|
||||
this.wizard.customButtons[0].enabled = true;
|
||||
const form = view.modelBuilder.formContainer()
|
||||
.withFormItems(
|
||||
[
|
||||
@@ -95,6 +96,14 @@ export class AccountsSelectionPage extends MigrationWizardPage {
|
||||
await this._accountTenantFlexContainer.updateCssStyles({
|
||||
'display': 'none'
|
||||
});
|
||||
if (this.migrationStateModel.resumeAssessment && this.migrationStateModel.savedInfo.closedPage >= 0) {
|
||||
(<azdata.CategoryValue[]>this._azureAccountsDropdown.values)?.forEach((account, index) => {
|
||||
if (account.name === this.migrationStateModel.savedInfo.azureAccount?.displayInfo.userId) {
|
||||
selectDropDownIndex(this._azureAccountsDropdown, index);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
this.migrationStateModel._subscriptions = undefined!;
|
||||
this.migrationStateModel._targetSubscription = undefined!;
|
||||
@@ -162,12 +171,17 @@ export class AccountsSelectionPage extends MigrationWizardPage {
|
||||
* All azure requests will only run on this tenant from now on
|
||||
*/
|
||||
const selectedIndex = findDropDownItemIndex(this._accountTenantDropdown, value);
|
||||
const selectedTenant = this.migrationStateModel.getTenant(selectedIndex);
|
||||
this.migrationStateModel._azureTenant = deepClone(selectedTenant);
|
||||
if (selectedIndex > -1) {
|
||||
this.migrationStateModel._azureAccount.properties.tenants = [this.migrationStateModel.getTenant(selectedIndex)];
|
||||
this.migrationStateModel._subscriptions = undefined!;
|
||||
this.migrationStateModel._targetSubscription = undefined!;
|
||||
this.migrationStateModel._databaseBackup.subscription = undefined!;
|
||||
}
|
||||
const selectedAzureAccount = this.migrationStateModel.getAccount(selectedIndex);
|
||||
this.migrationStateModel._azureAccount = deepClone(selectedAzureAccount);
|
||||
|
||||
}));
|
||||
|
||||
this._accountTenantFlexContainer = view.modelBuilder.flexContainer()
|
||||
|
||||
Reference in New Issue
Block a user