Change Kernels Dropdown to show Switching instead of Loading On Kernel Change (#4426)

Change Kernels Dropdown to show Changing instead of Loading On Kernel Change
This commit is contained in:
Chris LaFreniere
2019-03-13 09:59:19 -07:00
committed by GitHub
parent 965da0535a
commit b2b7d18802

View File

@@ -23,13 +23,14 @@ import { noKernel } from 'sql/workbench/services/notebook/common/sessionManager'
import { IConnectionDialogService } from 'sql/workbench/services/connection/common/connectionDialogService';
import { NotebookModel } from 'sql/parts/notebook/models/notebookModel';
const msgLoading = localize('loading', 'Loading kernels...');
const kernelLabel: string = localize('Kernel', 'Kernel: ');
const attachToLabel: string = localize('AttachTo', 'Attach to: ');
const msgLoadingContexts = localize('loadingContexts', 'Loading contexts...');
const msgAddNewConnection = localize('addNewConnection', 'Add new connection');
const msgSelectConnection = localize('selectConnection', 'Select connection');
const msgLocalHost = localize('localhost', 'localhost');
const msgLoading = localize('loading', "Loading kernels...");
const msgChanging = localize('changing', "Changing kernel...");
const kernelLabel: string = localize('Kernel', "Kernel: ");
const attachToLabel: string = localize('AttachTo', "Attach to: ");
const msgLoadingContexts = localize('loadingContexts', "Loading contexts...");
const msgAddNewConnection = localize('addNewConnection', "Add new connection");
const msgSelectConnection = localize('selectConnection', "Select connection");
const msgLocalHost = localize('localhost', "localhost");
const HIDE_ICON_CLASS = ' hideIcon';
// Action to add a cell to notebook based on cell type(code/markdown).
@@ -250,7 +251,7 @@ export class KernelsDropdown extends SelectBox {
}
public doChangeKernel(displayName: string): void {
this.setOptions([msgLoading], 0);
this.setOptions([msgChanging], 0);
this.model.changeKernel(displayName);
}
}