mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Fix for getting auth token for Kusto resource (#16773)
* Fix for getting auth token for Kusto resource * Addressed comment Co-authored-by: hhh <gfhg>
This commit is contained in:
@@ -77,6 +77,10 @@ export abstract class AzureAuth implements vscode.Disposable {
|
|||||||
this.resources = this.resources.concat(this.metadata.settings.azureLogAnalyticsResource);
|
this.resources = this.resources.concat(this.metadata.settings.azureLogAnalyticsResource);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.metadata.settings.azureKustoResource) {
|
||||||
|
this.resources = this.resources.concat(this.metadata.settings.azureKustoResource);
|
||||||
|
}
|
||||||
|
|
||||||
this.scopes = [...this.metadata.settings.scopes];
|
this.scopes = [...this.metadata.settings.scopes];
|
||||||
this.scopesString = this.scopes.join(' ');
|
this.scopesString = this.scopes.join(' ');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ const enum SettingIds {
|
|||||||
vault = 'vault',
|
vault = 'vault',
|
||||||
ado = 'ado',
|
ado = 'ado',
|
||||||
ala = 'ala',
|
ala = 'ala',
|
||||||
storage = 'storage'
|
storage = 'storage',
|
||||||
|
kusto = 'kusto'
|
||||||
}
|
}
|
||||||
|
|
||||||
const publicAzureSettings: ProviderSettings = {
|
const publicAzureSettings: ProviderSettings = {
|
||||||
@@ -81,6 +82,11 @@ const publicAzureSettings: ProviderSettings = {
|
|||||||
endpointSuffix: '.core.windows.net',
|
endpointSuffix: '.core.windows.net',
|
||||||
azureResourceId: AzureResource.AzureStorage
|
azureResourceId: AzureResource.AzureStorage
|
||||||
},
|
},
|
||||||
|
azureKustoResource: {
|
||||||
|
id: SettingIds.kusto,
|
||||||
|
endpoint: 'https://api.kusto.io',
|
||||||
|
azureResourceId: AzureResource.AzureKusto,
|
||||||
|
},
|
||||||
redirectUri: 'https://vscode-redirect.azurewebsites.net/',
|
redirectUri: 'https://vscode-redirect.azurewebsites.net/',
|
||||||
scopes: [
|
scopes: [
|
||||||
'openid', 'email', 'profile', 'offline_access',
|
'openid', 'email', 'profile', 'offline_access',
|
||||||
|
|||||||
5
extensions/azurecore/src/azurecore.d.ts
vendored
5
extensions/azurecore/src/azurecore.d.ts
vendored
@@ -118,6 +118,11 @@ declare module 'azurecore' {
|
|||||||
*/
|
*/
|
||||||
azureDevOpsResource?: Resource;
|
azureDevOpsResource?: Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Information that describes the Azure Kusto resource
|
||||||
|
*/
|
||||||
|
azureKustoResource?: Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Information that describes the Azure Log Analytics resource
|
* Information that describes the Azure Log Analytics resource
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -217,6 +217,7 @@
|
|||||||
"languageMode": "kusto",
|
"languageMode": "kusto",
|
||||||
"notebookKernelAlias": "Kusto",
|
"notebookKernelAlias": "Kusto",
|
||||||
"displayName": "%kusto.provider.displayName%",
|
"displayName": "%kusto.provider.displayName%",
|
||||||
|
"azureResource": "AzureKusto",
|
||||||
"iconPath": [
|
"iconPath": [
|
||||||
{
|
{
|
||||||
"id": "kusto:cloud",
|
"id": "kusto:cloud",
|
||||||
|
|||||||
6
src/sql/azdata.proposed.d.ts
vendored
6
src/sql/azdata.proposed.d.ts
vendored
@@ -861,7 +861,11 @@ declare module 'azdata' {
|
|||||||
/**
|
/**
|
||||||
* Azure Storage
|
* Azure Storage
|
||||||
*/
|
*/
|
||||||
AzureStorage = 9
|
AzureStorage = 9,
|
||||||
|
/**
|
||||||
|
* Kusto
|
||||||
|
*/
|
||||||
|
AzureKusto = 10
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ButtonProperties {
|
export interface ButtonProperties {
|
||||||
|
|||||||
@@ -58,7 +58,9 @@ export enum AzureResource {
|
|||||||
MicrosoftResourceManagement = 5,
|
MicrosoftResourceManagement = 5,
|
||||||
AzureDevOps = 6,
|
AzureDevOps = 6,
|
||||||
MsGraph = 7,
|
MsGraph = 7,
|
||||||
AzureLogAnalytics = 8
|
AzureLogAnalytics = 8,
|
||||||
|
AzureStorage = 9,
|
||||||
|
AzureKusto = 10
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IAccountStore {
|
export interface IAccountStore {
|
||||||
|
|||||||
@@ -438,7 +438,8 @@ export enum AzureResource {
|
|||||||
AzureDevOps = 6,
|
AzureDevOps = 6,
|
||||||
MsGraph = 7,
|
MsGraph = 7,
|
||||||
AzureLogAnalytics = 8,
|
AzureLogAnalytics = 8,
|
||||||
AzureStorage = 9
|
AzureStorage = 9,
|
||||||
|
AzureKusto = 10
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TreeItem extends vsExtTypes.TreeItem {
|
export class TreeItem extends vsExtTypes.TreeItem {
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
|||||||
|
|
||||||
private static readonly CONNECTION_MEMENTO = 'ConnectionManagement';
|
private static readonly CONNECTION_MEMENTO = 'ConnectionManagement';
|
||||||
private static readonly _azureResources: AzureResource[] =
|
private static readonly _azureResources: AzureResource[] =
|
||||||
[AzureResource.ResourceManagement, AzureResource.Sql, AzureResource.OssRdbms, AzureResource.AzureLogAnalytics];
|
[AzureResource.ResourceManagement, AzureResource.Sql, AzureResource.OssRdbms, AzureResource.AzureLogAnalytics, AzureResource.AzureKusto];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@IConnectionDialogService private _connectionDialogService: IConnectionDialogService,
|
@IConnectionDialogService private _connectionDialogService: IConnectionDialogService,
|
||||||
|
|||||||
Reference in New Issue
Block a user