[SQL Migration] Disable IR scenario and check page blobs for SQL VM <= 2014 (#21373)

* Disable IR scenario and add info box for source < 2014

* Update text and link

* Clean up

* Fix issue where switching to another target platform wouldn't clear restriction

* Remove locale from documentation URL

* Refactor

* Clean up

* Autoselect blob scenario

* Refactor

* Add page blog check

* Clean up

* Update UI logic
This commit is contained in:
Raymond Truong
2023-01-23 14:20:06 -08:00
committed by GitHub
parent ac4aa8db9a
commit 9d4d5374d7
4 changed files with 72 additions and 6 deletions

View File

@@ -73,6 +73,19 @@ export function getSqlServerName(majorVersion: number): string | undefined {
}
}
export function isTargetSqlVm2014OrBelow(sqlVm: azure.SqlVMServer): boolean {
// e.g. SQL2008-WS2012, SQL2008R2-WS2019, SQL2012-WS2016, SQL2014-WS2012R2, SQL2016-WS2019, SQL2017-WS2019, SQL2019-WS2022
const sqlImageOffer = sqlVm.properties.sqlImageOffer;
// parse image offer and extract SQL version (assuming it is a valid image offer)
if (sqlImageOffer && sqlImageOffer.toUpperCase().startsWith('SQL')) {
const version = parseInt(sqlImageOffer.substring(3, 7));
return version <= 2014;
}
return false;
}
export interface IPackageInfo {
name: string;
version: string;