add delete migration method in migration list and details pages (#22243)

* add delete migraiton, fix stale token detection

* address pr comments, fix api error response format
This commit is contained in:
brian-harris
2023-03-09 13:52:48 -08:00
committed by GitHub
parent 12a5bd0ef2
commit 39f90afe6c
16 changed files with 229 additions and 77 deletions

View File

@@ -877,7 +877,8 @@ export class LoginMigrationTargetSelectionPage extends MigrationWizardPage {
private async populateTenantsDropdown(): Promise<void> {
try {
this._accountTenantDropdown.loading = true;
if (this.migrationStateModel._azureAccount && this.migrationStateModel._azureAccount.isStale === false && this.migrationStateModel._azureAccount.properties.tenants.length > 0) {
if (!utils.isAccountTokenStale(this.migrationStateModel._azureAccount) &&
this.migrationStateModel._azureAccount?.properties?.tenants?.length > 0) {
this.migrationStateModel._accountTenants = utils.getAzureTenants(this.migrationStateModel._azureAccount);
this._accountTenantDropdown.values = utils.getAzureTenantsDropdownValues(this.migrationStateModel._accountTenants);
}

View File

@@ -886,7 +886,7 @@ export class TargetSelectionPage extends MigrationWizardPage {
private async populateTenantsDropdown(): Promise<void> {
try {
this._accountTenantDropdown.loading = true;
if (this.migrationStateModel._azureAccount?.isStale === false &&
if (!utils.isAccountTokenStale(this.migrationStateModel._azureAccount) &&
this.migrationStateModel._azureAccount?.properties?.tenants?.length > 0) {
this.migrationStateModel._accountTenants = utils.getAzureTenants(this.migrationStateModel._azureAccount);