diff --git a/src/index.ts b/src/index.ts index 680438a..b25c60d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,14 +1,12 @@ import { JupyterFrontEndPlugin } from '@jupyterlab/application'; import { driveFileBrowser, - drivesListProvider, openDriveDialogPlugin, launcherPlugin } from './plugins'; const plugins: JupyterFrontEndPlugin[] = [ driveFileBrowser, - drivesListProvider, openDriveDialogPlugin, launcherPlugin ]; diff --git a/src/plugins/driveBrowserPlugin.ts b/src/plugins/driveBrowserPlugin.ts index f666c4f..86f66e4 100644 --- a/src/plugins/driveBrowserPlugin.ts +++ b/src/plugins/driveBrowserPlugin.ts @@ -25,8 +25,8 @@ import { Widget } from '@lumino/widgets'; import { driveBrowserIcon } from '../icons'; import { Drive } from '../contents'; -import { getDrivesList, setListingLimit } from '../requests'; -import { IDriveInfo, IDrivesList, CommandIDs } from '../token'; +import { setListingLimit } from '../requests'; +import { CommandIDs } from '../token'; /** * The file browser factory ID. @@ -48,24 +48,6 @@ const FILE_DIALOG_CLASS = 'jp-FileDialog'; */ const CREATE_DRIVE_TITLE_CLASS = 'jp-new-drive-title'; -/** - * The drives list provider. - */ -export const drivesListProvider: JupyterFrontEndPlugin = { - id: 'jupyter-drives:drives-list', - description: 'The drives list provider.', - provides: IDrivesList, - activate: async (_: JupyterFrontEnd): Promise => { - let drives: IDriveInfo[] = []; - try { - drives = await getDrivesList(); - } catch (error) { - console.log('Failed loading available drives list, with error: ', error); - } - return drives; - } -}; - /** * The drive file browser factory provider. */ @@ -77,8 +59,7 @@ export const driveFileBrowser: JupyterFrontEndPlugin = { IFileBrowserFactory, IToolbarWidgetRegistry, ISettingRegistry, - ITranslator, - IDrivesList + ITranslator ], optional: [ IRouter, @@ -92,7 +73,6 @@ export const driveFileBrowser: JupyterFrontEndPlugin = { toolbarRegistry: IToolbarWidgetRegistry, settingsRegistry: ISettingRegistry, translator: ITranslator, - drivesList: IDriveInfo[], router: IRouter | null, tree: JupyterFrontEnd.ITreeResolver | null, labShell: ILabShell | null, @@ -105,8 +85,7 @@ export const driveFileBrowser: JupyterFrontEndPlugin = { // create drive for drive file browser const drive = new Drive({ - name: 's3', - drivesList: drivesList + name: 's3' }); app.serviceManager.contents.addDrive(drive); @@ -266,7 +245,7 @@ namespace Private { /** * Create the node for a creating a new drive handler. */ - const createNewDriveNode = (newDriveName: string): HTMLElement => { + const createNewDriveNode = (): HTMLElement => { const body = document.createElement('div'); const drive = document.createElement('label'); @@ -295,7 +274,7 @@ namespace Private { * Construct a new "create-drive" dialog. */ constructor(newDriveName: string) { - super({ node: createNewDriveNode(newDriveName) }); + super({ node: createNewDriveNode() }); this.onAfterAttach(); } diff --git a/src/token.ts b/src/token.ts index 33e0149..857ab5a 100644 --- a/src/token.ts +++ b/src/token.ts @@ -1,4 +1,3 @@ -import { Token } from '@lumino/coreutils'; import { Contents } from '@jupyterlab/services'; /** @@ -12,13 +11,6 @@ export namespace CommandIDs { export const launcher = 'launcher:create'; } -/** - * A token for the plugin that provides the list of drives. - */ -export const IDrivesList = new Token( - 'jupyter-drives:drives-list-provider' -); - /** * An interface that stores the drive information. */