mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Remove extra id property from azure subs and add type name helper (#12145)
* Remove extra id property from azure subs and add type name helper * case * Change a few names
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { azureResource } from 'azureResource';
|
||||
import * as loc from './localizedConstants';
|
||||
import { AzureRegion } from 'azurecore';
|
||||
|
||||
@@ -98,3 +99,21 @@ export function getRegionDisplayName(region?: string): string {
|
||||
console.warn(`Unknown Azure region ${region}`);
|
||||
return region;
|
||||
}
|
||||
|
||||
export function getResourceTypeDisplayName(type: string): string {
|
||||
switch (type) {
|
||||
case azureResource.AzureResourceType.sqlServer:
|
||||
return loc.sqlServer;
|
||||
case azureResource.AzureResourceType.sqlDatabase:
|
||||
return loc.sqlDatabase;
|
||||
case azureResource.AzureResourceType.sqlManagedInstance:
|
||||
return loc.sqlManagedInstance;
|
||||
case azureResource.AzureResourceType.azureArcSqlManagedInstance:
|
||||
return loc.azureArcsqlManagedInstance;
|
||||
case azureResource.AzureResourceType.azureArcService:
|
||||
return loc.azureArcService;
|
||||
case azureResource.AzureResourceType.azureArcPostgresServer:
|
||||
return loc.azureArcPostgresServer;
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user