mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
@@ -48,6 +48,9 @@ export class MssqlObjectExplorerNodeProvider extends ProviderBase implements azd
|
|||||||
let sqlConnProfile = await azdata.objectexplorer.getSessionConnectionProfile(session.sessionId);
|
let sqlConnProfile = await azdata.objectexplorer.getSessionConnectionProfile(session.sessionId);
|
||||||
if (!sqlConnProfile) { return false; }
|
if (!sqlConnProfile) { return false; }
|
||||||
|
|
||||||
|
const isBigDataCluster = await utils.isBigDataCluster(sqlConnProfile.id);
|
||||||
|
if (!isBigDataCluster) { return false; }
|
||||||
|
|
||||||
let clusterSession = new SqlClusterSession(session, sqlConnProfile, this.appContext, this);
|
let clusterSession = new SqlClusterSession(session, sqlConnProfile, this.appContext, this);
|
||||||
this.clusterSessionMap.set(session.sessionId, clusterSession);
|
this.clusterSessionMap.set(session.sessionId, clusterSession);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -240,6 +240,12 @@ export function getClusterEndpoints(serverInfo: azdata.ServerInfo): bdc.IEndpoin
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function isBigDataCluster(connectionId: string): Promise<boolean> {
|
||||||
|
const serverInfo = await azdata.connection.getServerInfo(connectionId);
|
||||||
|
|
||||||
|
return !!serverInfo?.options?.[constants.isBigDataClusterProperty];
|
||||||
|
}
|
||||||
|
|
||||||
export type HostAndIp = { host: string, port: string };
|
export type HostAndIp = { host: string, port: string };
|
||||||
|
|
||||||
export function getHostAndPortFromEndpoint(endpoint: string): HostAndIp {
|
export function getHostAndPortFromEndpoint(endpoint: string): HostAndIp {
|
||||||
|
|||||||
Reference in New Issue
Block a user