Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function activateLogConsole(
app: JupyterFrontEnd,
labShell: ILabShell,
rendermime: IRenderMimeRegistry,
nbtracker: INotebookTracker,
palette: ICommandPalette | null,
restorer: ILayoutRestorer | null,
mainMenu: IMainMenu | null,
settingRegistry: ISettingRegistry | null,
statusBar: IStatusBar | null
): ILoggerRegistry {
let logConsoleWidget: MainAreaWidget = null;
let logConsolePanel: LogConsolePanel = null;
const loggerRegistry = new LoggerRegistry({
defaultRendermime: rendermime,
// The maxLength is reset below from settings
maxLength: 1000
});
const tracker = new WidgetTracker>({
namespace: 'logconsole'
});
if (restorer) {
void restorer.restore(tracker, {
command: CommandIDs.open,
name: () => 'logconsole'
});
}
function activateLogConsole(
app: JupyterFrontEnd,
labShell: ILabShell,
rendermime: IRenderMimeRegistry,
nbtracker: INotebookTracker,
palette: ICommandPalette | null,
restorer: ILayoutRestorer | null,
mainMenu: IMainMenu | null,
settingRegistry: ISettingRegistry | null,
statusBar: IStatusBar | null
): ILoggerRegistry {
let logConsoleWidget: MainAreaWidget = null;
let logConsolePanel: LogConsolePanel = null;
const loggerRegistry = new LoggerRegistry({
defaultRendermime: rendermime,
// The maxLength is reset below from settings
maxLength: 1000
});
const tracker = new WidgetTracker>({
namespace: 'logconsole'
});
if (restorer) {
void restorer.restore(tracker, {
command: CommandIDs.open,
name: () => 'logconsole'
});
}
beforeEach(() => {
defaultRendermime = new RenderMimeRegistry({ initialFactories });
registry = new LoggerRegistry({
defaultRendermime,
maxLength: 10
});
logConsole = new LogConsolePanel(registry);
});
afterEach(() => {
beforeEach(() => {
defaultRendermime = new RenderMimeRegistry();
registry = new LoggerRegistry({
defaultRendermime,
maxLength: 10
});
});