Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiocontents-nbextension
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastian
jiocontents-nbextension
Commits
41ddb164
Commit
41ddb164
authored
Jan 19, 2018
by
Sebastian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add: more accidentally removed jupyter API code
parent
3b9cb155
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
3 deletions
+39
-3
jiocontents/jiocontents.js
jiocontents/jiocontents.js
+39
-3
No files found.
jiocontents/jiocontents.js
View file @
41ddb164
...
...
@@ -198,10 +198,46 @@ define(function(require) {
return
this
.
get
(
path
,
{
type
:
'
directory
'
});
};
/**
*
*
* Default jupyter API endpoint config (taken from the standard contents manager)
*
*
*/
var
Contents
=
function
(
options
)
{
this
.
base_url
=
options
.
base_url
;
};
this
.
base_url
=
options
.
base_url
;
};
/** Error type */
Contents
.
DIRECTORY_NOT_EMPTY_ERROR
=
'
DirectoryNotEmptyError
'
;
Contents
.
DirectoryNotEmptyError
=
function
()
{
this
.
message
=
'
A directory must be empty before being deleted.
'
;
};
Contents
.
DirectoryNotEmptyError
.
prototype
=
Object
.
create
(
Error
.
prototype
);
Contents
.
DirectoryNotEmptyError
.
prototype
.
name
=
Contents
.
DIRECTORY_NOT_EMPTY_ERROR
;
Contents
.
prototype
.
api_url
=
function
()
{
var
url_parts
=
[
this
.
base_url
,
'
api/contents
'
,
utils
.
url_join_encode
.
apply
(
null
,
arguments
),
];
return
utils
.
url_path_join
.
apply
(
null
,
url_parts
);
};
Contents
.
prototype
.
create_basic_error_handler
=
function
(
callback
)
{
if
(
!
callback
)
{
return
utils
.
log_ajax_error
;
}
return
function
(
xhr
,
status
,
error
)
{
callback
(
utils
.
wrap_ajax_error
(
xhr
,
status
,
error
));
};
};
return
{
'
Contents
'
:
Contents
};
});
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment