/** * Copyright 2019 EPAM Systems * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { ILayoutRestorer, JupyterLab, JupyterLabPlugin } from '@jupyterlab/application'; import { IMainMenu } from '@jupyterlab/mainmenu'; import { IFileBrowserFactory } from '@jupyterlab/filebrowser'; import { Widget } from '@phosphor/widgets'; import { Token } from '@phosphor/coreutils'; import '../style/variables.css'; import { WidgetRegistry } from './components/Widgets'; import { LegionSideWidget } from './components/SideWidgets'; import { LegionApi } from './api'; import { IApiCloudState } from './models/apiState'; import { ILauncher } from '@jupyterlab/launcher'; export declare const PLUGIN_ID = "jupyter.extensions.legion"; export declare const PLUGIN_ID_CLOUD: string; export declare const EXTENSION_ID = "jupyter.extensions.jupyter_legion"; export declare const ILegionExtension: Token; /** Interface for extension class */ export interface ILegionExtension { } /** * Export the plugins as default. */ declare const plugins: JupyterLabPlugin[]; export default plugins; declare class BaseLegionExtension { /** * Instance of Legion Widget for appropriate mode */ sideWidget: LegionSideWidget; /** * API to back-end */ api: LegionApi; /** * API state */ apiCloudState?: IApiCloudState; } /** * Declare extension for cloud mode */ export declare class LegionCloudExtension extends BaseLegionExtension implements ILegionExtension { private _trainingLogs; private _packagingLogs; private _app; private _menu; private _browser; private _launcher; /** * Construct extension * @param app JupyterLab target JupyterLab * @param restorer ILayoutRestorer layout restorer * @param menu * @param browser * @param launcher */ constructor(app: JupyterLab, restorer: ILayoutRestorer, menu: IMainMenu, browser: IFileBrowserFactory, launcher: ILauncher | null); private setupExamples; readonly trainingLogs: WidgetRegistry; readonly packagingLogs: WidgetRegistry; private constructTrainingLogWidget; private constructPackagingLogWidget; }