mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Fixed #3294 removed dead code for "attach to" and remove disable to make it respond theme change (#3349)
* Fixed #3294 * Fixed #3294
This commit is contained in:
@@ -239,9 +239,6 @@ export class NotebookComponent extends AngularDisposable implements OnInit {
|
|||||||
attachTodropdwon.render(attachToContainer);
|
attachTodropdwon.render(attachToContainer);
|
||||||
attachSelectBoxStyler(attachTodropdwon, this.themeService);
|
attachSelectBoxStyler(attachTodropdwon, this.themeService);
|
||||||
|
|
||||||
let attachToInfoText = document.createElement('div');
|
|
||||||
attachToInfoText.className = 'notebook-info-label';
|
|
||||||
attachToInfoText.innerText = 'Attach To: ';
|
|
||||||
|
|
||||||
let addCodeCellButton = new AddCellAction('notebook.AddCodeCell', localize('code', 'Code'), 'notebook-button icon-add');
|
let addCodeCellButton = new AddCellAction('notebook.AddCodeCell', localize('code', 'Code'), 'notebook-button icon-add');
|
||||||
addCodeCellButton.cellType = CellTypes.Code;
|
addCodeCellButton.cellType = CellTypes.Code;
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ const msgLoadingContexts = localize('loadingContexts', 'Loading contexts...');
|
|||||||
const msgAddNewConnection = localize('addNewConnection', 'Add new connection');
|
const msgAddNewConnection = localize('addNewConnection', 'Add new connection');
|
||||||
const msgSelectConnection = localize('selectConnection', 'Select connection');
|
const msgSelectConnection = localize('selectConnection', 'Select connection');
|
||||||
const msgConnectionNotApplicable = localize('connectionNotSupported', 'n/a');
|
const msgConnectionNotApplicable = localize('connectionNotSupported', 'n/a');
|
||||||
|
const msgLocalHost = localize('localhost', 'Localhost');
|
||||||
|
|
||||||
// Action to add a cell to notebook based on cell type(code/markdown).
|
// Action to add a cell to notebook based on cell type(code/markdown).
|
||||||
export class AddCellAction extends Action {
|
export class AddCellAction extends Action {
|
||||||
@@ -238,8 +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) {
|
||||||
this.setOptions([msgConnectionNotApplicable]);
|
this.setOptions([msgLocalHost]);
|
||||||
this.disable();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let hadoopConnections = this.getHadoopConnections(model);
|
let hadoopConnections = this.getHadoopConnections(model);
|
||||||
|
|||||||
Reference in New Issue
Block a user