mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add support for new endpoint key string 'gateway' (#4954)
This commit is contained in:
@@ -13,7 +13,8 @@ export const extensionConfigSectionName = 'mssql';
|
||||
|
||||
// DATA PROTOCOL VALUES ///////////////////////////////////////////////////////////
|
||||
export const mssqlClusterProviderName = 'mssqlCluster';
|
||||
export const hadoopKnoxEndpointName = 'Knox';
|
||||
export const hadoopEndpointNameKnox = 'Knox';
|
||||
export const hadoopEndpointNameGateway = 'gateway';
|
||||
export const protocolVersion = '1.0';
|
||||
export const hostPropName = 'host';
|
||||
export const userPropName = 'user';
|
||||
|
||||
@@ -79,7 +79,11 @@ async function createSqlClusterConnInfo(sqlConnInfo: azdata.IConnectionProfile |
|
||||
let endpoints: IEndpoint[] = serverInfo.options[constants.clusterEndpointsProperty];
|
||||
if (!endpoints || endpoints.length === 0) { return undefined; }
|
||||
|
||||
let index = endpoints.findIndex(ep => ep.serviceName === constants.hadoopKnoxEndpointName);
|
||||
let index = endpoints.findIndex(ep => {
|
||||
let serviceName: string = ep.serviceName.toLowerCase();
|
||||
return serviceName === constants.hadoopEndpointNameKnox.toLowerCase() ||
|
||||
serviceName === constants.hadoopEndpointNameGateway.toLowerCase();
|
||||
});
|
||||
if (index < 0) { return undefined; }
|
||||
|
||||
let credentials = await azdata.connection.getCredentials(connectionId);
|
||||
|
||||
Reference in New Issue
Block a user