Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
nturinski committed Jul 21, 2022
1 parent 87458e4 commit c2faa45
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
11 changes: 9 additions & 2 deletions appservice/src/createAppService/AppInsightsCreateStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,15 @@ export class AppInsightsCreateStep extends AzureWizardExecuteStep<IAppServiceWiz
ext.outputChannel.appendLog(creatingNewAppInsights);
progress.report({ message: creatingNewAppInsights });

context.appInsightsComponent = await client.components.createOrUpdate(rgName, aiName, { kind: 'web', applicationType: 'web', location: appInsightsLocation,
workspaceResourceId: context.logAnalyticsWorkspace?.id});
context.appInsightsComponent = await client.components.createOrUpdate(
rgName,
aiName,
{
kind: 'web',
applicationType: 'web',
location: appInsightsLocation,
workspaceResourceId: context.logAnalyticsWorkspace?.id
});
const createdNewAppInsights: string = localize('createdNewAppInsights', 'Successfully created Application Insights resource "{0}".', aiName);
ext.outputChannel.appendLog(createdNewAppInsights);
} else if (pError.errorType === 'AuthorizationFailed') {
Expand Down
4 changes: 2 additions & 2 deletions appservice/src/createAppService/IAppServiceWizardContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { ApplicationInsightsComponent } from '@azure/arm-appinsights';
import type { ApplicationInsightsComponent } from '@azure/arm-appinsights';
import type { AppServicePlan, Site, SkuDescription } from '@azure/arm-appservice';
import type { Workspace } from '@azure/arm-operationalinsights';
import { IResourceGroupWizardContext, IStorageAccountWizardContext } from '@microsoft/vscode-azext-azureutils';
Expand Down Expand Up @@ -95,7 +95,7 @@ export interface IAppServiceWizardContext extends IResourceGroupWizardContext, I
* it will look for a workspace within the same resource group and location as the App Insight
* component. If neither conditions are met, then it will automatically create a workspace
*/
logAnalyticsWorkspace?: Workspace;
logAnalyticsWorkspace?: Workspace;

/**
* Indicates advanced creation should be used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import type { Provider } from '@azure/arm-resources';
import { ResourceManagementClient, ProviderResourceType } from "@azure/arm-resources";
import { ServiceClient, HttpOperationResponse } from "@azure/ms-rest-js";
import type { Provider, ProviderResourceType, ResourceManagementClient } from '@azure/arm-resources';
import type { HttpOperationResponse, ServiceClient } from "@azure/ms-rest-js";
import { AzExtLocation, createGenericClient } from "@microsoft/vscode-azext-azureutils";
import { nonNullProp, IActionContext } from "@microsoft/vscode-azext-utils";
import { IActionContext, nonNullProp } from "@microsoft/vscode-azext-utils";
import { createResourceClient } from "../utils/azureClients";
import { areLocationNamesEqual } from "../utils/azureUtils";
import { IAppServiceWizardContext } from "./IAppServiceWizardContext";
Expand Down Expand Up @@ -64,12 +63,12 @@ async function getLocations(context: IAppServiceWizardContext): Promise<string[]
}

type RegionMappingJsonResponse = {
regions: {
[key: string]: RegionMap
}
regions: {
[key: string]: RegionMap
}
};

type RegionMap = {
geo: string,
pairedRegions: string[]
geo: string,
pairedRegions: string[]
};

0 comments on commit c2faa45

Please sign in to comment.