mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 09:35:37 -05:00
Add more telemetry props to sql migration extension (#17026)
This commit is contained in:
27
extensions/sql-migration/src/constants/helper.ts
Normal file
27
extensions/sql-migration/src/constants/helper.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { MigrationContext } from '../models/migrationLocalStorage';
|
||||
import * as loc from './strings';
|
||||
|
||||
export enum SQLTargetAssetType {
|
||||
SQLMI = 'microsoft.sql/managedinstances',
|
||||
SQLVM = 'Microsoft.SqlVirtualMachine/sqlVirtualMachines',
|
||||
}
|
||||
|
||||
export function getMigrationTargetType(migration: MigrationContext): string {
|
||||
switch (migration.targetManagedInstance.type) {
|
||||
case SQLTargetAssetType.SQLMI:
|
||||
return loc.SQL_MANAGED_INSTANCE;
|
||||
case SQLTargetAssetType.SQLVM:
|
||||
return loc.SQL_VIRTUAL_MACHINE;
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
export function getMigrationMode(migration: MigrationContext): string {
|
||||
return migration.migrationContext.properties.autoCutoverConfiguration?.autoCutover?.valueOf() ? loc.OFFLINE : loc.OFFLINE;
|
||||
}
|
||||
Reference in New Issue
Block a user