import * as React from "react"; import { INotebookTracker, Notebook, NotebookPanel } from "@jupyterlab/notebook"; import { IRPCError } from "../utils/RPCUtils"; import { Cell } from "@jupyterlab/cells"; import { Kernel } from "@jupyterlab/services"; import { DeployProgressState } from "./deploys-progress/DeploysProgress"; import { JupyterFrontEnd } from "@jupyterlab/application"; import { IDocumentManager } from "@jupyterlab/docmanager"; interface IRunCellResponse { status: string; cellType?: string; cellIndex?: number; ename?: string; evalue?: string; } export interface ISelectOption { label: string; value: string; } export interface IExperiment { id: string; name: string; } export declare const NEW_EXPERIMENT: IExperiment; export interface ISelectVolumeTypes extends ISelectOption { invalid: boolean; tooltip: any; } interface IProps { lab: JupyterFrontEnd; tracker: INotebookTracker; notebook: NotebookPanel; docManager: IDocumentManager; backend: boolean; kernel: Kernel.IKernel; rokError: IRPCError; } interface IState { metadata: IKaleNotebookMetadata; runDeployment: boolean; deploymentType: string; deployDebugMessage: boolean; selectVal: string; activeNotebook?: NotebookPanel; activeCell?: Cell; activeCellIndex?: number; experiments: IExperiment[]; gettingExperiments: boolean; notebookVolumes?: IVolumeMetadata[]; volumes?: IVolumeMetadata[]; selectVolumeTypes: ISelectVolumeTypes[]; useNotebookVolumes: boolean; autosnapshot: boolean; deploys: { [index: number]: DeployProgressState; }; isEnabled: boolean; } export interface IAnnotation { key: string; value: string; } export interface IVolumeMetadata { type: string; name: string; mount_point: string; size?: number; size_type?: string; annotations: IAnnotation[]; snapshot: boolean; snapshot_name?: string; } interface IKaleNotebookMetadata { experiment: IExperiment; experiment_name: string; pipeline_name: string; pipeline_description: string; docker_image: string; volumes: IVolumeMetadata[]; } export declare class KubeflowKaleLeftPanel extends React.Component { state: IState; removeIdxFromArray: (index: number, arr: any[]) => any[]; updateIdxInArray: (element: any, index: number, arr: any[]) => any[]; updateSelectValue: (val: string) => void; updateExperiment: (experiment: IExperiment) => void; updatePipelineName: (name: string) => void; updatePipelineDescription: (desc: string) => void; updateDockerImage: (name: string) => void; updateVolumesSwitch: () => void; updateAutosnapshotSwitch: () => void; deleteVolume: (idx: number) => void; addVolume: () => void; updateVolumeType: (type: string, idx: number) => void; updateVolumeName: (name: string, idx: number) => void; updateVolumeMountPoint: (mountPoint: string, idx: number) => void; updateVolumeSnapshot: (idx: number) => void; updateVolumeSnapshotName: (name: string, idx: number) => void; updateVolumeSize: (size: number, idx: number) => void; updateVolumeSizeType: (sizeType: string, idx: number) => void; addAnnotation: (idx: number) => void; deleteAnnotation: (volumeIdx: number, annotationIdx: number) => void; updateVolumeAnnotation: (annotation: { key: string; value: string; }, volumeIdx: number, annotationIdx: number) => void; getNotebookMountPoints: () => { label: string; value: string; }[]; activateRunDeployState: (type: string) => void; changeDeployDebugMessage: () => void; resetState: () => void; componentDidMount: () => void; componentDidUpdate: (prevProps: Readonly, prevState: Readonly) => void; /** * This handles when a notebook is switched to another notebook. * The parameters are automatically passed from the signal when a switch occurs. */ handleNotebookChanged: (tracker: INotebookTracker, notebook: NotebookPanel) => Promise; handleActiveCellChanged: (notebook: Notebook, activeCell: Cell) => Promise; executeRpc: (func: string, args?: any, nb_path?: string) => Promise; executeRpcAndShowRPCError: (func: string, args?: any, nb_path?: string) => Promise; /** * Read new notebook and assign its metadata to the state. * @param notebook active NotebookPanel */ setNotebookPanel: (notebook: NotebookPanel) => Promise; wait: (ms: number) => Promise; runSnapshotProcedure: (_deployIndex: number) => Promise; updateDeployProgress: (index: number, progress: DeployProgressState) => void; onPanelRemove: (index: number) => void; runDeploymentCommand: () => Promise; pollRun(_deployIndex: number, runPipeline: any): void; getExperiments: () => Promise; getMountedVolumes: () => Promise; getBaseImage: () => Promise; snapshotNotebook: () => Promise; getSnapshotProgress: (task_id: string, ms?: number) => Promise; replaceClonedVolumes: (bucket: string, obj: string, version: string, volumes: IVolumeMetadata[]) => Promise; unmarshalData: (nbFileName: string) => Promise; getStepName: (notebook: NotebookPanel, index: number) => string; clearCellOutputs: (notebook: NotebookPanel) => void; selectAndScrollToCell: (notebook: NotebookPanel, cell: { cell: Cell; index: number; }) => void; runGlobalCells: (notebook: NotebookPanel) => Promise; getCellByStepName: (notebook: NotebookPanel, stepName: string) => { cell: Cell; index: number; }; onMetadataEnable: (isEnabled: boolean) => void; render(): JSX.Element; } export {};