Azure extension changes (#4987)

* removed search box

* removed commented code

# Conflicts:
#	src/sql/parts/objectExplorer/viewlet/serverTreeView.ts
This commit is contained in:
Aditya Bist
2019-04-11 09:44:43 -07:00
committed by Chris LaFreniere
parent afce60b06f
commit 01892422cb
8 changed files with 55 additions and 56 deletions

View File

@@ -109,6 +109,14 @@
{
"command": "mssqlCluster.livy.cmd.submitFileToSparkJob",
"title": "%title.submitSparkJob%"
},
{
"command": "mssql.searchServers",
"title": "%title.searchServers%"
},
{
"command": "mssql.clearSearchServerResult",
"title": "%title.clearSearchServerResult%"
}
],
"outputChannels": [

View File

@@ -24,5 +24,8 @@
"title.openYarnHistory": "View Yarn History",
"title.tasks": "Tasks",
"title.installPackages": "Install Packages",
"title.configurePython": "Configure Python for Notebooks"
"title.configurePython": "Configure Python for Notebooks",
"title.searchServers": "Search: Servers",
"title.clearSearchServerResult": "Search: Clear Search Server Results"
}

View File

@@ -32,6 +32,7 @@ import { OpenSparkJobSubmissionDialogCommand, OpenSparkJobSubmissionDialogFromFi
import { OpenSparkYarnHistoryTask } from './sparkFeature/historyTask';
import { MssqlObjectExplorerNodeProvider, mssqlOutputChannel } from './objectExplorerNodeProvider/objectExplorerNodeProvider';
import { CmsService } from './cms/cmsService';
import { registerSearchServerCommand } from './objectExplorerNodeProvider/command';
const baseConfig = require('./config.json');
const outputChannel = vscode.window.createOutputChannel(Constants.serviceName);
@@ -120,6 +121,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<MssqlE
vscode.window.showErrorMessage('Failed to start Sql tools service');
});
registerSearchServerCommand(appContext);
let contextProvider = new ContextProvider();
context.subscriptions.push(contextProvider);
context.subscriptions.push(credentialsStore);

View File

@@ -174,3 +174,18 @@ export abstract class ProgressCommand extends Command {
});
}
}
export function registerSearchServerCommand(appContext: AppContext): void {
appContext.apiWrapper.registerCommand('mssql.searchServers', () => {
vscode.window.showInputBox({
placeHolder: localize('mssql.searchServers', 'Search Server Names')
}).then((stringSearch) => {
if (stringSearch) {
vscode.commands.executeCommand('registeredServers.searchServer', (stringSearch));
}
});
});
appContext.apiWrapper.registerCommand('mssql.clearSearchServerResult', () => {
vscode.commands.executeCommand('registeredServers.clearSearchServerResult');
});
}