Disable Manage Packages button if python is not installed (#6008)

This commit is contained in:
Cory Rivera
2019-06-17 18:28:16 -07:00
committed by GitHub
parent 59b0e6737f
commit cecc899949
5 changed files with 16 additions and 17 deletions

View File

@@ -5,6 +5,7 @@
import * as vscode from 'vscode';
import * as azdata from 'azdata';
import { CommandContext, BuiltInCommands } from './constants';
/**
* Wrapper class to act as a facade over VSCode and Data APIs and allow us to test / mock callbacks into
@@ -56,6 +57,10 @@ export class ApiWrapper {
azdata.tasks.startBackgroundOperation(operationInfo);
}
public setCommandContext(key: CommandContext | string, value: any): Thenable<any> {
return vscode.commands.executeCommand(BuiltInCommands.SetContext, key, value);
}
/**
* Get the configuration for a extensionName
* @param extensionName The string name of the extension to get the configuration for

View File

@@ -6,37 +6,23 @@
'use strict';
// CONFIG VALUES ///////////////////////////////////////////////////////////
export const extensionConfigSectionName = 'dataManagement';
export const extensionOutputChannel = 'Notebooks';
export const configLogDebugInfo = 'logDebugInfo';
// JUPYTER CONFIG //////////////////////////////////////////////////////////
export const pythonBundleVersion = '0.0.1';
export const pythonVersion = '3.6.6';
export const sparkMagicVersion = '0.12.6.1';
export const python3 = 'python3';
export const pysparkkernel = 'pysparkkernel';
export const sparkkernel = 'sparkkernel';
export const pyspark3kernel = 'pyspark3kernel';
export const python3DisplayName = 'Python 3';
export const defaultSparkKernel = 'pyspark3kernel';
export const pythonPathConfigKey = 'pythonPath';
export const existingPythonConfigKey = 'useExistingPython';
export const notebookConfigKey = 'notebook';
export const hdfsHost = 'host';
export const hdfsUser = 'user';
export const winPlatform = 'win32';
export const jupyterNotebookProviderId = 'jupyter';
export const jupyterConfigRootFolder = 'jupyter_config';
export const jupyterKernelsMasterFolder = 'kernels_master';
export const jupyterNewNotebookTask = 'jupyter.task.newNotebook';
export const jupyterOpenNotebookTask = 'jupyter.task.openNotebook';
export const jupyterNewNotebookCommand = 'jupyter.cmd.newNotebook';
export const jupyterCommandSetContext = 'jupyter.setContext';
export const jupyterCommandSetKernel = 'jupyter.setKernel';
export const jupyterReinstallDependenciesCommand = 'jupyter.reinstallDependencies';
export const jupyterAnalyzeCommand = 'jupyter.cmd.analyzeNotebook';
export const jupyterManagePackages = 'jupyter.cmd.managePackages';
@@ -47,7 +33,7 @@ export enum BuiltInCommands {
}
export enum CommandContext {
WizardServiceEnabled = 'wizardservice:enabled'
NotebookPythonInstalled = 'notebook:pythonInstalled'
}
export const pythonOfflinePipPackagesUrl = 'https://go.microsoft.com/fwlink/?linkid=2092867';