Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions localization/xliff/vscode-mssql.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4463,6 +4463,9 @@
<trans-unit id="mssql.walkthroughs.nextSteps.sortAndFilterQueryResults.description">
<source xml:lang="en">Sort and filter your query results to find the data you need quickly.</source>
</trans-unit>
<trans-unit id="mssql.customEnvironment.dynamicsCrmDnsSuffix">
<source xml:lang="en">Sovereign cloud equivalent for `.crm.dynamics.com` (including leading dot)</source>
</trans-unit>
<trans-unit id="mssql.customEnvironment.fabricSqlDbDnsSuffix">
<source xml:lang="en">Sovereign cloud equivalent for `.database.fabric.microsoft.com` (including leading dot)</source>
</trans-unit>
Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2127,6 +2127,13 @@
"null"
],
"description": "%mssql.customEnvironment.fabricDataWarehouseDnsSuffix%"
},
"dynamicsCrmDnsSuffix": {
"type": [
"string",
"null"
],
"description": "%mssql.customEnvironment.dynamicsCrmDnsSuffix%"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,5 +254,6 @@
"mssql.customEnvironment.fabricApiUriBase": "Sovereign cloud equivalent for `https://api.fabric.microsoft.com/v1/`",
"mssql.customEnvironment.fabricScopeUriBase": "Sovereign cloud equivalent for `https://analysis.windows.net/powerbi/api/`",
"mssql.customEnvironment.fabricSqlDbDnsSuffix": "Sovereign cloud equivalent for `.database.fabric.microsoft.com` (including leading dot)",
"mssql.customEnvironment.fabricDataWarehouseDnsSuffix": "Sovereign cloud equivalent for `.datawarehouse.fabric.microsoft.com` (including leading dot)"
"mssql.customEnvironment.fabricDataWarehouseDnsSuffix": "Sovereign cloud equivalent for `.datawarehouse.fabric.microsoft.com` (including leading dot)",
"mssql.customEnvironment.dynamicsCrmDnsSuffix": "Sovereign cloud equivalent for `.crm.dynamics.com` (including leading dot)"
}
13 changes: 13 additions & 0 deletions src/azure/providerSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ export const publicAzureProviderSettings: IProviderSettings = {
sqlDbDnsSuffix: ".database.fabric.microsoft.com",
dataWarehouseDnsSuffix: ".datawarehouse.fabric.microsoft.com",
},
dataverse: {
dynamicsCrmDnsSuffix: ".crm.dynamics.com",
},
scopes: [
"openid",
"email",
Expand Down Expand Up @@ -120,6 +123,9 @@ const usGovernmentCloudProviderSettings: IProviderSettings = {
sqlDbDnsSuffix: undefined,
dataWarehouseDnsSuffix: undefined,
},
dataverse: {
dynamicsCrmDnsSuffix: undefined,
},
scopes: [
"openid",
"email",
Expand Down Expand Up @@ -166,6 +172,9 @@ const chinaCloudProviderSettings: IProviderSettings = {
sqlDbDnsSuffix: undefined,
dataWarehouseDnsSuffix: undefined,
},
dataverse: {
dynamicsCrmDnsSuffix: undefined,
},
scopes: [
"openid",
"email",
Expand All @@ -185,6 +194,7 @@ interface MssqlEnvironmentAdditions {
fabricScopeUriBase?: string;
fabricSqlDbDnsSuffix?: string;
fabricDataWarehouseDnsSuffix?: string;
dynamicsCrmDnsSuffix?: string;
}

interface MssqlEnvironment extends AzureEnvironments.Environment, MssqlEnvironmentAdditions {
Expand Down Expand Up @@ -241,6 +251,9 @@ function getCustomCloudProviderSettings(): IProviderSettings {
sqlDbDnsSuffix: customCloud.fabricSqlDbDnsSuffix,
dataWarehouseDnsSuffix: customCloud.fabricDataWarehouseDnsSuffix,
},
dataverse: {
dynamicsCrmDnsSuffix: customCloud.dynamicsCrmDnsSuffix,
},
scopes: [
"openid",
"email",
Expand Down
5 changes: 5 additions & 0 deletions src/models/connectionInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ export function getConnectionDisplayName(connection: IConnectionInfo): string {
export enum ServerType {
Azure = "Azure",
Fabric = "Fabric",
Dynamics = "Dynamics",
Sql = "SQL",
DataWarehouse = "DataWarehouse",
Local = "Local",
Expand Down Expand Up @@ -332,6 +333,10 @@ export function getServerTypes(connection: IConnectionInfo, account?: IAccount):
ServerType.Fabric,
ServerType.DataWarehouse,
],
[providerSettings.dataverse.dynamicsCrmDnsSuffix]: [
ServerType.Dynamics,
ServerType.Sql,
],
};

for (const [name, types] of Object.entries(typeMappings)) {
Expand Down
3 changes: 3 additions & 0 deletions src/models/contracts/azure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ export interface IProviderSettings {
sqlDbDnsSuffix: string;
dataWarehouseDnsSuffix: string;
};
dataverse: {
dynamicsCrmDnsSuffix: string;
};
}

export interface IProviderResources {
Expand Down
4 changes: 4 additions & 0 deletions test/unit/connectionInfo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ test("getServerTypes", () => {
input: "test.ppe-datawarehouse.fabric.microsoft.com",
expected: [ServerType.Fabric, ServerType.DataWarehouse],
},
{
input: "test.crm.dynamics.com",
expected: [ServerType.Dynamics, ServerType.Sql],
},

{ input: "localhost", expected: [ServerType.Local, ServerType.Sql] },
{ input: "localhost,1234", expected: [ServerType.Local, ServerType.Sql] },
Expand Down
3 changes: 3 additions & 0 deletions typings/vscode-mssql.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,9 @@ declare module "vscode-mssql" {
sqlDbDnsSuffix: string;
dataWarehouseDnsSuffix: string;
};
dataverse: {
dynamicsCrmDnsSuffix: string;
};
}

export interface IProviderResources {
Expand Down