Rename nodeType name in order to have file context menu in both mssql and SqlOpsStudio (#3862)

* Added data service context menu: file related operations. All new files are ported from SqlOpsStudio. Will remove these functionality from SqlOpsStudio.

* Used the existing constant hadoopKnoxEndpointName

* Rename nodeType name from hdfs to bdc. So we can have file context menu in both mssql and SqlOpsStudio. Need to add "Create External Table from CSV" support for bdc nodeType

* Rename bdc to mssqlcluster
This commit is contained in:
Yurong He
2019-01-31 13:34:59 -08:00
committed by GitHub
parent 90d8c37f91
commit ecac6201d0
20 changed files with 715 additions and 56 deletions

View File

@@ -21,7 +21,7 @@ import { AppContext } from '../appContext';
import * as constants from '../constants';
const outputChannel = vscode.window.createOutputChannel(constants.providerId);
interface IEndpoint {
export interface IEndpoint {
serviceName: string;
ipAddress: string;
port: number;
@@ -209,7 +209,7 @@ export class MssqlObjectExplorerNodeProvider extends ProviderBase implements sql
async findNodeForContext<T extends TreeNode>(explorerContext: sqlops.ObjectExplorerContext): Promise<T> {
let node: T = undefined;
let session = this.findSessionForConnection(explorerContext.connectionProfile);
let session = await this.findSessionForConnection(explorerContext.connectionProfile);
if (session) {
if (explorerContext.isConnectionNode) {
// Note: ideally fix so we verify T matches RootNode and go from there
@@ -222,9 +222,9 @@ export class MssqlObjectExplorerNodeProvider extends ProviderBase implements sql
return node;
}
private findSessionForConnection(connectionProfile: sqlops.IConnectionProfile): Session {
private async findSessionForConnection(connectionProfile: sqlops.IConnectionProfile): Promise<Session> {
for (let session of this.sessionMap.values()) {
if (session.connection && session.connection.isMatch(connectionProfile)) {
if (session.connection && await session.connection.isMatch(connectionProfile)) {
return session;
}
}