mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
This commit is contained in:
@@ -18,6 +18,7 @@ import { NotebookComponent } from 'sql/parts/notebook/notebook.component';
|
|||||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||||
import { IConnectionManagementService, IConnectionDialogService } from 'sql/parts/connection/common/connectionManagement';
|
import { IConnectionManagementService, IConnectionDialogService } from 'sql/parts/connection/common/connectionManagement';
|
||||||
import { getErrorMessage } from 'sql/parts/notebook/notebookUtils';
|
import { getErrorMessage } from 'sql/parts/notebook/notebookUtils';
|
||||||
|
import { noKernel } from 'sql/services/notebook/sessionManager';
|
||||||
|
|
||||||
const msgLoading = localize('loading', 'Loading kernels...');
|
const msgLoading = localize('loading', 'Loading kernels...');
|
||||||
const kernelLabel: string = localize('Kernel', 'Kernel: ');
|
const kernelLabel: string = localize('Kernel', 'Kernel: ');
|
||||||
@@ -238,7 +239,7 @@ export class AttachToDropdown extends SelectBox {
|
|||||||
|
|
||||||
// Load "Attach To" dropdown with the values corresponding to Kernel dropdown
|
// Load "Attach To" dropdown with the values corresponding to Kernel dropdown
|
||||||
public async loadAttachToDropdown(model: INotebookModel, currentKernel: string): Promise<void> {
|
public async loadAttachToDropdown(model: INotebookModel, currentKernel: string): Promise<void> {
|
||||||
if (currentKernel === notebookConstants.python3) {
|
if (currentKernel === notebookConstants.python3 || currentKernel === noKernel) {
|
||||||
this.setOptions([msgLocalHost]);
|
this.setOptions([msgLocalHost]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { nb } from 'sqlops';
|
|||||||
import { localize } from 'vs/nls';
|
import { localize } from 'vs/nls';
|
||||||
import { FutureInternal } from 'sql/parts/notebook/models/modelInterfaces';
|
import { FutureInternal } from 'sql/parts/notebook/models/modelInterfaces';
|
||||||
|
|
||||||
const noKernel: string = localize('noKernel', 'No Kernel');
|
export const noKernel: string = localize('noKernel', 'No Kernel');
|
||||||
const runNotebookDisabled = localize('runNotebookDisabled', 'Cannot run cells as no kernel has been configured');
|
const runNotebookDisabled = localize('runNotebookDisabled', 'Cannot run cells as no kernel has been configured');
|
||||||
|
|
||||||
let noKernelSpec: nb.IKernelSpec = ({
|
let noKernelSpec: nb.IKernelSpec = ({
|
||||||
@@ -24,9 +24,9 @@ export class SessionManager implements nb.SessionManager {
|
|||||||
|
|
||||||
public get specs(): nb.IAllKernels {
|
public get specs(): nb.IAllKernels {
|
||||||
let allKernels: nb.IAllKernels = {
|
let allKernels: nb.IAllKernels = {
|
||||||
defaultKernel: noKernel,
|
defaultKernel: noKernel,
|
||||||
kernels: [noKernelSpec]
|
kernels: [noKernelSpec]
|
||||||
};
|
};
|
||||||
return allKernels;
|
return allKernels;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user