Skip to content

Commit 762b483

Browse files
Merge the dialog and the filebrowser plugins into one single called AddDrivesPlugin and moved hard coded inputs mimicking backend side inputs , outside from the plugins and methods.
1 parent 1385aaf commit 762b483

File tree

3 files changed

+217
-238
lines changed

3 files changed

+217
-238
lines changed

src/contents.ts

Lines changed: 99 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,107 @@
22
// Distributed under the terms of the Modified BSD License.
33

44
import { Signal, ISignal } from '@lumino/signaling';
5-
65
import { DocumentRegistry } from '@jupyterlab/docregistry';
7-
86
import { Contents, ServerConnection } from '@jupyterlab/services';
97

8+
const drive1Contents: Contents.IModel = {
9+
name: 'Drive1',
10+
path: 'Drive1',
11+
last_modified: '2023-10-31T12:39:42.832781Z',
12+
created: '2023-10-31T12:39:42.832781Z',
13+
content: [
14+
{
15+
name: 'voila2.ipynb',
16+
path: 'Drive1/voila2.ipynb',
17+
last_modified: '2022-10-12T21:33:04.798185Z',
18+
created: '2022-11-09T12:37:21.020396Z',
19+
content: null,
20+
format: null,
21+
mimetype: null,
22+
size: 5377,
23+
writable: true,
24+
type: 'notebook'
25+
},
26+
{
27+
name: 'Untitled.ipynb',
28+
path: 'Drive1/Untitled.ipynb',
29+
last_modified: '2023-10-25T08:20:09.395167Z',
30+
created: '2023-10-25T08:20:09.395167Z',
31+
content: null,
32+
format: null,
33+
mimetype: null,
34+
size: 4772,
35+
writable: true,
36+
type: 'notebook'
37+
},
38+
{
39+
name: 'voila.ipynb',
40+
path: 'Drive1/voila.ipynb',
41+
last_modified: '2023-10-31T09:43:05.235448Z',
42+
created: '2023-10-31T09:43:05.235448Z',
43+
content: null,
44+
format: null,
45+
mimetype: null,
46+
size: 2627,
47+
writable: true,
48+
type: 'notebook'
49+
},
50+
{
51+
name: 'b.ipynb',
52+
path: 'Drive1/b.ipynb',
53+
last_modified: '2023-10-26T15:21:06.152419Z',
54+
created: '2023-10-26T15:21:06.152419Z',
55+
content: null,
56+
format: null,
57+
mimetype: null,
58+
size: 1198,
59+
writable: true,
60+
type: 'notebook'
61+
},
62+
{
63+
name: '_output',
64+
path: '_output',
65+
last_modified: '2023-10-31T12:39:41.222780Z',
66+
created: '2023-10-31T12:39:41.222780Z',
67+
content: null,
68+
format: null,
69+
mimetype: null,
70+
size: null,
71+
writable: true,
72+
type: 'directory'
73+
},
74+
{
75+
name: 'a.ipynb',
76+
path: 'Drive1/a.ipynb',
77+
last_modified: '2023-10-25T10:07:09.141206Z',
78+
created: '2023-10-25T10:07:09.141206Z',
79+
content: null,
80+
format: null,
81+
mimetype: null,
82+
size: 8014,
83+
writable: true,
84+
type: 'notebook'
85+
},
86+
{
87+
name: 'environment.yml',
88+
path: 'Drive1/environment.yml',
89+
last_modified: '2023-10-31T09:33:57.415583Z',
90+
created: '2023-10-31T09:33:57.415583Z',
91+
content: null,
92+
format: null,
93+
mimetype: null,
94+
size: 153,
95+
writable: true,
96+
type: 'file'
97+
}
98+
],
99+
format: 'json',
100+
mimetype: '',
101+
size: undefined,
102+
writable: true,
103+
type: 'directory'
104+
};
105+
10106
/**
11107
* A Contents.IDrive implementation that serves as a read-only
12108
* view onto the drive repositories.
@@ -125,103 +221,7 @@ export class Drive implements Contents.IDrive {
125221
path: string,
126222
options?: Contents.IFetchOptions
127223
): Promise<Contents.IModel> {
128-
return {
129-
name: 'Drive1',
130-
path: 'Drive1',
131-
last_modified: '2023-10-31T12:39:42.832781Z',
132-
created: '2023-10-31T12:39:42.832781Z',
133-
content: [
134-
{
135-
name: 'voila2.ipynb',
136-
path: 'Drive1/voila2.ipynb',
137-
last_modified: '2022-10-12T21:33:04.798185Z',
138-
created: '2022-11-09T12:37:21.020396Z',
139-
content: null,
140-
format: null,
141-
mimetype: null,
142-
size: 5377,
143-
writable: true,
144-
type: 'notebook'
145-
},
146-
{
147-
name: 'Untitled.ipynb',
148-
path: 'Drive1/Untitled.ipynb',
149-
last_modified: '2023-10-25T08:20:09.395167Z',
150-
created: '2023-10-25T08:20:09.395167Z',
151-
content: null,
152-
format: null,
153-
mimetype: null,
154-
size: 4772,
155-
writable: true,
156-
type: 'notebook'
157-
},
158-
{
159-
name: 'voila.ipynb',
160-
path: 'Drive1/voila.ipynb',
161-
last_modified: '2023-10-31T09:43:05.235448Z',
162-
created: '2023-10-31T09:43:05.235448Z',
163-
content: null,
164-
format: null,
165-
mimetype: null,
166-
size: 2627,
167-
writable: true,
168-
type: 'notebook'
169-
},
170-
{
171-
name: 'b.ipynb',
172-
path: 'Drive1/b.ipynb',
173-
last_modified: '2023-10-26T15:21:06.152419Z',
174-
created: '2023-10-26T15:21:06.152419Z',
175-
content: null,
176-
format: null,
177-
mimetype: null,
178-
size: 1198,
179-
writable: true,
180-
type: 'notebook'
181-
},
182-
{
183-
name: '_output',
184-
path: '_output',
185-
last_modified: '2023-10-31T12:39:41.222780Z',
186-
created: '2023-10-31T12:39:41.222780Z',
187-
content: null,
188-
format: null,
189-
mimetype: null,
190-
size: null,
191-
writable: true,
192-
type: 'directory'
193-
},
194-
{
195-
name: 'a.ipynb',
196-
path: 'Drive1/a.ipynb',
197-
last_modified: '2023-10-25T10:07:09.141206Z',
198-
created: '2023-10-25T10:07:09.141206Z',
199-
content: null,
200-
format: null,
201-
mimetype: null,
202-
size: 8014,
203-
writable: true,
204-
type: 'notebook'
205-
},
206-
{
207-
name: 'environment.yml',
208-
path: 'Drive1/environment.yml',
209-
last_modified: '2023-10-31T09:33:57.415583Z',
210-
created: '2023-10-31T09:33:57.415583Z',
211-
content: null,
212-
format: null,
213-
mimetype: null,
214-
size: 153,
215-
writable: true,
216-
type: 'file'
217-
}
218-
],
219-
format: 'json',
220-
mimetype: '',
221-
size: undefined,
222-
writable: true,
223-
type: 'directory'
224-
};
224+
return drive1Contents;
225225
}
226226

227227
/**

0 commit comments

Comments
 (0)