Enable offline migration mode on sql migration extension (#16459)

This commit is contained in:
Rachel Kim
2021-07-30 23:15:09 -07:00
committed by GitHub
parent 2427cbe3c6
commit b3e9428898
17 changed files with 614 additions and 355 deletions

View File

@@ -3,7 +3,8 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { CategoryValue, DropDownComponent } from 'azdata';
import { CategoryValue, DropDownComponent, IconPath } from 'azdata';
import { IconPathHelper } from '../constants/iconPathHelper';
import { DAYS, HRS, MINUTE, SEC } from '../constants/strings';
import { AdsMigrationStatus } from '../dialog/migrationStatus/migrationStatusDialogModel';
import { MigrationContext } from '../models/migrationLocalStorage';
@@ -199,3 +200,21 @@ export function getSessionIdHeader(sessionId: string): { [key: string]: string }
'SqlMigrationSessionId': sessionId
};
}
export function getMigrationStatusImage(status: string): IconPath {
switch (status) {
case 'InProgress':
return IconPathHelper.inProgressMigration;
case 'Succeeded':
return IconPathHelper.completedMigration;
case 'Creating':
return IconPathHelper.notStartedMigration;
case 'Completing':
return IconPathHelper.completingCutover;
case 'Canceling':
return IconPathHelper.cancel;
case 'Failed':
default:
return IconPathHelper.error;
}
}