Combine azure-resource.d.ts into azurecore.d.ts (#19047)

This commit is contained in:
Charles Gagnon
2022-04-14 11:06:45 -07:00
committed by GitHub
parent e9b678494c
commit d202fd703e
72 changed files with 330 additions and 377 deletions

View File

@@ -7,7 +7,7 @@ import * as azdata from 'azdata';
import { AppContext } from './appContext'; import { AppContext } from './appContext';
import { AzureResourceServiceNames } from './azureResource/constants'; import { AzureResourceServiceNames } from './azureResource/constants';
import { IAzureResourceSubscriptionService } from './azureResource/interfaces'; import { IAzureResourceSubscriptionService } from './azureResource/interfaces';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import * as azureResourceUtils from './azureResource/utils'; import * as azureResourceUtils from './azureResource/utils';
import * as constants from './constants'; import * as constants from './constants';
import * as loc from './localizedConstants'; import * as loc from './localizedConstants';

View File

@@ -1,158 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'azureResource' {
import { TreeDataProvider } from 'vscode';
import { DataProvider, TreeItem } from 'azdata';
import { BlobItem } from '@azure/storage-blob';
import { AzureAccount } from 'azurecore';
export namespace azureResource {
/**
* AzureCore core extension supports following resource types of Azure Resource Graph.
* To add more resources, please refer this guide: https://docs.microsoft.com/en-us/azure/governance/resource-graph/reference/supported-tables-resources
*/
export const enum AzureResourceType {
resourceGroup = 'microsoft.resources/subscriptions/resourcegroups',
sqlServer = 'microsoft.sql/servers',
sqlDatabase = 'microsoft.sql/servers/databases',
sqlManagedInstance = 'microsoft.sql/managedinstances',
azureArcSqlManagedInstance = 'microsoft.azuredata/sqlmanagedinstances',
virtualMachines = 'microsoft.compute/virtualmachines',
kustoClusters = 'microsoft.kusto/clusters',
azureArcPostgresServer = 'microsoft.azuredata/postgresinstances',
postgresServer = 'microsoft.dbforpostgresql/servers',
azureArcService = 'microsoft.azuredata/datacontrollers',
storageAccount = 'microsoft.storage/storageaccounts',
logAnalytics = 'microsoft.operationalinsights/workspaces'
}
export interface IAzureResourceProvider extends DataProvider {
getTreeDataProvider(): IAzureResourceTreeDataProvider;
}
export interface IAzureResourceTreeDataProvider extends TreeDataProvider<IAzureResourceNode> {
browseConnectionMode: boolean;
}
export interface IAzureResourceNode {
readonly account: AzureAccount;
readonly subscription: AzureResourceSubscription;
readonly tenantId: string;
readonly treeItem: TreeItem;
}
export interface IAzureSubscriptionInfo {
id: string;
name: string;
}
export interface AzureResource {
name: string;
id: string;
subscription: IAzureSubscriptionInfo;
resourceGroup?: string;
tenant?: string;
}
export interface AzureResourceSubscription extends Omit<AzureResource, 'subscription'> {
}
export interface AzureSqlResource extends AzureResource {
loginName: string;
}
export interface AzureGraphResource extends Omit<AzureResource, 'tenant' | 'subscription'> {
tenantId: string;
subscriptionId: string;
type: string;
location: string;
}
export interface AzureResourceResourceGroup extends AzureResource {
location?: string;
managedBy?: string;
properties?: {
provisioningState?: string
};
type?: string;
}
export interface AzureLocation {
id: string,
name: string,
displayName: string,
regionalDisplayName: string,
metadata: {
regionType: string,
regionCategory: string,
geographyGroup: string,
longitude: number,
latitude: number,
physicalLocation: string,
pairedRegion: {
name: string,
id: string,
}[],
},
}
export interface AzureSqlManagedInstance extends AzureGraphResource {
sku: {
capacity: number;
family: string;
name: string;
tier: 'GeneralPurpose' | 'BusinessCritical';
},
properties: {
provisioningState: string,
storageAccountType: string,
maintenanceConfigurationId: string,
state: string,
licenseType: string,
zoneRedundant: false,
fullyQualifiedDomainName: string,
collation: string,
administratorLogin: string,
minimalTlsVersion: string,
subnetId: string,
publicDataEndpointEnabled: boolean,
storageSizeInGB: number,
timezoneId: string,
proxyOverride: string,
vCores: number,
dnsZone: string,
}
}
export interface ManagedDatabase {
id: string,
location: string,
name: string,
properties: {
sourceDatabaseId: string,
status: string
},
type: string
}
export interface AzureResourceDatabase extends AzureSqlResource {
serverName: string;
serverFullName: string;
}
export interface AzureResourceDatabaseServer extends AzureSqlResource {
fullName: string;
defaultDatabaseName: string;
}
export interface BlobContainer extends AzureResource { }
export interface FileShare extends AzureResource { }
export interface Blob extends BlobItem { }
}
}

View File

@@ -9,13 +9,12 @@ import * as nls from 'vscode-nls';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
import { AppContext } from '../appContext'; import { AppContext } from '../appContext';
import { azureResource } from 'azureResource';
import { TreeNode } from './treeNode'; import { TreeNode } from './treeNode';
import { AzureResourceTreeProvider } from './tree/treeProvider'; import { AzureResourceTreeProvider } from './tree/treeProvider';
import { AzureResourceAccountTreeNode } from './tree/accountTreeNode'; import { AzureResourceAccountTreeNode } from './tree/accountTreeNode';
import { IAzureResourceSubscriptionService, IAzureResourceSubscriptionFilterService, IAzureTerminalService } from '../azureResource/interfaces'; import { IAzureResourceSubscriptionService, IAzureResourceSubscriptionFilterService, IAzureTerminalService } from '../azureResource/interfaces';
import { AzureResourceServiceNames } from './constants'; import { AzureResourceServiceNames } from './constants';
import { AzureAccount, Tenant } from 'azurecore'; import { AzureAccount, Tenant, azureResource } from 'azurecore';
import { FlatAccountTreeNode } from './tree/flatAccountTreeNode'; import { FlatAccountTreeNode } from './tree/flatAccountTreeNode';
import { ConnectionDialogTreeProvider } from './tree/connectionDialogTreeProvider'; import { ConnectionDialogTreeProvider } from './tree/connectionDialogTreeProvider';
import { AzureResourceErrorMessageUtil } from './utils'; import { AzureResourceErrorMessageUtil } from './utils';

View File

@@ -5,8 +5,7 @@
import * as msRest from '@azure/ms-rest-js'; import * as msRest from '@azure/ms-rest-js';
import { azureResource } from 'azureResource'; import { AzureAccount, Tenant, azureResource } from 'azurecore';
import { AzureAccount, Tenant } from 'azurecore';
export interface IAzureResourceSubscriptionService { export interface IAzureResourceSubscriptionService {
/** /**

View File

@@ -5,7 +5,7 @@
import { ExtensionContext } from 'vscode'; import { ExtensionContext } from 'vscode';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { IAzureResourceService } from '../../interfaces'; import { IAzureResourceService } from '../../interfaces';
import { AzureMonitorTreeDataProvider as AzureMonitorTreeDataProvider } from './azuremonitorTreeDataProvider'; import { AzureMonitorTreeDataProvider as AzureMonitorTreeDataProvider } from './azuremonitorTreeDataProvider';

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase'; import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
export interface AzureMonitorGraphData extends GraphData { export interface AzureMonitorGraphData extends GraphData {

View File

@@ -12,8 +12,7 @@ import { AzureResourceItemType } from '../../constants';
import { generateGuid } from '../../utils'; import { generateGuid } from '../../utils';
import { IAzureResourceService } from '../../interfaces'; import { IAzureResourceService } from '../../interfaces';
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase'; import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
import { azureResource } from 'azureResource'; import { AzureAccount, azureResource } from 'azurecore';
import { AzureAccount } from 'azurecore';
export class AzureMonitorTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> { export class AzureMonitorTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
private static readonly containerId = 'azure.resource.providers.AzureMonitorContainer'; private static readonly containerId = 'azure.resource.providers.AzureMonitorContainer';

View File

@@ -6,7 +6,7 @@
import { ExtensionContext } from 'vscode'; import { ExtensionContext } from 'vscode';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { AzureResourceDatabaseTreeDataProvider } from './databaseTreeDataProvider'; import { AzureResourceDatabaseTreeDataProvider } from './databaseTreeDataProvider';
import { IAzureResourceService } from '../../interfaces'; import { IAzureResourceService } from '../../interfaces';

View File

@@ -4,12 +4,11 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { ServiceClientCredentials } from '@azure/ms-rest-js'; import { ServiceClientCredentials } from '@azure/ms-rest-js';
import { azureResource } from 'azureResource';
import { IAzureResourceService } from '../../interfaces'; import { IAzureResourceService } from '../../interfaces';
import { serversQuery, DbServerGraphData } from '../databaseServer/databaseServerService'; import { serversQuery, DbServerGraphData } from '../databaseServer/databaseServerService';
import { ResourceGraphClient } from '@azure/arm-resourcegraph'; import { ResourceGraphClient } from '@azure/arm-resourcegraph';
import { queryGraphResources, GraphData } from '../resourceTreeDataProviderBase'; import { queryGraphResources, GraphData } from '../resourceTreeDataProviderBase';
import { AzureAccount } from 'azurecore'; import { AzureAccount, azureResource } from 'azurecore';
interface DatabaseGraphData extends GraphData { interface DatabaseGraphData extends GraphData {
kind: string; kind: string;

View File

@@ -8,12 +8,11 @@ import * as vscode from 'vscode';
import * as nls from 'vscode-nls'; import * as nls from 'vscode-nls';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
import { azureResource } from 'azureResource';
import { AzureResourceItemType } from '../../../azureResource/constants'; import { AzureResourceItemType } from '../../../azureResource/constants';
import { generateGuid } from '../../utils'; import { generateGuid } from '../../utils';
import { IAzureResourceService } from '../../interfaces'; import { IAzureResourceService } from '../../interfaces';
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase'; import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
import { AzureAccount } from 'azurecore'; import { AzureAccount, azureResource } from 'azurecore';
export class AzureResourceDatabaseTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabase> { export class AzureResourceDatabaseTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabase> {

View File

@@ -5,7 +5,7 @@
import { ExtensionContext } from 'vscode'; import { ExtensionContext } from 'vscode';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { IAzureResourceService } from '../../interfaces'; import { IAzureResourceService } from '../../interfaces';
import { AzureResourceDatabaseServerTreeDataProvider } from './databaseServerTreeDataProvider'; import { AzureResourceDatabaseServerTreeDataProvider } from './databaseServerTreeDataProvider';

View File

@@ -5,7 +5,7 @@
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase'; import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
export interface DbServerGraphData extends GraphData { export interface DbServerGraphData extends GraphData {
properties: { properties: {

View File

@@ -12,8 +12,7 @@ import { AzureResourceItemType } from '../../../azureResource/constants';
import { generateGuid } from '../../utils'; import { generateGuid } from '../../utils';
import { IAzureResourceService } from '../../interfaces'; import { IAzureResourceService } from '../../interfaces';
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase'; import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
import { azureResource } from 'azureResource'; import { AzureAccount, azureResource } from 'azurecore';
import { AzureAccount } from 'azurecore';
export class AzureResourceDatabaseServerTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> { export class AzureResourceDatabaseServerTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
private static readonly containerId = 'azure.resource.providers.databaseServer.treeDataProvider.databaseServerContainer'; private static readonly containerId = 'azure.resource.providers.databaseServer.treeDataProvider.databaseServerContainer';

View File

@@ -5,7 +5,7 @@
import { ExtensionContext } from 'vscode'; import { ExtensionContext } from 'vscode';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { IAzureResourceService } from '../../interfaces'; import { IAzureResourceService } from '../../interfaces';
import { KustoTreeDataProvider as KustoTreeDataProvider } from './kustoTreeDataProvider'; import { KustoTreeDataProvider as KustoTreeDataProvider } from './kustoTreeDataProvider';

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase'; import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
export interface KustoGraphData extends GraphData { export interface KustoGraphData extends GraphData {

View File

@@ -12,8 +12,7 @@ import { AzureResourceItemType } from '../../constants';
import { generateGuid } from '../../utils'; import { generateGuid } from '../../utils';
import { IAzureResourceService } from '../../interfaces'; import { IAzureResourceService } from '../../interfaces';
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase'; import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
import { azureResource } from 'azureResource'; import { AzureAccount, azureResource } from 'azurecore';
import { AzureAccount } from 'azurecore';
export class KustoTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> { export class KustoTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
private static readonly containerId = 'azure.resource.providers.KustoContainer'; private static readonly containerId = 'azure.resource.providers.KustoContainer';

View File

@@ -5,7 +5,7 @@
import { ExtensionContext } from 'vscode'; import { ExtensionContext } from 'vscode';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { IAzureResourceService } from '../../interfaces'; import { IAzureResourceService } from '../../interfaces';
import { PostgresServerArcTreeDataProvider as PostgresServerArcTreeDataProvider } from './postgresServerTreeDataProvider'; import { PostgresServerArcTreeDataProvider as PostgresServerArcTreeDataProvider } from './postgresServerTreeDataProvider';

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase'; import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
export interface PostgresArcServerGraphData extends GraphData { export interface PostgresArcServerGraphData extends GraphData {
properties: { properties: {

View File

@@ -12,8 +12,7 @@ import { AzureResourceItemType } from '../../constants';
import { generateGuid } from '../../utils'; import { generateGuid } from '../../utils';
import { IAzureResourceService } from '../../interfaces'; import { IAzureResourceService } from '../../interfaces';
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase'; import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
import { azureResource } from 'azureResource'; import { AzureAccount, azureResource } from 'azurecore';
import { AzureAccount } from 'azurecore';
export class PostgresServerArcTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> { export class PostgresServerArcTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
private static readonly containerId = 'azure.resource.providers.postgresArcServer.treeDataProvider.postgresServerContainer'; private static readonly containerId = 'azure.resource.providers.postgresArcServer.treeDataProvider.postgresServerContainer';

View File

@@ -5,7 +5,7 @@
import { ExtensionContext } from 'vscode'; import { ExtensionContext } from 'vscode';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { IAzureResourceService } from '../../interfaces'; import { IAzureResourceService } from '../../interfaces';
import { PostgresServerTreeDataProvider as PostgresServerTreeDataProvider } from './postgresServerTreeDataProvider'; import { PostgresServerTreeDataProvider as PostgresServerTreeDataProvider } from './postgresServerTreeDataProvider';

View File

@@ -5,7 +5,7 @@
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase'; import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
interface DbServerGraphData extends GraphData { interface DbServerGraphData extends GraphData {

View File

@@ -12,8 +12,7 @@ import { AzureResourceItemType } from '../../constants';
import { generateGuid } from '../../utils'; import { generateGuid } from '../../utils';
import { IAzureResourceService } from '../../interfaces'; import { IAzureResourceService } from '../../interfaces';
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase'; import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
import { azureResource } from 'azureResource'; import { AzureAccount, azureResource } from 'azurecore';
import { AzureAccount } from 'azurecore';
export class PostgresServerTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> { export class PostgresServerTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
private static readonly containerId = 'azure.resource.providers.databaseServer.treeDataProvider.postgresServerContainer'; private static readonly containerId = 'azure.resource.providers.databaseServer.treeDataProvider.postgresServerContainer';

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { DbServerGraphData } from '../databaseServer/databaseServerService'; import { DbServerGraphData } from '../databaseServer/databaseServerService';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { ResourceServiceBase } from '../resourceTreeDataProviderBase'; import { ResourceServiceBase } from '../resourceTreeDataProviderBase';
export class AzureResourceGroupService extends ResourceServiceBase<DbServerGraphData, azureResource.AzureResourceResourceGroup> { export class AzureResourceGroupService extends ResourceServiceBase<DbServerGraphData, azureResource.AzureResourceResourceGroup> {

View File

@@ -6,11 +6,10 @@
import * as azdata from 'azdata'; import * as azdata from 'azdata';
import * as msRest from '@azure/ms-rest-js'; import * as msRest from '@azure/ms-rest-js';
import { azureResource } from 'azureResource';
import { IAzureResourceService } from '../interfaces'; import { IAzureResourceService } from '../interfaces';
import { AzureResourceErrorMessageUtil } from '../utils'; import { AzureResourceErrorMessageUtil } from '../utils';
import { ResourceGraphClient } from '@azure/arm-resourcegraph'; import { ResourceGraphClient } from '@azure/arm-resourcegraph';
import { AzureAccount } from 'azurecore'; import { AzureAccount, azureResource } from 'azurecore';
export abstract class ResourceTreeDataProviderBase<T extends azureResource.AzureResource> implements azureResource.IAzureResourceTreeDataProvider { export abstract class ResourceTreeDataProviderBase<T extends azureResource.AzureResource> implements azureResource.IAzureResourceTreeDataProvider {
public browseConnectionMode: boolean = false; public browseConnectionMode: boolean = false;

View File

@@ -5,7 +5,7 @@
import { ExtensionContext } from 'vscode'; import { ExtensionContext } from 'vscode';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { IAzureResourceService } from '../../interfaces'; import { IAzureResourceService } from '../../interfaces';
import { SqlInstanceTreeDataProvider as SqlInstanceTreeDataProvider } from './sqlInstanceTreeDataProvider'; import { SqlInstanceTreeDataProvider as SqlInstanceTreeDataProvider } from './sqlInstanceTreeDataProvider';

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase'; import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
interface SqlInstanceGraphData extends GraphData { interface SqlInstanceGraphData extends GraphData {

View File

@@ -12,8 +12,7 @@ import { AzureResourceItemType } from '../../constants';
import { generateGuid } from '../../utils'; import { generateGuid } from '../../utils';
import { IAzureResourceService } from '../../interfaces'; import { IAzureResourceService } from '../../interfaces';
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase'; import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
import { azureResource } from 'azureResource'; import { AzureAccount, azureResource } from 'azurecore';
import { AzureAccount } from 'azurecore';
export class SqlInstanceTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> { export class SqlInstanceTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
private static readonly containerId = 'azure.resource.providers.sqlInstanceContainer'; private static readonly containerId = 'azure.resource.providers.sqlInstanceContainer';

View File

@@ -5,7 +5,7 @@
import { ExtensionContext } from 'vscode'; import { ExtensionContext } from 'vscode';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { IAzureResourceService } from '../../interfaces'; import { IAzureResourceService } from '../../interfaces';
import { SqlInstanceArcTreeDataProvider as SqlInstanceArcTreeDataProvider } from './sqlInstanceArcTreeDataProvider'; import { SqlInstanceArcTreeDataProvider as SqlInstanceArcTreeDataProvider } from './sqlInstanceArcTreeDataProvider';

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase'; import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
export interface SqlInstanceArcGraphData extends GraphData { export interface SqlInstanceArcGraphData extends GraphData {
properties: { properties: {

View File

@@ -12,8 +12,7 @@ import { AzureResourceItemType } from '../../constants';
import { generateGuid } from '../../utils'; import { generateGuid } from '../../utils';
import { IAzureResourceService } from '../../interfaces'; import { IAzureResourceService } from '../../interfaces';
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase'; import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
import { azureResource } from 'azureResource'; import { AzureAccount, azureResource } from 'azurecore';
import { AzureAccount } from 'azurecore';
export class SqlInstanceArcTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> { export class SqlInstanceArcTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
private static readonly containerId = 'azure.resource.providers.sqlInstanceArcContainer'; private static readonly containerId = 'azure.resource.providers.sqlInstanceArcContainer';

View File

@@ -5,9 +5,8 @@
import { extensions, TreeItem } from 'vscode'; import { extensions, TreeItem } from 'vscode';
import { azureResource } from 'azureResource';
import { IAzureResourceNodeWithProviderId } from './interfaces'; import { IAzureResourceNodeWithProviderId } from './interfaces';
import { AzureAccount } from 'azurecore'; import { AzureAccount, azureResource } from 'azurecore';
export class AzureResourceService { export class AzureResourceService {
private _areResourceProvidersLoaded: boolean = false; private _areResourceProvidersLoaded: boolean = false;

View File

@@ -3,8 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { AzureAccount } from 'azurecore'; import { AzureAccount, azureResource } from 'azurecore';
import { azureResource } from 'azureResource';
import { IAzureResourceSubscriptionFilterService, IAzureResourceCacheService } from '../interfaces'; import { IAzureResourceSubscriptionFilterService, IAzureResourceCacheService } from '../interfaces';
interface AzureResourceSelectedSubscriptionsCache { interface AzureResourceSelectedSubscriptionsCache {

View File

@@ -6,15 +6,13 @@
import * as azdata from 'azdata'; import * as azdata from 'azdata';
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import { SubscriptionClient } from '@azure/arm-subscriptions'; import { SubscriptionClient } from '@azure/arm-subscriptions';
import { AzureAccount, azureResource } from 'azurecore';
import { azureResource } from 'azureResource';
import { IAzureResourceSubscriptionService } from '../interfaces'; import { IAzureResourceSubscriptionService } from '../interfaces';
import { TokenCredentials } from '@azure/ms-rest-js'; import { TokenCredentials } from '@azure/ms-rest-js';
import { AzureSubscriptionError } from '../errors'; import { AzureSubscriptionError } from '../errors';
import { AzureResourceErrorMessageUtil } from '../utils'; import { AzureResourceErrorMessageUtil } from '../utils';
import * as nls from 'vscode-nls'; import * as nls from 'vscode-nls';
import { AzureAccount } from 'azurecore';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
export class AzureResourceSubscriptionService implements IAzureResourceSubscriptionService { export class AzureResourceSubscriptionService implements IAzureResourceSubscriptionService {

View File

@@ -10,7 +10,6 @@ import * as nls from 'vscode-nls';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
import { AppContext } from '../../appContext'; import { AppContext } from '../../appContext';
import { azureResource } from 'azureResource';
import { TreeNode } from '../treeNode'; import { TreeNode } from '../treeNode';
import { AzureSubscriptionError } from '../errors'; import { AzureSubscriptionError } from '../errors';
import { AzureResourceContainerTreeNodeBase } from './baseTreeNodes'; import { AzureResourceContainerTreeNodeBase } from './baseTreeNodes';
@@ -20,7 +19,7 @@ import { AzureResourceMessageTreeNode } from '../messageTreeNode';
import { AzureResourceErrorMessageUtil } from '../utils'; import { AzureResourceErrorMessageUtil } from '../utils';
import { IAzureResourceTreeChangeHandler } from './treeChangeHandler'; import { IAzureResourceTreeChangeHandler } from './treeChangeHandler';
import { IAzureResourceSubscriptionService, IAzureResourceSubscriptionFilterService } from '../../azureResource/interfaces'; import { IAzureResourceSubscriptionService, IAzureResourceSubscriptionFilterService } from '../../azureResource/interfaces';
import { AzureAccount } from 'azurecore'; import { AzureAccount, azureResource } from 'azurecore';
export class AzureResourceAccountTreeNode extends AzureResourceContainerTreeNodeBase { export class AzureResourceAccountTreeNode extends AzureResourceContainerTreeNodeBase {
public constructor( public constructor(

View File

@@ -10,14 +10,13 @@ import * as nls from 'vscode-nls';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
import { AppContext } from '../../appContext'; import { AppContext } from '../../appContext';
import { azureResource } from 'azureResource';
import { TreeNode } from '../treeNode'; import { TreeNode } from '../treeNode';
import { AzureSubscriptionError } from '../errors'; import { AzureSubscriptionError } from '../errors';
import { AzureResourceContainerTreeNodeBase } from './baseTreeNodes'; import { AzureResourceContainerTreeNodeBase } from './baseTreeNodes';
import { AzureResourceItemType, AzureResourceServiceNames } from '../constants'; import { AzureResourceItemType, AzureResourceServiceNames } from '../constants';
import { IAzureResourceTreeChangeHandler } from './treeChangeHandler'; import { IAzureResourceTreeChangeHandler } from './treeChangeHandler';
import { IAzureResourceSubscriptionService, IAzureResourceSubscriptionFilterService } from '../../azureResource/interfaces'; import { IAzureResourceSubscriptionService, IAzureResourceSubscriptionFilterService } from '../../azureResource/interfaces';
import { AzureAccount } from 'azurecore'; import { AzureAccount, azureResource } from 'azurecore';
import { AzureResourceService } from '../resourceService'; import { AzureResourceService } from '../resourceService';
import { AzureResourceResourceTreeNode } from '../resourceTreeNode'; import { AzureResourceResourceTreeNode } from '../resourceTreeNode';
import { AzureResourceErrorMessageUtil } from '../utils'; import { AzureResourceErrorMessageUtil } from '../utils';

View File

@@ -9,7 +9,6 @@ import { AppContext } from '../../appContext';
import * as nls from 'vscode-nls'; import * as nls from 'vscode-nls';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
import { azureResource } from 'azureResource';
import { TreeNode } from '../treeNode'; import { TreeNode } from '../treeNode';
import { IAzureResourceNodeWithProviderId } from '../interfaces'; import { IAzureResourceNodeWithProviderId } from '../interfaces';
import { AzureResourceContainerTreeNodeBase } from './baseTreeNodes'; import { AzureResourceContainerTreeNodeBase } from './baseTreeNodes';
@@ -19,7 +18,7 @@ import { AzureResourceMessageTreeNode } from '../messageTreeNode';
import { AzureResourceErrorMessageUtil } from '../utils'; import { AzureResourceErrorMessageUtil } from '../utils';
import { AzureResourceService } from '../resourceService'; import { AzureResourceService } from '../resourceService';
import { AzureResourceResourceTreeNode } from '../resourceTreeNode'; import { AzureResourceResourceTreeNode } from '../resourceTreeNode';
import { AzureAccount } from 'azurecore'; import { AzureAccount, azureResource } from 'azurecore';
export class AzureResourceSubscriptionTreeNode extends AzureResourceContainerTreeNodeBase { export class AzureResourceSubscriptionTreeNode extends AzureResourceContainerTreeNodeBase {
public constructor( public constructor(

View File

@@ -7,8 +7,7 @@ import { ResourceGraphClient } from '@azure/arm-resourcegraph';
import { TokenCredentials } from '@azure/ms-rest-js'; import { TokenCredentials } from '@azure/ms-rest-js';
import axios, { AxiosRequestConfig } from 'axios'; import axios, { AxiosRequestConfig } from 'axios';
import * as azdata from 'azdata'; import * as azdata from 'azdata';
import { AzureRestResponse, GetResourceGroupsResult, GetSubscriptionsResult, ResourceQueryResult, GetBlobContainersResult, GetFileSharesResult, HttpRequestMethod, GetLocationsResult, GetManagedDatabasesResult, CreateResourceGroupResult, GetBlobsResult, GetStorageAccountAccessKeyResult, AzureAccount } from 'azurecore'; import { AzureRestResponse, GetResourceGroupsResult, GetSubscriptionsResult, ResourceQueryResult, GetBlobContainersResult, GetFileSharesResult, HttpRequestMethod, GetLocationsResult, GetManagedDatabasesResult, CreateResourceGroupResult, GetBlobsResult, GetStorageAccountAccessKeyResult, AzureAccount, azureResource } from 'azurecore';
import { azureResource } from 'azureResource';
import { EOL } from 'os'; import { EOL } from 'os';
import * as nls from 'vscode-nls'; import * as nls from 'vscode-nls';
import { AppContext } from '../appContext'; import { AppContext } from '../appContext';

View File

@@ -5,7 +5,8 @@
declare module 'azurecore' { declare module 'azurecore' {
import * as azdata from 'azdata'; import * as azdata from 'azdata';
import { azureResource } from 'azureResource'; import { TreeDataProvider } from 'vscode';
import { BlobItem } from '@azure/storage-blob';
/** /**
* Covers defining what the azurecore extension exports to other extensions * Covers defining what the azurecore extension exports to other extensions
@@ -320,4 +321,151 @@ declare module 'azurecore' {
export type AzureRestResponse = { response: any, errors: Error[] }; export type AzureRestResponse = { response: any, errors: Error[] };
export type GetBlobsResult = { blobs: azureResource.Blob[], errors: Error[] }; export type GetBlobsResult = { blobs: azureResource.Blob[], errors: Error[] };
export type GetStorageAccountAccessKeyResult = { keyName1: string, keyName2: string, errors: Error[] }; export type GetStorageAccountAccessKeyResult = { keyName1: string, keyName2: string, errors: Error[] };
export namespace azureResource {
/**
* AzureCore core extension supports following resource types of Azure Resource Graph.
* To add more resources, please refer this guide: https://docs.microsoft.com/en-us/azure/governance/resource-graph/reference/supported-tables-resources
*/
export const enum AzureResourceType {
resourceGroup = 'microsoft.resources/subscriptions/resourcegroups',
sqlServer = 'microsoft.sql/servers',
sqlDatabase = 'microsoft.sql/servers/databases',
sqlManagedInstance = 'microsoft.sql/managedinstances',
azureArcSqlManagedInstance = 'microsoft.azuredata/sqlmanagedinstances',
virtualMachines = 'microsoft.compute/virtualmachines',
kustoClusters = 'microsoft.kusto/clusters',
azureArcPostgresServer = 'microsoft.azuredata/postgresinstances',
postgresServer = 'microsoft.dbforpostgresql/servers',
azureArcService = 'microsoft.azuredata/datacontrollers',
storageAccount = 'microsoft.storage/storageaccounts',
logAnalytics = 'microsoft.operationalinsights/workspaces'
}
export interface IAzureResourceProvider extends azdata.DataProvider {
getTreeDataProvider(): IAzureResourceTreeDataProvider;
}
export interface IAzureResourceTreeDataProvider extends TreeDataProvider<IAzureResourceNode> {
browseConnectionMode: boolean;
}
export interface IAzureResourceNode {
readonly account: AzureAccount;
readonly subscription: AzureResourceSubscription;
readonly tenantId: string;
readonly treeItem: azdata.TreeItem;
}
export interface IAzureSubscriptionInfo {
id: string;
name: string;
}
export interface AzureResource {
name: string;
id: string;
subscription: IAzureSubscriptionInfo;
resourceGroup?: string;
tenant?: string;
}
export interface AzureResourceSubscription extends Omit<AzureResource, 'subscription'> {
}
export interface AzureSqlResource extends AzureResource {
loginName: string;
}
export interface AzureGraphResource extends Omit<AzureResource, 'tenant' | 'subscription'> {
tenantId: string;
subscriptionId: string;
type: string;
location: string;
}
export interface AzureResourceResourceGroup extends AzureResource {
location?: string;
managedBy?: string;
properties?: {
provisioningState?: string
};
type?: string;
}
export interface AzureLocation {
id: string,
name: string,
displayName: string,
regionalDisplayName: string,
metadata: {
regionType: string,
regionCategory: string,
geographyGroup: string,
longitude: number,
latitude: number,
physicalLocation: string,
pairedRegion: {
name: string,
id: string,
}[],
},
}
export interface AzureSqlManagedInstance extends AzureGraphResource {
sku: {
capacity: number;
family: string;
name: string;
tier: 'GeneralPurpose' | 'BusinessCritical';
},
properties: {
provisioningState: string,
storageAccountType: string,
maintenanceConfigurationId: string,
state: string,
licenseType: string,
zoneRedundant: false,
fullyQualifiedDomainName: string,
collation: string,
administratorLogin: string,
minimalTlsVersion: string,
subnetId: string,
publicDataEndpointEnabled: boolean,
storageSizeInGB: number,
timezoneId: string,
proxyOverride: string,
vCores: number,
dnsZone: string,
}
}
export interface ManagedDatabase {
id: string,
location: string,
name: string,
properties: {
sourceDatabaseId: string,
status: string
},
type: string
}
export interface AzureResourceDatabase extends AzureSqlResource {
serverName: string;
serverFullName: string;
}
export interface AzureResourceDatabaseServer extends AzureSqlResource {
fullName: string;
defaultDatabaseName: string;
}
export interface BlobContainer extends AzureResource { }
export interface FileShare extends AzureResource { }
export interface Blob extends BlobItem { }
}
} }

