mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Arc bug fix: ADS Create DC wizard should prompt for Log Analytics workspace ID and access token similar to portal (#18742)
* Added monitor log-analytics workspace list to az api * Made resource group and subscription optional for logs analytics workspace list * Added dynamic fields for workspace names, id, primary key, based on value of auto-logs checkbox * Hooked up the newly created source provider for log analytics workspaces. Dropdown now populates all workspace names. * Added workspaceUtils.ts for a valueprovider. Now workspace name maps to id automatically. * Replaced promise.all with promise.resolve * Added workspace id and primary key as env variables in the notebook * Removed extra space in package.json * Made getOptions more concise and put azApi definition in function. * Changed notebook to handle new Azure CLI command with param --clustername
This commit is contained in:
@@ -15,6 +15,8 @@ import { AzureArcTreeDataProvider } from './ui/tree/azureArcTreeDataProvider';
|
||||
import { ControllerTreeNode } from './ui/tree/controllerTreeNode';
|
||||
import { TreeNode } from './ui/tree/treeNode';
|
||||
import * as pricing from './common/pricingUtils';
|
||||
import * as workspace from './common/workspaceUtils';
|
||||
import { LogAnalyticsWorkspaceOptionsSourceProvider } from './providers/logAnalyticsWorkspaceOptionsSourceProvider';
|
||||
|
||||
export async function activate(context: vscode.ExtensionContext): Promise<arc.IExtension> {
|
||||
IconPathHelper.setExtensionContext(context);
|
||||
@@ -61,6 +63,15 @@ export async function activate(context: vscode.ExtensionContext): Promise<arc.IE
|
||||
// register option sources
|
||||
const rdApi = <rd.IExtension>vscode.extensions.getExtension(rd.extension.name)?.exports;
|
||||
context.subscriptions.push(rdApi.registerOptionsSourceProvider(new ArcControllersOptionsSourceProvider(treeDataProvider)));
|
||||
context.subscriptions.push(rdApi.registerOptionsSourceProvider(new LogAnalyticsWorkspaceOptionsSourceProvider()));
|
||||
|
||||
// Register valueprovider for getting the Log Analytics workspace id from the workspace name.
|
||||
context.subscriptions.push(rdApi.registerValueProvider({
|
||||
id: 'workspace-name-to-id',
|
||||
getValue: async (triggerFields: { [key: string]: rd.InputValueType }) => {
|
||||
return workspace.getWorkspaceIdFromName(triggerFields);
|
||||
}
|
||||
}));
|
||||
|
||||
// Register valueprovider for getting the calculated cost per VCore.
|
||||
context.subscriptions.push(rdApi.registerValueProvider({
|
||||
|
||||
Reference in New Issue
Block a user