View File

@@ -37,7 +37,6 @@ import { SqlInstanceArcProvider } from './azureResource/providers/sqlinstanceArc
import { SqlInstanceArcResourceService } from './azureResource/providers/sqlinstanceArc/sqlInstanceArcService'; import { SqlInstanceArcResourceService } from './azureResource/providers/sqlinstanceArc/sqlInstanceArcService';
import { PostgresServerArcProvider } from './azureResource/providers/postgresArcServer/postgresServerProvider'; import { PostgresServerArcProvider } from './azureResource/providers/postgresArcServer/postgresServerProvider';
import { PostgresServerArcService } from './azureResource/providers/postgresArcServer/postgresServerService'; import { PostgresServerArcService } from './azureResource/providers/postgresArcServer/postgresServerService';
import { azureResource } from 'azureResource';
import * as azurecore from 'azurecore'; import * as azurecore from 'azurecore';
import * as azureResourceUtils from './azureResource/utils'; import * as azureResourceUtils from './azureResource/utils';
import * as utils from './utils'; import * as utils from './utils';
@@ -120,15 +119,15 @@ export async function activate(context: vscode.ExtensionContext): Promise<azurec
? azureResourceUtils.getSelectedSubscriptions(appContext, account, ignoreErrors) ? azureResourceUtils.getSelectedSubscriptions(appContext, account, ignoreErrors)
: azureResourceUtils.getSubscriptions(appContext, account, ignoreErrors); : azureResourceUtils.getSubscriptions(appContext, account, ignoreErrors);
}, },
getResourceGroups(account?: azurecore.AzureAccount, subscription?: azureResource.AzureResourceSubscription, ignoreErrors?: boolean): Promise<azurecore.GetResourceGroupsResult> { return azureResourceUtils.getResourceGroups(appContext, account, subscription, ignoreErrors); }, getResourceGroups(account?: azurecore.AzureAccount, subscription?: azurecore.azureResource.AzureResourceSubscription, ignoreErrors?: boolean): Promise<azurecore.GetResourceGroupsResult> { return azureResourceUtils.getResourceGroups(appContext, account, subscription, ignoreErrors); },
getLocations(account?: azurecore.AzureAccount, getLocations(account?: azurecore.AzureAccount,
subscription?: azureResource.AzureResourceSubscription, subscription?: azurecore.azureResource.AzureResourceSubscription,
ignoreErrors?: boolean): Promise<azurecore.GetLocationsResult> { ignoreErrors?: boolean): Promise<azurecore.GetLocationsResult> {
return azureResourceUtils.getLocations(appContext, account, subscription, ignoreErrors); return azureResourceUtils.getLocations(appContext, account, subscription, ignoreErrors);
}, },
provideResources(): azureResource.IAzureResourceProvider[] { provideResources(): azurecore.azureResource.IAzureResourceProvider[] {
const arcFeaturedEnabled = vscode.workspace.getConfiguration(constants.extensionConfigSectionName).get('enableArcFeatures'); const arcFeaturedEnabled = vscode.workspace.getConfiguration(constants.extensionConfigSectionName).get('enableArcFeatures');
const providers: azureResource.IAzureResourceProvider[] = [ const providers: azurecore.azureResource.IAzureResourceProvider[] = [
new KustoProvider(new KustoResourceService(), extensionContext), new KustoProvider(new KustoResourceService(), extensionContext),
new AzureMonitorProvider(new AzureMonitorResourceService(), extensionContext), new AzureMonitorProvider(new AzureMonitorResourceService(), extensionContext),
new AzureResourceDatabaseServerProvider(new AzureResourceDatabaseServerService(), extensionContext), new AzureResourceDatabaseServerProvider(new AzureResourceDatabaseServerService(), extensionContext),
@@ -145,65 +144,65 @@ export async function activate(context: vscode.ExtensionContext): Promise<azurec
return providers; return providers;
}, },
getSqlManagedInstances(account: azurecore.AzureAccount, getSqlManagedInstances(account: azurecore.AzureAccount,
subscriptions: azureResource.AzureResourceSubscription[], subscriptions: azurecore.azureResource.AzureResourceSubscription[],
ignoreErrors: boolean): Promise<azurecore.GetSqlManagedInstancesResult> { ignoreErrors: boolean): Promise<azurecore.GetSqlManagedInstancesResult> {
return azureResourceUtils.runResourceQuery(account, subscriptions, ignoreErrors, `where type == "${azureResource.AzureResourceType.sqlManagedInstance}"`); return azureResourceUtils.runResourceQuery(account, subscriptions, ignoreErrors, `where type == "${azurecore.azureResource.AzureResourceType.sqlManagedInstance}"`);
}, },
getManagedDatabases(account: azurecore.AzureAccount, getManagedDatabases(account: azurecore.AzureAccount,
subscription: azureResource.AzureResourceSubscription, subscription: azurecore.azureResource.AzureResourceSubscription,
managedInstance: azureResource.AzureSqlManagedInstance, managedInstance: azurecore.azureResource.AzureSqlManagedInstance,
ignoreErrors: boolean): Promise<azurecore.GetManagedDatabasesResult> { ignoreErrors: boolean): Promise<azurecore.GetManagedDatabasesResult> {
return azureResourceUtils.getManagedDatabases(account, subscription, managedInstance, ignoreErrors); return azureResourceUtils.getManagedDatabases(account, subscription, managedInstance, ignoreErrors);
}, },
getSqlServers(account: azurecore.AzureAccount, getSqlServers(account: azurecore.AzureAccount,
subscriptions: azureResource.AzureResourceSubscription[], subscriptions: azurecore.azureResource.AzureResourceSubscription[],
ignoreErrors: boolean): Promise<azurecore.GetSqlServersResult> { ignoreErrors: boolean): Promise<azurecore.GetSqlServersResult> {
return azureResourceUtils.runResourceQuery(account, subscriptions, ignoreErrors, `where type == "${azureResource.AzureResourceType.sqlServer}"`); return azureResourceUtils.runResourceQuery(account, subscriptions, ignoreErrors, `where type == "${azurecore.azureResource.AzureResourceType.sqlServer}"`);
}, },
getSqlVMServers(account: azurecore.AzureAccount, getSqlVMServers(account: azurecore.AzureAccount,
subscriptions: azureResource.AzureResourceSubscription[], subscriptions: azurecore.azureResource.AzureResourceSubscription[],
ignoreErrors: boolean): Promise<azurecore.GetSqlVMServersResult> { ignoreErrors: boolean): Promise<azurecore.GetSqlVMServersResult> {
return azureResourceUtils.runResourceQuery(account, subscriptions, ignoreErrors, `where type == "${azureResource.AzureResourceType.virtualMachines}" and properties.storageProfile.imageReference.publisher == "microsoftsqlserver"`); return azureResourceUtils.runResourceQuery(account, subscriptions, ignoreErrors, `where type == "${azurecore.azureResource.AzureResourceType.virtualMachines}" and properties.storageProfile.imageReference.publisher == "microsoftsqlserver"`);
}, },
getStorageAccounts(account: azurecore.AzureAccount, getStorageAccounts(account: azurecore.AzureAccount,
subscriptions: azureResource.AzureResourceSubscription[], subscriptions: azurecore.azureResource.AzureResourceSubscription[],
ignoreErrors: boolean): Promise<azurecore.GetStorageAccountResult> { ignoreErrors: boolean): Promise<azurecore.GetStorageAccountResult> {
return azureResourceUtils.runResourceQuery(account, subscriptions, ignoreErrors, `where type == "${azureResource.AzureResourceType.storageAccount}"`); return azureResourceUtils.runResourceQuery(account, subscriptions, ignoreErrors, `where type == "${azurecore.azureResource.AzureResourceType.storageAccount}"`);
}, },
getBlobContainers(account: azurecore.AzureAccount, getBlobContainers(account: azurecore.AzureAccount,
subscription: azureResource.AzureResourceSubscription, subscription: azurecore.azureResource.AzureResourceSubscription,
storageAccount: azureResource.AzureGraphResource, storageAccount: azurecore.azureResource.AzureGraphResource,
ignoreErrors: boolean): Promise<azurecore.GetBlobContainersResult> { ignoreErrors: boolean): Promise<azurecore.GetBlobContainersResult> {
return azureResourceUtils.getBlobContainers(account, subscription, storageAccount, ignoreErrors); return azureResourceUtils.getBlobContainers(account, subscription, storageAccount, ignoreErrors);
}, },
getFileShares(account: azurecore.AzureAccount, getFileShares(account: azurecore.AzureAccount,
subscription: azureResource.AzureResourceSubscription, subscription: azurecore.azureResource.AzureResourceSubscription,
storageAccount: azureResource.AzureGraphResource, storageAccount: azurecore.azureResource.AzureGraphResource,
ignoreErrors: boolean): Promise<azurecore.GetFileSharesResult> { ignoreErrors: boolean): Promise<azurecore.GetFileSharesResult> {
return azureResourceUtils.getFileShares(account, subscription, storageAccount, ignoreErrors); return azureResourceUtils.getFileShares(account, subscription, storageAccount, ignoreErrors);
}, },
getStorageAccountAccessKey(account: azurecore.AzureAccount, getStorageAccountAccessKey(account: azurecore.AzureAccount,
subscription: azureResource.AzureResourceSubscription, subscription: azurecore.azureResource.AzureResourceSubscription,
storageAccount: azureResource.AzureGraphResource, storageAccount: azurecore.azureResource.AzureGraphResource,
ignoreErrors: boolean): Promise<azurecore.GetStorageAccountAccessKeyResult> { ignoreErrors: boolean): Promise<azurecore.GetStorageAccountAccessKeyResult> {
return azureResourceUtils.getStorageAccountAccessKey(account, subscription, storageAccount, ignoreErrors); return azureResourceUtils.getStorageAccountAccessKey(account, subscription, storageAccount, ignoreErrors);
}, },
getBlobs(account: azurecore.AzureAccount, getBlobs(account: azurecore.AzureAccount,
subscription: azureResource.AzureResourceSubscription, subscription: azurecore.azureResource.AzureResourceSubscription,
storageAccount: azureResource.AzureGraphResource, storageAccount: azurecore.azureResource.AzureGraphResource,
containerName: string, containerName: string,
ignoreErrors: boolean): Promise<azurecore.GetBlobsResult> { ignoreErrors: boolean): Promise<azurecore.GetBlobsResult> {
return azureResourceUtils.getBlobs(account, subscription, storageAccount, containerName, ignoreErrors); return azureResourceUtils.getBlobs(account, subscription, storageAccount, containerName, ignoreErrors);
}, },
createResourceGroup(account: azurecore.AzureAccount, createResourceGroup(account: azurecore.AzureAccount,
subscription: azureResource.AzureResourceSubscription, subscription: azurecore.azureResource.AzureResourceSubscription,
resourceGroupName: string, resourceGroupName: string,
location: string, location: string,
ignoreErrors: boolean): Promise<azurecore.CreateResourceGroupResult> { ignoreErrors: boolean): Promise<azurecore.CreateResourceGroupResult> {
return azureResourceUtils.createResourceGroup(account, subscription, resourceGroupName, location, ignoreErrors); return azureResourceUtils.createResourceGroup(account, subscription, resourceGroupName, location, ignoreErrors);
}, },
makeAzureRestRequest(account: azurecore.AzureAccount, makeAzureRestRequest(account: azurecore.AzureAccount,
subscription: azureResource.AzureResourceSubscription, subscription: azurecore.azureResource.AzureResourceSubscription,
path: string, path: string,
requestType: azurecore.HttpRequestMethod, requestType: azurecore.HttpRequestMethod,
requestBody: any, requestBody: any,
@@ -213,8 +212,8 @@ export async function activate(context: vscode.ExtensionContext): Promise<azurec
return azureResourceUtils.makeHttpRequest(account, subscription, path, requestType, requestBody, ignoreErrors, host, requestHeaders); return azureResourceUtils.makeHttpRequest(account, subscription, path, requestType, requestBody, ignoreErrors, host, requestHeaders);
}, },
getRegionDisplayName: utils.getRegionDisplayName, getRegionDisplayName: utils.getRegionDisplayName,
runGraphQuery<T extends azureResource.AzureGraphResource>(account: azurecore.AzureAccount, runGraphQuery<T extends azurecore.azureResource.AzureGraphResource>(account: azurecore.AzureAccount,
subscriptions: azureResource.AzureResourceSubscription[], subscriptions: azurecore.azureResource.AzureResourceSubscription[],
ignoreErrors: boolean, ignoreErrors: boolean,
query: string): Promise<azurecore.ResourceQueryResult<T>> { query: string): Promise<azurecore.ResourceQueryResult<T>> {
return azureResourceUtils.runResourceQuery(account, subscriptions, ignoreErrors, query); return azureResourceUtils.runResourceQuery(account, subscriptions, ignoreErrors, query);

View File

@@ -10,11 +10,10 @@ import * as vscode from 'vscode';
import * as sinon from 'sinon'; import * as sinon from 'sinon';
import 'mocha'; import 'mocha';
import { azureResource } from 'azureResource';
import { AzureResourceDatabaseTreeDataProvider } from '../../../../azureResource/providers/database/databaseTreeDataProvider'; import { AzureResourceDatabaseTreeDataProvider } from '../../../../azureResource/providers/database/databaseTreeDataProvider';
import { AzureResourceItemType } from '../../../../azureResource/constants'; import { AzureResourceItemType } from '../../../../azureResource/constants';
import { IAzureResourceService } from '../../../../azureResource/interfaces'; import { IAzureResourceService } from '../../../../azureResource/interfaces';
import { AzureAccount } from 'azurecore'; import { AzureAccount, azureResource } from 'azurecore';
import settings from '../../../../account-provider/providerSettings'; import settings from '../../../../account-provider/providerSettings';
// Mock services // Mock services

View File

@@ -10,7 +10,6 @@ import * as vscode from 'vscode';
import * as sinon from 'sinon'; import * as sinon from 'sinon';
import 'mocha'; import 'mocha';
import { azureResource } from 'azureResource';
import { AzureResourceDatabaseServerTreeDataProvider } from '../../../../azureResource/providers/databaseServer/databaseServerTreeDataProvider'; import { AzureResourceDatabaseServerTreeDataProvider } from '../../../../azureResource/providers/databaseServer/databaseServerTreeDataProvider';
import { AzureResourceItemType } from '../../../../azureResource/constants'; import { AzureResourceItemType } from '../../../../azureResource/constants';
import { IAzureResourceService } from '../../../../azureResource/interfaces'; import { IAzureResourceService } from '../../../../azureResource/interfaces';
@@ -19,7 +18,7 @@ import { IAzureResourceService } from '../../../../azureResource/interfaces';
let mockDatabaseServerService: TypeMoq.IMock<IAzureResourceService<azureResource.AzureResourceDatabaseServer>>; let mockDatabaseServerService: TypeMoq.IMock<IAzureResourceService<azureResource.AzureResourceDatabaseServer>>;
let mockExtensionContext: TypeMoq.IMock<vscode.ExtensionContext>; let mockExtensionContext: TypeMoq.IMock<vscode.ExtensionContext>;
import settings from '../../../../account-provider/providerSettings'; import settings from '../../../../account-provider/providerSettings';
import { AzureAccount } from 'azurecore'; import { AzureAccount, azureResource } from 'azurecore';
// Mock test data // Mock test data
const mockAccount: AzureAccount = { const mockAccount: AzureAccount = {

View File

@@ -8,9 +8,8 @@ import * as TypeMoq from 'typemoq';
import 'mocha'; import 'mocha';
import { fail } from 'assert'; import { fail } from 'assert';
import { azureResource } from 'azureResource';
import { AzureResourceService } from '../../azureResource/resourceService'; import { AzureResourceService } from '../../azureResource/resourceService';
import { AzureAccount } from 'azurecore'; import { AzureAccount, azureResource } from 'azurecore';
import settings from '../../account-provider/providerSettings'; import settings from '../../account-provider/providerSettings';
// Mock test data // Mock test data

View File

@@ -8,13 +8,12 @@ import * as TypeMoq from 'typemoq';
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import 'mocha'; import 'mocha';
import { azureResource } from 'azureResource';
import { AzureResourceService } from '../../azureResource/resourceService'; import { AzureResourceService } from '../../azureResource/resourceService';
import { AzureResourceResourceTreeNode } from '../../azureResource/resourceTreeNode'; import { AzureResourceResourceTreeNode } from '../../azureResource/resourceTreeNode';
import { AppContext } from '../../appContext'; import { AppContext } from '../../appContext';
import { AzureResourceServiceNames } from '../../azureResource/constants'; import { AzureResourceServiceNames } from '../../azureResource/constants';
import settings from '../../account-provider/providerSettings'; import settings from '../../account-provider/providerSettings';
import { AzureAccount } from 'azurecore'; import { AzureAccount, azureResource } from 'azurecore';
// Mock test data // Mock test data
const mockAccount: AzureAccount = { const mockAccount: AzureAccount = {

View File

@@ -11,7 +11,6 @@ import * as sinon from 'sinon';
import 'mocha'; import 'mocha';
import { AppContext } from '../../../appContext'; import { AppContext } from '../../../appContext';
import { azureResource } from 'azureResource';
import { import {
IAzureResourceCacheService, IAzureResourceCacheService,
IAzureResourceSubscriptionService, IAzureResourceSubscriptionService,
@@ -23,7 +22,7 @@ import { AzureResourceSubscriptionTreeNode } from '../../../azureResource/tree/s
import { AzureResourceItemType, AzureResourceServiceNames } from '../../../azureResource/constants'; import { AzureResourceItemType, AzureResourceServiceNames } from '../../../azureResource/constants';
import { AzureResourceMessageTreeNode } from '../../../azureResource/messageTreeNode'; import { AzureResourceMessageTreeNode } from '../../../azureResource/messageTreeNode';
import { generateGuid } from '../../../azureResource/utils'; import { generateGuid } from '../../../azureResource/utils';
import { AzureAccount } from 'azurecore'; import { AzureAccount, azureResource } from 'azurecore';
// Mock services // Mock services
let mockExtensionContext: TypeMoq.IMock<vscode.ExtensionContext>; let mockExtensionContext: TypeMoq.IMock<vscode.ExtensionContext>;

View File

@@ -9,7 +9,6 @@ import * as vscode from 'vscode';
import 'mocha'; import 'mocha';
import { AppContext } from '../../../appContext'; import { AppContext } from '../../../appContext';
import { azureResource } from 'azureResource';
import { IAzureResourceTreeChangeHandler } from '../../../azureResource/tree/treeChangeHandler'; import { IAzureResourceTreeChangeHandler } from '../../../azureResource/tree/treeChangeHandler';
import { AzureResourceSubscriptionTreeNode } from '../../../azureResource/tree/subscriptionTreeNode'; import { AzureResourceSubscriptionTreeNode } from '../../../azureResource/tree/subscriptionTreeNode';
import { AzureResourceItemType, AzureResourceServiceNames } from '../../../azureResource/constants'; import { AzureResourceItemType, AzureResourceServiceNames } from '../../../azureResource/constants';
@@ -17,7 +16,7 @@ import { AzureResourceService } from '../../../azureResource/resourceService';
import { AzureResourceResourceTreeNode } from '../../../azureResource/resourceTreeNode'; import { AzureResourceResourceTreeNode } from '../../../azureResource/resourceTreeNode';
import { IAzureResourceCacheService } from '../../../azureResource/interfaces'; import { IAzureResourceCacheService } from '../../../azureResource/interfaces';
import { generateGuid } from '../../../azureResource/utils'; import { generateGuid } from '../../../azureResource/utils';
import { AzureAccount } from 'azurecore'; import { AzureAccount, azureResource } from 'azurecore';
// Mock services // Mock services
let appContext: AppContext; let appContext: AppContext;

View File

@@ -3,9 +3,8 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * 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 * as loc from './localizedConstants';
import { AzureRegion } from 'azurecore'; import { AzureRegion, azureResource } from 'azurecore';
import { AppContext } from './appContext'; import { AppContext } from './appContext';
/** /**

View File

@@ -8,7 +8,6 @@ import * as vscode from 'vscode';
import * as azurecore from 'azurecore'; import * as azurecore from 'azurecore';
import { ApiWrapper } from '../common/apiWrapper'; import { ApiWrapper } from '../common/apiWrapper';
import * as constants from '../common/constants'; import * as constants from '../common/constants';
import { azureResource } from 'azureResource';
import { AzureMachineLearningWorkspaces } from '@azure/arm-machinelearningservices'; import { AzureMachineLearningWorkspaces } from '@azure/arm-machinelearningservices';
import { TokenCredentials } from '@azure/ms-rest-js'; import { TokenCredentials } from '@azure/ms-rest-js';
import { WorkspaceModels } from './workspacesModels'; import { WorkspaceModels } from './workspacesModels';
@@ -52,7 +51,7 @@ export class AzureModelRegistryService {
* Returns list of azure subscriptions * Returns list of azure subscriptions
* @param account azure account * @param account azure account
*/ */
public async getSubscriptions(account: azdata.Account | undefined): Promise<azureResource.AzureResourceSubscription[] | undefined> { public async getSubscriptions(account: azdata.Account | undefined): Promise<azurecore.azureResource.AzureResourceSubscription[] | undefined> {
const data: azurecore.GetSubscriptionsResult = await (await this._apiWrapper.getAzurecoreApi()).getSubscriptions(account, true); const data: azurecore.GetSubscriptionsResult = await (await this._apiWrapper.getAzurecoreApi()).getSubscriptions(account, true);
return data?.subscriptions; return data?.subscriptions;
} }
@@ -64,7 +63,7 @@ export class AzureModelRegistryService {
*/ */
public async getGroups( public async getGroups(
account: azdata.Account | undefined, account: azdata.Account | undefined,
subscription: azureResource.AzureResourceSubscription | undefined): Promise<azureResource.AzureResource[] | undefined> { subscription: azurecore.azureResource.AzureResourceSubscription | undefined): Promise<azurecore.azureResource.AzureResource[] | undefined> {
const data: azurecore.GetResourceGroupsResult = await (await this._apiWrapper.getAzurecoreApi()).getResourceGroups(account, subscription, true); const data: azurecore.GetResourceGroupsResult = await (await this._apiWrapper.getAzurecoreApi()).getResourceGroups(account, subscription, true);
return data?.resourceGroups; return data?.resourceGroups;
} }
@@ -77,8 +76,8 @@ export class AzureModelRegistryService {
*/ */
public async getWorkspaces( public async getWorkspaces(
account: azdata.Account, account: azdata.Account,
subscription: azureResource.AzureResourceSubscription, subscription: azurecore.azureResource.AzureResourceSubscription,
resourceGroup: azureResource.AzureResource | undefined): Promise<Workspace[]> { resourceGroup: azurecore.azureResource.AzureResource | undefined): Promise<Workspace[]> {
return await this.fetchWorkspaces(account, subscription, resourceGroup); return await this.fetchWorkspaces(account, subscription, resourceGroup);
} }
@@ -91,8 +90,8 @@ export class AzureModelRegistryService {
*/ */
public async getModels( public async getModels(
account: azdata.Account, account: azdata.Account,
subscription: azureResource.AzureResourceSubscription, subscription: azurecore.azureResource.AzureResourceSubscription,
resourceGroup: azureResource.AzureResource, resourceGroup: azurecore.azureResource.AzureResource,
workspace: Workspace): Promise<WorkspaceModel[] | undefined> { workspace: Workspace): Promise<WorkspaceModel[] | undefined> {
return await this.fetchModels(account, subscription, resourceGroup, workspace); return await this.fetchModels(account, subscription, resourceGroup, workspace);
} }
@@ -107,8 +106,8 @@ export class AzureModelRegistryService {
*/ */
public async downloadModel( public async downloadModel(
account: azdata.Account, account: azdata.Account,
subscription: azureResource.AzureResourceSubscription, subscription: azurecore.azureResource.AzureResourceSubscription,
resourceGroup: azureResource.AzureResource, resourceGroup: azurecore.azureResource.AzureResource,
workspace: Workspace, workspace: Workspace,
model: WorkspaceModel): Promise<string> { model: WorkspaceModel): Promise<string> {
let downloadedFilePath: string = ''; let downloadedFilePath: string = '';
@@ -153,7 +152,7 @@ export class AzureModelRegistryService {
return tempFilePath; return tempFilePath;
} }
private async fetchWorkspaces(account: azdata.Account, subscription: azureResource.AzureResourceSubscription, resourceGroup: azureResource.AzureResource | undefined): Promise<Workspace[]> { private async fetchWorkspaces(account: azdata.Account, subscription: azurecore.azureResource.AzureResourceSubscription, resourceGroup: azurecore.azureResource.AzureResource | undefined): Promise<Workspace[]> {
let resources: Workspace[] = []; let resources: Workspace[] = [];
try { try {
@@ -172,8 +171,8 @@ export class AzureModelRegistryService {
private async fetchModels( private async fetchModels(
account: azdata.Account, account: azdata.Account,
subscription: azureResource.AzureResourceSubscription, subscription: azurecore.azureResource.AzureResourceSubscription,
resourceGroup: azureResource.AzureResource, resourceGroup: azurecore.azureResource.AzureResource,
workspace: Workspace): Promise<WorkspaceModel[]> { workspace: Workspace): Promise<WorkspaceModel[]> {
let resources: WorkspaceModel[] = []; let resources: WorkspaceModel[] = [];
@@ -195,8 +194,8 @@ export class AzureModelRegistryService {
} }
private async fetchModelAsset( private async fetchModelAsset(
subscription: azureResource.AzureResourceSubscription, subscription: azurecore.azureResource.AzureResourceSubscription,
resourceGroup: azureResource.AzureResource, resourceGroup: azurecore.azureResource.AzureResource,
workspace: Workspace, workspace: Workspace,
model: WorkspaceModel, model: WorkspaceModel,
client: AzureMachineLearningWorkspaces): Promise<Asset> { client: AzureMachineLearningWorkspaces): Promise<Asset> {
@@ -212,8 +211,8 @@ export class AzureModelRegistryService {
private async getAssetArtifactsDownloadLinks( private async getAssetArtifactsDownloadLinks(
account: azdata.Account, account: azdata.Account,
subscription: azureResource.AzureResourceSubscription, subscription: azurecore.azureResource.AzureResourceSubscription,
resourceGroup: azureResource.AzureResource, resourceGroup: azurecore.azureResource.AzureResource,
workspace: Workspace, workspace: Workspace,
model: WorkspaceModel, model: WorkspaceModel,
tenant: any): Promise<string[]> { tenant: any): Promise<string[]> {
@@ -297,7 +296,7 @@ export class AzureModelRegistryService {
private async getAmlClient( private async getAmlClient(
account: azdata.Account, account: azdata.Account,
subscription: azureResource.AzureResourceSubscription, subscription: azurecore.azureResource.AzureResourceSubscription,
tenant: any, tenant: any,
options: AzureMachineLearningWorkspacesOptions | undefined = undefined, options: AzureMachineLearningWorkspacesOptions | undefined = undefined,
apiVersion: string | undefined = undefined): Promise<AzureMachineLearningWorkspaces> { apiVersion: string | undefined = undefined): Promise<AzureMachineLearningWorkspaces> {

View File

@@ -11,7 +11,7 @@ import * as should from 'should';
import { AzureModelRegistryService } from '../../modelManagement/azureModelRegistryService'; import { AzureModelRegistryService } from '../../modelManagement/azureModelRegistryService';
import { Config } from '../../configurations/config'; import { Config } from '../../configurations/config';
import { HttpClient } from '../../common/httpClient'; import { HttpClient } from '../../common/httpClient';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import * as utils from '../utils'; import * as utils from '../utils';
import { Workspace, WorkspacesListByResourceGroupResponse } from '@azure/arm-machinelearningservices/esm/models'; import { Workspace, WorkspacesListByResourceGroupResponse } from '@azure/arm-machinelearningservices/esm/models';

View File

@@ -5,58 +5,57 @@
import * as azdata from 'azdata'; import * as azdata from 'azdata';
import * as azurecore from 'azurecore'; import * as azurecore from 'azurecore';
import { azureResource } from 'azureResource';
export class AzurecoreApiStub implements azurecore.IExtension { export class AzurecoreApiStub implements azurecore.IExtension {
getStorageAccountAccessKey(_account: azdata.Account, _subscription: azureResource.AzureResourceSubscription, _storageAccount: azureResource.AzureGraphResource, _ignoreErrors?: boolean): Promise<azurecore.GetStorageAccountAccessKeyResult> { getStorageAccountAccessKey(_account: azdata.Account, _subscription: azurecore.azureResource.AzureResourceSubscription, _storageAccount: azurecore.azureResource.AzureGraphResource, _ignoreErrors?: boolean): Promise<azurecore.GetStorageAccountAccessKeyResult> {
throw new Error('Method not implemented.'); throw new Error('Method not implemented.');
} }
getBlobs(_account: azdata.Account, _subscription: azureResource.AzureResourceSubscription, _storageAccount: azureResource.AzureGraphResource, _containerName: string, _ignoreErrors?: boolean): Promise<azurecore.GetBlobsResult> { getBlobs(_account: azdata.Account, _subscription: azurecore.azureResource.AzureResourceSubscription, _storageAccount: azurecore.azureResource.AzureGraphResource, _containerName: string, _ignoreErrors?: boolean): Promise<azurecore.GetBlobsResult> {
throw new Error('Method not implemented.'); throw new Error('Method not implemented.');
} }
createResourceGroup(_account: azdata.Account, _subscription: azureResource.AzureResourceSubscription, _resourceGroupName: string, _location: string, _ignoreErrors?: boolean): Promise<azurecore.CreateResourceGroupResult> { createResourceGroup(_account: azdata.Account, _subscription: azurecore.azureResource.AzureResourceSubscription, _resourceGroupName: string, _location: string, _ignoreErrors?: boolean): Promise<azurecore.CreateResourceGroupResult> {
throw new Error('Method not implemented.'); throw new Error('Method not implemented.');
} }
getManagedDatabases(_account: azdata.Account, _subscription: azureResource.AzureResourceSubscription, _managedInstance: azureResource.AzureGraphResource, _ignoreErrors?: boolean): Promise<azurecore.GetManagedDatabasesResult> { getManagedDatabases(_account: azdata.Account, _subscription: azurecore.azureResource.AzureResourceSubscription, _managedInstance: azurecore.azureResource.AzureGraphResource, _ignoreErrors?: boolean): Promise<azurecore.GetManagedDatabasesResult> {
throw new Error('Method not implemented.'); throw new Error('Method not implemented.');
} }
getLocations(_account?: azdata.Account, _subscription?: azureResource.AzureResourceSubscription, _ignoreErrors?: boolean): Promise<azurecore.GetLocationsResult> { getLocations(_account?: azdata.Account, _subscription?: azurecore.azureResource.AzureResourceSubscription, _ignoreErrors?: boolean): Promise<azurecore.GetLocationsResult> {
throw new Error('Method not implemented.'); throw new Error('Method not implemented.');
} }
makeAzureRestRequest(_account: azdata.Account, _subscription: azureResource.AzureResourceSubscription, _serviceUrl: string, _requestType: azurecore.HttpRequestMethod, _requestBody?: any, _ignoreErrors?: boolean): Promise<azurecore.AzureRestResponse> { makeAzureRestRequest(_account: azdata.Account, _subscription: azurecore.azureResource.AzureResourceSubscription, _serviceUrl: string, _requestType: azurecore.HttpRequestMethod, _requestBody?: any, _ignoreErrors?: boolean): Promise<azurecore.AzureRestResponse> {
throw new Error('Method not implemented.'); throw new Error('Method not implemented.');
} }
getFileShares(_account: azdata.Account, _subscription: azureResource.AzureResourceSubscription, _storageAccount: azureResource.AzureGraphResource, _ignoreErrors?: boolean): Promise<azurecore.GetFileSharesResult> { getFileShares(_account: azdata.Account, _subscription: azurecore.azureResource.AzureResourceSubscription, _storageAccount: azurecore.azureResource.AzureGraphResource, _ignoreErrors?: boolean): Promise<azurecore.GetFileSharesResult> {
throw new Error('Method not implemented.'); throw new Error('Method not implemented.');
} }
getBlobContainers(_account: azdata.Account, _subscription: azureResource.AzureResourceSubscription, _storageAccount: azureResource.AzureGraphResource, _ignoreErrors?: boolean): Promise<azurecore.GetBlobContainersResult> { getBlobContainers(_account: azdata.Account, _subscription: azurecore.azureResource.AzureResourceSubscription, _storageAccount: azurecore.azureResource.AzureGraphResource, _ignoreErrors?: boolean): Promise<azurecore.GetBlobContainersResult> {
throw new Error('Method not implemented.'); throw new Error('Method not implemented.');
} }
getSqlManagedInstances(_account: azdata.Account, _subscriptions: azureResource.AzureResourceSubscription[], _ignoreErrors?: boolean): Promise<azurecore.GetSqlManagedInstancesResult> { getSqlManagedInstances(_account: azdata.Account, _subscriptions: azurecore.azureResource.AzureResourceSubscription[], _ignoreErrors?: boolean): Promise<azurecore.GetSqlManagedInstancesResult> {
throw new Error('Method not implemented.'); throw new Error('Method not implemented.');
} }
getSqlServers(_account: azdata.Account, _subscriptions: azureResource.AzureResourceSubscription[], _ignoreErrors?: boolean): Promise<azurecore.GetSqlServersResult> { getSqlServers(_account: azdata.Account, _subscriptions: azurecore.azureResource.AzureResourceSubscription[], _ignoreErrors?: boolean): Promise<azurecore.GetSqlServersResult> {
throw new Error('Method not implemented.'); throw new Error('Method not implemented.');
} }
getSqlVMServers(_account: azdata.Account, _subscriptions: azureResource.AzureResourceSubscription[], _ignoreErrors?: boolean): Promise<azurecore.GetSqlVMServersResult> { getSqlVMServers(_account: azdata.Account, _subscriptions: azurecore.azureResource.AzureResourceSubscription[], _ignoreErrors?: boolean): Promise<azurecore.GetSqlVMServersResult> {
throw new Error('Method not implemented.'); throw new Error('Method not implemented.');
} }
getStorageAccounts(_account: azdata.Account, _subscriptions: azureResource.AzureResourceSubscription[], _ignoreErrors?: boolean): Promise<azurecore.GetStorageAccountResult> { getStorageAccounts(_account: azdata.Account, _subscriptions: azurecore.azureResource.AzureResourceSubscription[], _ignoreErrors?: boolean): Promise<azurecore.GetStorageAccountResult> {
throw new Error('Method not implemented.'); throw new Error('Method not implemented.');
} }
runGraphQuery<T extends azureResource.AzureGraphResource>(_account: azdata.Account, _subscriptions: azureResource.AzureResourceSubscription[], _ignoreErrors: boolean, _query: string): Promise<azurecore.ResourceQueryResult<T>> { runGraphQuery<T extends azurecore.azureResource.AzureGraphResource>(_account: azdata.Account, _subscriptions: azurecore.azureResource.AzureResourceSubscription[], _ignoreErrors: boolean, _query: string): Promise<azurecore.ResourceQueryResult<T>> {
throw new Error('Method not implemented.'); throw new Error('Method not implemented.');
} }
getSubscriptions(_account?: azdata.Account | undefined, _ignoreErrors?: boolean | undefined, _selectedOnly?: boolean | undefined): Promise<azurecore.GetSubscriptionsResult> { getSubscriptions(_account?: azdata.Account | undefined, _ignoreErrors?: boolean | undefined, _selectedOnly?: boolean | undefined): Promise<azurecore.GetSubscriptionsResult> {
throw new Error('Method not implemented.'); throw new Error('Method not implemented.');
} }
getResourceGroups(_account?: azdata.Account | undefined, _subscription?: azureResource.AzureResourceSubscription | undefined, _ignoreErrors?: boolean | undefined): Promise<azurecore.GetResourceGroupsResult> { getResourceGroups(_account?: azdata.Account | undefined, _subscription?: azurecore.azureResource.AzureResourceSubscription | undefined, _ignoreErrors?: boolean | undefined): Promise<azurecore.GetResourceGroupsResult> {
throw new Error('Method not implemented.'); throw new Error('Method not implemented.');
} }
getRegionDisplayName(_region?: string | undefined): string { getRegionDisplayName(_region?: string | undefined): string {
throw new Error('Method not implemented.'); throw new Error('Method not implemented.');
} }
provideResources(): azureResource.IAzureResourceProvider[] { provideResources(): azurecore.azureResource.IAzureResourceProvider[] {
throw new Error('Method not implemented.'); throw new Error('Method not implemented.');
} }

View File

@@ -9,7 +9,7 @@ import * as TypeMoq from 'typemoq';
import 'mocha'; import 'mocha';
import { createContext } from './utils'; import { createContext } from './utils';
import { ImportedModel, ModelParameters, WorkspaceModel } from '../../../modelManagement/interfaces'; import { ImportedModel, ModelParameters, WorkspaceModel } from '../../../modelManagement/interfaces';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { Workspace } from '@azure/arm-machinelearningservices/esm/models'; import { Workspace } from '@azure/arm-machinelearningservices/esm/models';
import { ModelManagementController } from '../../../views/models/modelManagementController'; import { ModelManagementController } from '../../../views/models/modelManagementController';
import { DatabaseTable, TableColumn } from '../../../prediction/interfaces'; import { DatabaseTable, TableColumn } from '../../../prediction/interfaces';

View File

@@ -9,7 +9,7 @@ import 'mocha';
import { createContext, ParentDialog } from './utils'; import { createContext, ParentDialog } from './utils';
import { AzureModelsComponent } from '../../../views/models/azureModelsComponent'; import { AzureModelsComponent } from '../../../views/models/azureModelsComponent';
import { ListAccountsEventName, ListSubscriptionsEventName, ListGroupsEventName, ListWorkspacesEventName, ListAzureModelsEventName } from '../../../views/models/modelViewBase'; import { ListAccountsEventName, ListSubscriptionsEventName, ListGroupsEventName, ListWorkspacesEventName, ListAzureModelsEventName } from '../../../views/models/modelViewBase';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { Workspace } from '@azure/arm-machinelearningservices/esm/models'; import { Workspace } from '@azure/arm-machinelearningservices/esm/models';
import { ViewBase } from '../../../views/viewBase'; import { ViewBase } from '../../../views/viewBase';
import { WorkspaceModel } from '../../../modelManagement/interfaces'; import { WorkspaceModel } from '../../../modelManagement/interfaces';

View File

@@ -13,7 +13,7 @@ import {
} }
from '../../../views/models/modelViewBase'; from '../../../views/models/modelViewBase';
import { ImportedModel, ModelParameters, WorkspaceModel } from '../../../modelManagement/interfaces'; import { ImportedModel, ModelParameters, WorkspaceModel } from '../../../modelManagement/interfaces';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { Workspace } from '@azure/arm-machinelearningservices/esm/models'; import { Workspace } from '@azure/arm-machinelearningservices/esm/models';
import { ViewBase } from '../../../views/viewBase'; import { ViewBase } from '../../../views/viewBase';
import { PredictWizard } from '../../../views/models/prediction/predictWizard'; import { PredictWizard } from '../../../views/models/prediction/predictWizard';

View File

@@ -9,7 +9,7 @@ import 'mocha';
import { createContext } from './utils'; import { createContext } from './utils';
import { ListModelsEventName, ListAccountsEventName, ListSubscriptionsEventName, ListGroupsEventName, ListWorkspacesEventName, ListAzureModelsEventName, ModelSourceType, ListDatabaseNamesEventName, ListTableNamesEventName, VerifyImportTableEventName } from '../../../views/models/modelViewBase'; import { ListModelsEventName, ListAccountsEventName, ListSubscriptionsEventName, ListGroupsEventName, ListWorkspacesEventName, ListAzureModelsEventName, ModelSourceType, ListDatabaseNamesEventName, ListTableNamesEventName, VerifyImportTableEventName } from '../../../views/models/modelViewBase';
import { ImportedModel, WorkspaceModel } from '../../../modelManagement/interfaces'; import { ImportedModel, WorkspaceModel } from '../../../modelManagement/interfaces';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { Workspace } from '@azure/arm-machinelearningservices/esm/models'; import { Workspace } from '@azure/arm-machinelearningservices/esm/models';
import { ViewBase } from '../../../views/viewBase'; import { ViewBase } from '../../../views/viewBase';
import { ImportModelWizard } from '../../../views/models/manageModels/importModelWizard'; import { ImportModelWizard } from '../../../views/models/manageModels/importModelWizard';

View File

@@ -7,6 +7,5 @@
/// <reference path='../../../../src/sql/azdata.d.ts'/> /// <reference path='../../../../src/sql/azdata.d.ts'/>
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/> /// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
/// <reference path='../../../azurecore/src/azurecore.d.ts'/> /// <reference path='../../../azurecore/src/azurecore.d.ts'/>
/// <reference path='../../../azurecore/src/azureResource/azure-resource.d.ts'/>
/// <reference path='../../../mssql/src/mssql.d.ts'/> /// <reference path='../../../mssql/src/mssql.d.ts'/>
/// <reference types='@types/node'/> /// <reference types='@types/node'/>

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as azdata from 'azdata'; import * as azdata from 'azdata';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { Workspace } from '@azure/arm-machinelearningservices/esm/models'; import { Workspace } from '@azure/arm-machinelearningservices/esm/models';
import { WorkspaceModel } from '../modelManagement/interfaces'; import { WorkspaceModel } from '../modelManagement/interfaces';

View File

@@ -7,7 +7,7 @@ import * as vscode from 'vscode';
import * as azdata from 'azdata'; import * as azdata from 'azdata';
import { ModelViewBase } from './modelViewBase'; import { ModelViewBase } from './modelViewBase';
import { ApiWrapper } from '../../common/apiWrapper'; import { ApiWrapper } from '../../common/apiWrapper';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { Workspace } from '@azure/arm-machinelearningservices/esm/models'; import { Workspace } from '@azure/arm-machinelearningservices/esm/models';
import * as constants from '../../common/constants'; import * as constants from '../../common/constants';
import { AzureWorkspaceResource, IDataComponent } from '../interfaces'; import { AzureWorkspaceResource, IDataComponent } from '../interfaces';

View File

@@ -5,7 +5,7 @@
import * as azdata from 'azdata'; import * as azdata from 'azdata';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { ApiWrapper } from '../../common/apiWrapper'; import { ApiWrapper } from '../../common/apiWrapper';
import { AzureModelRegistryService } from '../../modelManagement/azureModelRegistryService'; import { AzureModelRegistryService } from '../../modelManagement/azureModelRegistryService';
import { Workspace } from '@azure/arm-machinelearningservices/esm/models'; import { Workspace } from '@azure/arm-machinelearningservices/esm/models';

View File

@@ -5,7 +5,7 @@
import * as azdata from 'azdata'; import * as azdata from 'azdata';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { ApiWrapper } from '../../common/apiWrapper'; import { ApiWrapper } from '../../common/apiWrapper';
import { ViewBase } from '../viewBase'; import { ViewBase } from '../viewBase';
import { ImportedModel, WorkspaceModel, ImportedModelDetails, ModelParameters } from '../../modelManagement/interfaces'; import { ImportedModel, WorkspaceModel, ImportedModelDetails, ModelParameters } from '../../modelManagement/interfaces';

View File

@@ -9,5 +9,4 @@
/// <reference path='../../../arc/src/typings/arc.d.ts'/> /// <reference path='../../../arc/src/typings/arc.d.ts'/>
/// <reference path='../../../azcli/src/typings/az-ext.d.ts'/> /// <reference path='../../../azcli/src/typings/az-ext.d.ts'/>
/// <reference path='../../../azurecore/src/azurecore.d.ts'/> /// <reference path='../../../azurecore/src/azurecore.d.ts'/>
/// <reference path='../../../azurecore/src/azureResource/azure-resource.d.ts'/>
/// <reference types='@types/node'/> /// <reference types='@types/node'/>

View File

@@ -7,7 +7,7 @@ import * as azdata from 'azdata';
import { EOL } from 'os'; import { EOL } from 'os';
import * as constants from '../constants'; import * as constants from '../constants';
import { apiService } from '../../../services/apiService'; import { apiService } from '../../../services/apiService';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import { BasePage } from './basePage'; import { BasePage } from './basePage';
import * as nls from 'vscode-nls'; import * as nls from 'vscode-nls';

View File

@@ -6,7 +6,7 @@
import * as azdata from 'azdata'; import * as azdata from 'azdata';
import * as constants from '../constants'; import * as constants from '../constants';
import { apiService } from '../../../services/apiService'; import { apiService } from '../../../services/apiService';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import * as localizedConstants from '../../../localizedConstants'; import * as localizedConstants from '../../../localizedConstants';
import { BasePage } from './basePage'; import { BasePage } from './basePage';

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information. * Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as azdata from 'azdata'; import * as azdata from 'azdata';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import * as fs from 'fs'; import * as fs from 'fs';
import { EOL } from 'os'; import { EOL } from 'os';
import * as path from 'path'; import * as path from 'path';

View File

@@ -6,7 +6,6 @@
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import * as azdata from 'azdata'; import * as azdata from 'azdata';
import * as azurecore from 'azurecore'; import * as azurecore from 'azurecore';
import { azureResource } from 'azureResource';
import * as constants from '../constants/strings'; import * as constants from '../constants/strings';
import { getSessionIdHeader } from './utils'; import { getSessionIdHeader } from './utils';
import { ProvisioningState } from '../models/migrationLocalStorage'; import { ProvisioningState } from '../models/migrationLocalStorage';
@@ -19,7 +18,7 @@ async function getAzureCoreAPI(): Promise<azurecore.IExtension> {
return api; return api;
} }
export type Subscription = azureResource.AzureResourceSubscription; export type Subscription = azurecore.azureResource.AzureResourceSubscription;
export async function getSubscriptions(account: azdata.Account): Promise<Subscription[]> { export async function getSubscriptions(account: azdata.Account): Promise<Subscription[]> {
const api = await getAzureCoreAPI(); const api = await getAzureCoreAPI();
const subscriptions = await api.getSubscriptions(account, false); const subscriptions = await api.getSubscriptions(account, false);
@@ -28,7 +27,7 @@ export async function getSubscriptions(account: azdata.Account): Promise<Subscri
return subscriptions.subscriptions; return subscriptions.subscriptions;
} }
export async function getLocations(account: azdata.Account, subscription: Subscription): Promise<azureResource.AzureLocation[]> { export async function getLocations(account: azdata.Account, subscription: Subscription): Promise<azurecore.azureResource.AzureLocation[]> {
const api = await getAzureCoreAPI(); const api = await getAzureCoreAPI();
const response = await api.getLocations(account, subscription, true); const response = await api.getLocations(account, subscription, true);
const dataMigrationResourceProvider = (await api.makeAzureRestRequest(account, subscription, `/subscriptions/${subscription.id}/providers/Microsoft.DataMigration?api-version=2021-04-01`, azurecore.HttpRequestMethod.GET)).response.data; const dataMigrationResourceProvider = (await api.makeAzureRestRequest(account, subscription, `/subscriptions/${subscription.id}/providers/Microsoft.DataMigration?api-version=2021-04-01`, azurecore.HttpRequestMethod.GET)).response.data;
@@ -47,22 +46,22 @@ export async function getLocations(account: azdata.Account, subscription: Subscr
return filteredLocations; return filteredLocations;
} }
export type AzureProduct = azureResource.AzureGraphResource; export type AzureProduct = azurecore.azureResource.AzureGraphResource;
export async function getResourceGroups(account: azdata.Account, subscription: Subscription): Promise<azureResource.AzureResourceResourceGroup[]> { export async function getResourceGroups(account: azdata.Account, subscription: Subscription): Promise<azurecore.azureResource.AzureResourceResourceGroup[]> {
const api = await getAzureCoreAPI(); const api = await getAzureCoreAPI();
const result = await api.getResourceGroups(account, subscription, true); const result = await api.getResourceGroups(account, subscription, true);
sortResourceArrayByName(result.resourceGroups); sortResourceArrayByName(result.resourceGroups);
return result.resourceGroups; return result.resourceGroups;
} }
export async function createResourceGroup(account: azdata.Account, subscription: Subscription, resourceGroupName: string, location: string): Promise<azureResource.AzureResourceResourceGroup> { export async function createResourceGroup(account: azdata.Account, subscription: Subscription, resourceGroupName: string, location: string): Promise<azurecore.azureResource.AzureResourceResourceGroup> {
const api = await getAzureCoreAPI(); const api = await getAzureCoreAPI();
const result = await api.createResourceGroup(account, subscription, resourceGroupName, location, false); const result = await api.createResourceGroup(account, subscription, resourceGroupName, location, false);
return result.resourceGroup; return result.resourceGroup;
} }
export type SqlManagedInstance = azureResource.AzureSqlManagedInstance; export type SqlManagedInstance = azurecore.azureResource.AzureSqlManagedInstance;
export async function getAvailableManagedInstanceProducts(account: azdata.Account, subscription: Subscription): Promise<SqlManagedInstance[]> { export async function getAvailableManagedInstanceProducts(account: azdata.Account, subscription: Subscription): Promise<SqlManagedInstance[]> {
const api = await getAzureCoreAPI(); const api = await getAzureCoreAPI();
const result = await api.getSqlManagedInstances(account, [subscription], false); const result = await api.getSqlManagedInstances(account, [subscription], false);
@@ -70,7 +69,7 @@ export async function getAvailableManagedInstanceProducts(account: azdata.Accoun
return result.resources; return result.resources;
} }
export async function getSqlManagedInstanceDatabases(account: azdata.Account, subscription: Subscription, managedInstance: SqlManagedInstance): Promise<azureResource.ManagedDatabase[]> { export async function getSqlManagedInstanceDatabases(account: azdata.Account, subscription: Subscription, managedInstance: SqlManagedInstance): Promise<azurecore.azureResource.ManagedDatabase[]> {
const api = await getAzureCoreAPI(); const api = await getAzureCoreAPI();
const result = await api.getManagedDatabases(account, subscription, managedInstance, false); const result = await api.getManagedDatabases(account, subscription, managedInstance, false);
sortResourceArrayByName(result.databases); sortResourceArrayByName(result.databases);
@@ -118,7 +117,7 @@ export async function getAvailableStorageAccounts(account: azdata.Account, subsc
return result.resources; return result.resources;
} }
export async function getFileShares(account: azdata.Account, subscription: Subscription, storageAccount: StorageAccount): Promise<azureResource.FileShare[]> { export async function getFileShares(account: azdata.Account, subscription: Subscription, storageAccount: StorageAccount): Promise<azurecore.azureResource.FileShare[]> {
const api = await getAzureCoreAPI(); const api = await getAzureCoreAPI();
let result = await api.getFileShares(account, subscription, storageAccount, true); let result = await api.getFileShares(account, subscription, storageAccount, true);
let fileShares = result.fileShares; let fileShares = result.fileShares;
@@ -126,7 +125,7 @@ export async function getFileShares(account: azdata.Account, subscription: Subsc
return fileShares!; return fileShares!;
} }
export async function getBlobContainers(account: azdata.Account, subscription: Subscription, storageAccount: StorageAccount): Promise<azureResource.BlobContainer[]> { export async function getBlobContainers(account: azdata.Account, subscription: Subscription, storageAccount: StorageAccount): Promise<azurecore.azureResource.BlobContainer[]> {
const api = await getAzureCoreAPI(); const api = await getAzureCoreAPI();
let result = await api.getBlobContainers(account, subscription, storageAccount, true); let result = await api.getBlobContainers(account, subscription, storageAccount, true);
let blobContainers = result.blobContainers; let blobContainers = result.blobContainers;
@@ -134,7 +133,7 @@ export async function getBlobContainers(account: azdata.Account, subscription: S
return blobContainers!; return blobContainers!;
} }
export async function getBlobs(account: azdata.Account, subscription: Subscription, storageAccount: StorageAccount, containerName: string): Promise<azureResource.Blob[]> { export async function getBlobs(account: azdata.Account, subscription: Subscription, storageAccount: StorageAccount, containerName: string): Promise<azurecore.azureResource.Blob[]> {
const api = await getAzureCoreAPI(); const api = await getAzureCoreAPI();
let result = await api.getBlobs(account, subscription, storageAccount, containerName, true); let result = await api.getBlobs(account, subscription, storageAccount, containerName, true);
let blobNames = result.blobs; let blobNames = result.blobs;
@@ -361,7 +360,7 @@ export async function getLocationDisplayName(location: string): Promise<string>
return await api.getRegionDisplayName(location); return await api.getRegionDisplayName(location);
} }
type SortableAzureResources = AzureProduct | azureResource.FileShare | azureResource.BlobContainer | azureResource.Blob | azureResource.AzureResourceSubscription | SqlMigrationService; type SortableAzureResources = AzureProduct | azurecore.azureResource.FileShare | azurecore.azureResource.BlobContainer | azurecore.azureResource.Blob | azurecore.azureResource.AzureResourceSubscription | SqlMigrationService;
export function sortResourceArrayByName(resourceArray: SortableAzureResources[]): void { export function sortResourceArrayByName(resourceArray: SortableAzureResources[]): void {
if (!resourceArray) { if (!resourceArray) {
return; return;

View File

@@ -5,7 +5,7 @@
import * as azdata from 'azdata'; import * as azdata from 'azdata';
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { EventEmitter } from 'events'; import { EventEmitter } from 'events';
import { createResourceGroup } from '../../api/azure'; import { createResourceGroup } from '../../api/azure';
import * as constants from '../../constants/strings'; import * as constants from '../../constants/strings';

View File

@@ -10,7 +10,7 @@ import { MigrationStateModel, NetworkContainerType } from '../../models/stateMac
import { logError, TelemetryViews } from '../../telemtery'; import { logError, TelemetryViews } from '../../telemtery';
import * as constants from '../../constants/strings'; import * as constants from '../../constants/strings';
import * as os from 'os'; import * as os from 'os';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { IconPathHelper } from '../../constants/iconPathHelper'; import { IconPathHelper } from '../../constants/iconPathHelper';
import { CreateResourceGroupDialog } from '../createResourceGroup/createResourceGroupDialog'; import { CreateResourceGroupDialog } from '../createResourceGroup/createResourceGroupDialog';
import { createAuthenticationKeyTable } from '../../wizard/integrationRuntimePage'; import { createAuthenticationKeyTable } from '../../wizard/integrationRuntimePage';

View File

@@ -6,7 +6,7 @@
import * as azdata from 'azdata'; import * as azdata from 'azdata';
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import * as mssql from 'mssql'; import * as mssql from 'mssql';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
import { getLocations, getResourceGroupFromId, getBlobContainerId, getFullResourceGroupFromId, getResourceName, DatabaseMigration, getMigrationTargetInstance } from '../../api/azure'; import { getLocations, getResourceGroupFromId, getBlobContainerId, getFullResourceGroupFromId, getResourceName, DatabaseMigration, getMigrationTargetInstance } from '../../api/azure';
import { MigrationMode, MigrationStateModel, NetworkContainerType, SavedInfo } from '../../models/stateMachine'; import { MigrationMode, MigrationStateModel, NetworkContainerType, SavedInfo } from '../../models/stateMachine';
import { MigrationServiceContext } from '../../models/migrationLocalStorage'; import { MigrationServiceContext } from '../../models/migrationLocalStorage';

View File

@@ -7,7 +7,6 @@ import * as azdata from 'azdata';
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import * as azurecore from 'azurecore'; import * as azurecore from 'azurecore';
import { MigrationLocalStorage, MigrationServiceContext } from '../../models/migrationLocalStorage'; import { MigrationLocalStorage, MigrationServiceContext } from '../../models/migrationLocalStorage';
import { azureResource } from 'azureResource';
import * as styles from '../../constants/styles'; import * as styles from '../../constants/styles';
import * as constants from '../../constants/strings'; import * as constants from '../../constants/strings';
import { findDropDownItemIndex, selectDefaultDropdownValue, deepClone } from '../../api/utils'; import { findDropDownItemIndex, selectDefaultDropdownValue, deepClone } from '../../api/utils';
@@ -42,9 +41,9 @@ export class SelectMigrationServiceDialog {
private _serviceContext!: MigrationServiceContext; private _serviceContext!: MigrationServiceContext;
private _azureAccounts!: azdata.Account[]; private _azureAccounts!: azdata.Account[];
private _accountTenants!: azurecore.Tenant[]; private _accountTenants!: azurecore.Tenant[];
private _subscriptions!: azureResource.AzureResourceSubscription[]; private _subscriptions!: azurecore.azureResource.AzureResourceSubscription[];
private _locations!: azureResource.AzureLocation[]; private _locations!: azurecore.azureResource.AzureLocation[];
private _resourceGroups!: azureResource.AzureResourceResourceGroup[]; private _resourceGroups!: azurecore.azureResource.AzureResourceResourceGroup[];
private _sqlMigrationServices!: SqlMigrationService[]; private _sqlMigrationServices!: SqlMigrationService[];
private _azureAccountsDropdown!: azdata.DropDownComponent; private _azureAccountsDropdown!: azdata.DropDownComponent;
private _accountTenantDropdown!: azdata.DropDownComponent; private _accountTenantDropdown!: azdata.DropDownComponent;
@@ -521,8 +520,8 @@ export class SelectMigrationServiceDialog {
private async _getAzureLocationDropdownValues( private async _getAzureLocationDropdownValues(
account?: azdata.Account, account?: azdata.Account,
subscription?: azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> { subscription?: azurecore.azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
let locations: azureResource.AzureLocation[] = []; let locations: azurecore.azureResource.AzureLocation[] = [];
if (account && subscription) { if (account && subscription) {
// get all available locations // get all available locations
locations = await getLocations(account, subscription); locations = await getLocations(account, subscription);
@@ -546,7 +545,7 @@ export class SelectMigrationServiceDialog {
}); });
} }
private async _getAzureResourceGroupDropdownValues(location?: azureResource.AzureLocation): Promise<azdata.CategoryValue[]> { private async _getAzureResourceGroupDropdownValues(location?: azurecore.azureResource.AzureLocation): Promise<azdata.CategoryValue[]> {
this._resourceGroups = location this._resourceGroups = location
? this._getMigrationServicesResourceGroups(location) ? this._getMigrationServicesResourceGroups(location)
: []; : [];
@@ -559,7 +558,7 @@ export class SelectMigrationServiceDialog {
}); });
} }
private _getMigrationServicesResourceGroups(location?: azureResource.AzureLocation): azureResource.AzureResourceResourceGroup[] { private _getMigrationServicesResourceGroups(location?: azurecore.azureResource.AzureLocation): azurecore.azureResource.AzureResourceResourceGroup[] {
const resourceGroups = this._sqlMigrationServices const resourceGroups = this._sqlMigrationServices
.filter(service => service.location === location?.name) .filter(service => service.location === location?.name)
.map(service => service.properties.resourceGroup); .map(service => service.properties.resourceGroup);
@@ -567,7 +566,7 @@ export class SelectMigrationServiceDialog {
return resourceGroups return resourceGroups
.filter((rg, i, arr) => arr.indexOf(rg) === i) .filter((rg, i, arr) => arr.indexOf(rg) === i)
.map(rg => { .map(rg => {
return <azureResource.AzureResourceResourceGroup>{ return <azurecore.azureResource.AzureResourceResourceGroup>{
id: getFullResourceGroupFromId(rg), id: getFullResourceGroupFromId(rg),
name: rg, name: rg,
}; };
@@ -576,9 +575,9 @@ export class SelectMigrationServiceDialog {
private async _getMigrationServiceDropdownValues( private async _getMigrationServiceDropdownValues(
account?: azdata.Account, account?: azdata.Account,
subscription?: azureResource.AzureResourceSubscription, subscription?: azurecore.azureResource.AzureResourceSubscription,
location?: azureResource.AzureLocation, location?: azurecore.azureResource.AzureLocation,
resourceGroup?: azureResource.AzureResourceResourceGroup): Promise<azdata.CategoryValue[]> { resourceGroup?: azurecore.azureResource.AzureResourceResourceGroup): Promise<azdata.CategoryValue[]> {
const locationName = location?.name?.toLowerCase(); const locationName = location?.name?.toLowerCase();
const resourceGroupName = resourceGroup?.name?.toLowerCase(); const resourceGroupName = resourceGroup?.name?.toLowerCase();

View File

@@ -5,7 +5,6 @@
import * as azdata from 'azdata'; import * as azdata from 'azdata';
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import * as azurecore from 'azurecore'; import * as azurecore from 'azurecore';
import { azureResource } from 'azureResource';
import { DatabaseMigration, SqlMigrationService, getSubscriptions, getServiceMigrations } from '../api/azure'; import { DatabaseMigration, SqlMigrationService, getSubscriptions, getServiceMigrations } from '../api/azure';
import { deepClone } from '../api/utils'; import { deepClone } from '../api/utils';
import * as loc from '../constants/strings'; import * as loc from '../constants/strings';
@@ -83,9 +82,9 @@ export async function getCurrentMigrations(): Promise<DatabaseMigration[]> {
export interface MigrationServiceContext { export interface MigrationServiceContext {
azureAccount?: azdata.Account, azureAccount?: azdata.Account,
tenant?: azurecore.Tenant, tenant?: azurecore.Tenant,
subscription?: azureResource.AzureResourceSubscription, subscription?: azurecore.azureResource.AzureResourceSubscription,
location?: azureResource.AzureLocation, location?: azurecore.azureResource.AzureLocation,
resourceGroup?: azureResource.AzureResourceResourceGroup, resourceGroup?: azurecore.azureResource.AzureResourceResourceGroup,
migrationService?: SqlMigrationService, migrationService?: SqlMigrationService,
} }

View File

@@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as azdata from 'azdata'; import * as azdata from 'azdata';
import { azureResource } from 'azureResource';
import * as azurecore from 'azurecore'; import * as azurecore from 'azurecore';
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import * as mssql from 'mssql'; import * as mssql from 'mssql';
@@ -88,7 +87,7 @@ export interface DatabaseBackupModel {
migrationMode: MigrationMode; migrationMode: MigrationMode;
networkContainerType: NetworkContainerType; networkContainerType: NetworkContainerType;
networkShares: NetworkShare[]; networkShares: NetworkShare[];
subscription: azureResource.AzureResourceSubscription; subscription: azurecore.azureResource.AzureResourceSubscription;
blobs: Blob[]; blobs: Blob[];
} }
@@ -96,15 +95,15 @@ export interface NetworkShare {
networkShareLocation: string; networkShareLocation: string;
windowsUser: string; windowsUser: string;
password: string; password: string;
resourceGroup: azureResource.AzureResourceResourceGroup; resourceGroup: azurecore.azureResource.AzureResourceResourceGroup;
storageAccount: StorageAccount; storageAccount: StorageAccount;
storageKey: string; storageKey: string;
} }
export interface Blob { export interface Blob {
resourceGroup: azureResource.AzureResourceResourceGroup; resourceGroup: azurecore.azureResource.AzureResourceResourceGroup;
storageAccount: StorageAccount; storageAccount: StorageAccount;
blobContainer: azureResource.BlobContainer; blobContainer: azurecore.azureResource.BlobContainer;
storageKey: string; storageKey: string;
lastBackupFile?: string; // _todo: does it make sense to store the last backup file here? lastBackupFile?: string; // _todo: does it make sense to store the last backup file here?
} }
@@ -129,10 +128,10 @@ export interface SavedInfo {
migrationTargetType: MigrationTargetType | null; migrationTargetType: MigrationTargetType | null;
azureAccount: azdata.Account | null; azureAccount: azdata.Account | null;
azureTenant: azurecore.Tenant | null; azureTenant: azurecore.Tenant | null;
subscription: azureResource.AzureResourceSubscription | null; subscription: azurecore.azureResource.AzureResourceSubscription | null;
location: azureResource.AzureLocation | null; location: azurecore.azureResource.AzureLocation | null;
resourceGroup: azureResource.AzureResourceResourceGroup | null; resourceGroup: azurecore.azureResource.AzureResourceResourceGroup | null;
targetServerInstance: azureResource.AzureSqlManagedInstance | SqlVMServer | null; targetServerInstance: azurecore.azureResource.AzureSqlManagedInstance | SqlVMServer | null;
migrationMode: MigrationMode | null; migrationMode: MigrationMode | null;
networkContainerType: NetworkContainerType | null; networkContainerType: NetworkContainerType | null;
networkShares: NetworkShare[]; networkShares: NetworkShare[];
@@ -164,20 +163,20 @@ export class MigrationStateModel implements Model, vscode.Disposable {
public _sqlServerUsername!: string; public _sqlServerUsername!: string;
public _sqlServerPassword!: string; public _sqlServerPassword!: string;
public _subscriptions!: azureResource.AzureResourceSubscription[]; public _subscriptions!: azurecore.azureResource.AzureResourceSubscription[];
public _targetSubscription!: azureResource.AzureResourceSubscription; public _targetSubscription!: azurecore.azureResource.AzureResourceSubscription;
public _locations!: azureResource.AzureLocation[]; public _locations!: azurecore.azureResource.AzureLocation[];
public _location!: azureResource.AzureLocation; public _location!: azurecore.azureResource.AzureLocation;
public _resourceGroups!: azureResource.AzureResourceResourceGroup[]; public _resourceGroups!: azurecore.azureResource.AzureResourceResourceGroup[];
public _resourceGroup!: azureResource.AzureResourceResourceGroup; public _resourceGroup!: azurecore.azureResource.AzureResourceResourceGroup;
public _targetManagedInstances!: SqlManagedInstance[]; public _targetManagedInstances!: SqlManagedInstance[];
public _targetSqlVirtualMachines!: SqlVMServer[]; public _targetSqlVirtualMachines!: SqlVMServer[];
public _targetServerInstance!: SqlManagedInstance | SqlVMServer; public _targetServerInstance!: SqlManagedInstance | SqlVMServer;
public _databaseBackup!: DatabaseBackupModel; public _databaseBackup!: DatabaseBackupModel;
public _storageAccounts!: StorageAccount[]; public _storageAccounts!: StorageAccount[];
public _fileShares!: azureResource.FileShare[]; public _fileShares!: azurecore.azureResource.FileShare[];
public _blobContainers!: azureResource.BlobContainer[]; public _blobContainers!: azurecore.azureResource.BlobContainer[];
public _lastFileNames!: azureResource.Blob[]; public _lastFileNames!: azurecore.azureResource.Blob[];
public _sourceDatabaseNames!: string[]; public _sourceDatabaseNames!: string[];
public _targetDatabaseNames!: string[]; public _targetDatabaseNames!: string[];
@@ -912,11 +911,11 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return subscriptionsValues; return subscriptionsValues;
} }
public getSubscription(index: number): azureResource.AzureResourceSubscription { public getSubscription(index: number): azurecore.azureResource.AzureResourceSubscription {
return this._subscriptions[index]; return this._subscriptions[index];
} }
public async getAzureLocationDropdownValues(subscription: azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> { public async getAzureLocationDropdownValues(subscription: azurecore.azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
let locationValues: azdata.CategoryValue[] = []; let locationValues: azdata.CategoryValue[] = [];
try { try {
if (this._azureAccount && subscription) { if (this._azureAccount && subscription) {
@@ -953,7 +952,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return locationValues; return locationValues;
} }
public getLocation(index: number): azureResource.AzureLocation { public getLocation(index: number): azurecore.azureResource.AzureLocation {
return this._locations[index]; return this._locations[index];
} }
@@ -961,7 +960,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return getLocationDisplayName(location); return getLocationDisplayName(location);
} }
public async getAzureResourceGroupDropdownValues(subscription: azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> { public async getAzureResourceGroupDropdownValues(subscription: azurecore.azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
let resourceGroupValues: azdata.CategoryValue[] = []; let resourceGroupValues: azdata.CategoryValue[] = [];
try { try {
if (this._azureAccount && subscription) { if (this._azureAccount && subscription) {
@@ -995,13 +994,13 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return resourceGroupValues; return resourceGroupValues;
} }
public async getAzureResourceGroupForManagedInstancesDropdownValues(subscription: azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> { public async getAzureResourceGroupForManagedInstancesDropdownValues(subscription: azurecore.azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
let resourceGroupValues: azdata.CategoryValue[] = []; let resourceGroupValues: azdata.CategoryValue[] = [];
try { try {
if (this._azureAccount && subscription) { if (this._azureAccount && subscription) {
let managedInstances = await getAvailableManagedInstanceProducts(this._azureAccount, subscription); let managedInstances = await getAvailableManagedInstanceProducts(this._azureAccount, subscription);
this._resourceGroups = managedInstances.map((mi) => { this._resourceGroups = managedInstances.map((mi) => {
return <azureResource.AzureResourceResourceGroup>{ return <azurecore.azureResource.AzureResourceResourceGroup>{
id: getFullResourceGroupFromId(mi.id), id: getFullResourceGroupFromId(mi.id),
name: getResourceGroupFromId(mi.id), name: getResourceGroupFromId(mi.id),
subscription: { subscription: {
@@ -1045,13 +1044,13 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return resourceGroupValues; return resourceGroupValues;
} }
public async getAzureResourceGroupForVirtualMachinesDropdownValues(subscription: azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> { public async getAzureResourceGroupForVirtualMachinesDropdownValues(subscription: azurecore.azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
let resourceGroupValues: azdata.CategoryValue[] = []; let resourceGroupValues: azdata.CategoryValue[] = [];
try { try {
if (this._azureAccount && subscription) { if (this._azureAccount && subscription) {
let virtualMachines = await getAvailableSqlVMs(this._azureAccount, subscription); let virtualMachines = await getAvailableSqlVMs(this._azureAccount, subscription);
this._resourceGroups = virtualMachines.map((vm) => { this._resourceGroups = virtualMachines.map((vm) => {
return <azureResource.AzureResourceResourceGroup>{ return <azurecore.azureResource.AzureResourceResourceGroup>{
id: getFullResourceGroupFromId(vm.id), id: getFullResourceGroupFromId(vm.id),
name: getResourceGroupFromId(vm.id), name: getResourceGroupFromId(vm.id),
subscription: { subscription: {
@@ -1095,13 +1094,13 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return resourceGroupValues; return resourceGroupValues;
} }
public async getAzureResourceGroupForStorageAccountsDropdownValues(subscription: azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> { public async getAzureResourceGroupForStorageAccountsDropdownValues(subscription: azurecore.azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
let resourceGroupValues: azdata.CategoryValue[] = []; let resourceGroupValues: azdata.CategoryValue[] = [];
try { try {
if (this._azureAccount && subscription) { if (this._azureAccount && subscription) {
let storageAccounts = await getAvailableStorageAccounts(this._azureAccount, subscription); let storageAccounts = await getAvailableStorageAccounts(this._azureAccount, subscription);
this._resourceGroups = storageAccounts.map((sa) => { this._resourceGroups = storageAccounts.map((sa) => {
return <azureResource.AzureResourceResourceGroup>{ return <azurecore.azureResource.AzureResourceResourceGroup>{
id: getFullResourceGroupFromId(sa.id), id: getFullResourceGroupFromId(sa.id),
name: getResourceGroupFromId(sa.id), name: getResourceGroupFromId(sa.id),
subscription: { subscription: {
@@ -1145,13 +1144,13 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return resourceGroupValues; return resourceGroupValues;
} }
public async getAzureResourceGroupForSqlMigrationServicesDropdownValues(subscription: azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> { public async getAzureResourceGroupForSqlMigrationServicesDropdownValues(subscription: azurecore.azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
let resourceGroupValues: azdata.CategoryValue[] = []; let resourceGroupValues: azdata.CategoryValue[] = [];
try { try {
if (this._azureAccount && subscription) { if (this._azureAccount && subscription) {
let dmsInstances = await getSqlMigrationServices(this._azureAccount, subscription); let dmsInstances = await getSqlMigrationServices(this._azureAccount, subscription);
this._resourceGroups = dmsInstances.map((dms) => { this._resourceGroups = dmsInstances.map((dms) => {
return <azureResource.AzureResourceResourceGroup>{ return <azurecore.azureResource.AzureResourceResourceGroup>{
id: getFullResourceGroupFromId(dms.id), id: getFullResourceGroupFromId(dms.id),
name: getResourceGroupFromId(dms.id), name: getResourceGroupFromId(dms.id),
subscription: { subscription: {
@@ -1194,11 +1193,11 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return resourceGroupValues; return resourceGroupValues;
} }
public getAzureResourceGroup(index: number): azureResource.AzureResourceResourceGroup { public getAzureResourceGroup(index: number): azurecore.azureResource.AzureResourceResourceGroup {
return this._resourceGroups[index]; return this._resourceGroups[index];
} }
public async getManagedInstanceValues(subscription: azureResource.AzureResourceSubscription, location: azureResource.AzureLocation, resourceGroup: azureResource.AzureResourceResourceGroup): Promise<azdata.CategoryValue[]> { public async getManagedInstanceValues(subscription: azurecore.azureResource.AzureResourceSubscription, location: azurecore.azureResource.AzureLocation, resourceGroup: azurecore.azureResource.AzureResourceResourceGroup): Promise<azdata.CategoryValue[]> {
let managedInstanceValues: azdata.CategoryValue[] = []; let managedInstanceValues: azdata.CategoryValue[] = [];
try { try {
if (this._azureAccount && subscription && location && resourceGroup) { if (this._azureAccount && subscription && location && resourceGroup) {
@@ -1260,7 +1259,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
<SqlManagedInstance>this._targetServerInstance)).map(t => t.name); <SqlManagedInstance>this._targetServerInstance)).map(t => t.name);
} }
public async getSqlVirtualMachineValues(subscription: azureResource.AzureResourceSubscription, location: azureResource.AzureLocation, resourceGroup: azureResource.AzureResourceResourceGroup): Promise<azdata.CategoryValue[]> { public async getSqlVirtualMachineValues(subscription: azurecore.azureResource.AzureResourceSubscription, location: azurecore.azureResource.AzureLocation, resourceGroup: azurecore.azureResource.AzureResourceResourceGroup): Promise<azdata.CategoryValue[]> {
let virtualMachineValues: azdata.CategoryValue[] = []; let virtualMachineValues: azdata.CategoryValue[] = [];
try { try {
if (this._azureAccount && subscription && location && resourceGroup) { if (this._azureAccount && subscription && location && resourceGroup) {
@@ -1308,7 +1307,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return this._targetSqlVirtualMachines[index]; return this._targetSqlVirtualMachines[index];
} }
public async getStorageAccountValues(subscription: azureResource.AzureResourceSubscription, resourceGroup: azureResource.AzureResourceResourceGroup): Promise<azdata.CategoryValue[]> { public async getStorageAccountValues(subscription: azurecore.azureResource.AzureResourceSubscription, resourceGroup: azurecore.azureResource.AzureResourceResourceGroup): Promise<azdata.CategoryValue[]> {
let storageAccountValues: azdata.CategoryValue[] = []; let storageAccountValues: azdata.CategoryValue[] = [];
if (!resourceGroup) { if (!resourceGroup) {
return storageAccountValues; return storageAccountValues;
@@ -1354,7 +1353,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return this._storageAccounts[index]; return this._storageAccounts[index];
} }
public async getFileShareValues(subscription: azureResource.AzureResourceSubscription, storageAccount: StorageAccount): Promise<azdata.CategoryValue[]> { public async getFileShareValues(subscription: azurecore.azureResource.AzureResourceSubscription, storageAccount: StorageAccount): Promise<azdata.CategoryValue[]> {
let fileShareValues: azdata.CategoryValue[] = []; let fileShareValues: azdata.CategoryValue[] = [];
try { try {
if (this._azureAccount && subscription && storageAccount) { if (this._azureAccount && subscription && storageAccount) {
@@ -1390,11 +1389,11 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return fileShareValues; return fileShareValues;
} }
public getFileShare(index: number): azureResource.FileShare { public getFileShare(index: number): azurecore.azureResource.FileShare {
return this._fileShares[index]; return this._fileShares[index];
} }
public async getBlobContainerValues(subscription: azureResource.AzureResourceSubscription, storageAccount: StorageAccount): Promise<azdata.CategoryValue[]> { public async getBlobContainerValues(subscription: azurecore.azureResource.AzureResourceSubscription, storageAccount: StorageAccount): Promise<azdata.CategoryValue[]> {
let blobContainerValues: azdata.CategoryValue[] = []; let blobContainerValues: azdata.CategoryValue[] = [];
try { try {
if (this._azureAccount && subscription && storageAccount) { if (this._azureAccount && subscription && storageAccount) {
@@ -1430,11 +1429,11 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return blobContainerValues; return blobContainerValues;
} }
public getBlobContainer(index: number): azureResource.BlobContainer { public getBlobContainer(index: number): azurecore.azureResource.BlobContainer {
return this._blobContainers[index]; return this._blobContainers[index];
} }
public async getBlobLastBackupFileNameValues(subscription: azureResource.AzureResourceSubscription, storageAccount: StorageAccount, blobContainer: azureResource.BlobContainer): Promise<azdata.CategoryValue[]> { public async getBlobLastBackupFileNameValues(subscription: azurecore.azureResource.AzureResourceSubscription, storageAccount: StorageAccount, blobContainer: azurecore.azureResource.BlobContainer): Promise<azdata.CategoryValue[]> {
let blobLastBackupFileValues: azdata.CategoryValue[] = []; let blobLastBackupFileValues: azdata.CategoryValue[] = [];
try { try {
if (this._azureAccount && subscription && storageAccount && blobContainer) { if (this._azureAccount && subscription && storageAccount && blobContainer) {
@@ -1474,7 +1473,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return this._lastFileNames[index]?.name; return this._lastFileNames[index]?.name;
} }
public async getSqlMigrationServiceValues(subscription: azureResource.AzureResourceSubscription, resourceGroupName: string): Promise<azdata.CategoryValue[]> { public async getSqlMigrationServiceValues(subscription: azurecore.azureResource.AzureResourceSubscription, resourceGroupName: string): Promise<azdata.CategoryValue[]> {
let sqlMigrationServiceValues: azdata.CategoryValue[] = []; let sqlMigrationServiceValues: azdata.CategoryValue[] = [];
try { try {
if (this._azureAccount && subscription && resourceGroupName && this._targetServerInstance) { if (this._azureAccount && subscription && resourceGroupName && this._targetServerInstance) {

View File

@@ -7,6 +7,5 @@
/// <reference path='../../../../src/sql/azdata.d.ts'/> /// <reference path='../../../../src/sql/azdata.d.ts'/>
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/> /// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
/// <reference path='../../../azurecore/src/azurecore.d.ts'/> /// <reference path='../../../azurecore/src/azurecore.d.ts'/>
/// <reference path='../../../azurecore/src/azureResource/azure-resource.d.ts'/>
/// <reference path='../../../mssql/src/mssql.d.ts'/> /// <reference path='../../../mssql/src/mssql.d.ts'/>
/// <reference types='@types/node'/> /// <reference types='@types/node'/>

View File

@@ -12,7 +12,7 @@ import * as constants from '../constants/strings';
import * as styles from '../constants/styles'; import * as styles from '../constants/styles';
import { WIZARD_INPUT_COMPONENT_WIDTH } from './wizardController'; import { WIZARD_INPUT_COMPONENT_WIDTH } from './wizardController';
import { deepClone, findDropDownItemIndex, selectDropDownIndex, selectDefaultDropdownValue } from '../api/utils'; import { deepClone, findDropDownItemIndex, selectDropDownIndex, selectDefaultDropdownValue } from '../api/utils';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
export class TargetSelectionPage extends MigrationWizardPage { export class TargetSelectionPage extends MigrationWizardPage {
private _view!: azdata.ModelView; private _view!: azdata.ModelView;

View File

@@ -18,7 +18,7 @@ import { DatabaseSelectorPage } from './databaseSelectorPage';
import { sendSqlMigrationActionEvent, TelemetryAction, TelemetryViews, logError } from '../telemtery'; import { sendSqlMigrationActionEvent, TelemetryAction, TelemetryViews, logError } from '../telemtery';
import * as styles from '../constants/styles'; import * as styles from '../constants/styles';
import { MigrationLocalStorage, MigrationServiceContext } from '../models/migrationLocalStorage'; import { MigrationLocalStorage, MigrationServiceContext } from '../models/migrationLocalStorage';
import { azureResource } from 'azureResource'; import { azureResource } from 'azurecore';
export const WIZARD_INPUT_COMPONENT_WIDTH = '600px'; export const WIZARD_INPUT_COMPONENT_WIDTH = '600px';
export class WizardController { export class WizardController {