Commit Graph

240 Commits

Author SHA1 Message Date
MinRK
b666345633 allow callbacks on status messages 2013-10-22 20:11:38 -07:00
MinRK
34efd17408 catch errors in comm callbacks 2013-10-22 19:45:39 -07:00
MinRK
938dc589dd Add CommManager.new_comm
Javascript-side version for creating and connecting Comms in one call

Without a `get_ipython()`-like global handle,
Comm constructor can't do the same magic as the IPython one.
2013-10-22 19:45:39 -07:00
MinRK
0a89edc641 log exceptions in Comm handlers 2013-10-22 19:45:38 -07:00
MinRK
8bcf95404d add unregister_target to CommManagers 2013-10-22 19:45:38 -07:00
MinRK
90f67d3bbe add CodeCell.get_callbacks
for reusing default execute callbacks
2013-10-22 19:45:36 -07:00
MinRK
9e198d2bd6 attach comm_manager to kernel 2013-10-22 19:44:46 -07:00
MinRK
5c83cd3e52 move comm.js to kernel service 2013-10-22 19:44:44 -07:00
MinRK
04adce96af add message metadata to comm and kernel.send_shell_message 2013-10-22 19:43:56 -07:00
MinRK
99680e21bd move comm.js to base 2013-10-22 19:43:56 -07:00
MinRK
4fdc4bb3fc get clear_output callback properly 2013-10-22 19:43:56 -07:00
MinRK
76994d2ff8 update callback structure in js commands 2013-10-22 19:43:55 -07:00
MinRK
aa388570d3 jshint on codecell 2013-10-22 19:43:55 -07:00
MinRK
f7e6435256 only pass shell.reply callback to oinfo / complete
These should not have side effects, so no need to expose full callback structure.

Also, object_info method shouldn't have `_request` in its name.
2013-10-22 19:43:52 -07:00
MinRK
d99e25f245 refactor js callbacks
all callbacks get the whole message
2013-10-22 19:43:01 -07:00
MinRK
9206d1e87f add utils.always_new
wrapper allows passing constructors as callbacks, where `new` is required.
2013-10-22 19:41:06 -07:00
MinRK
111fccc8ab open is not an event
target callback receives comm and open message, not just comm.
2013-10-22 19:40:36 -07:00
MinRK
aa0387a647 s/target/target_name 2013-10-22 19:40:35 -07:00
MinRK
f833b1ca03 hook up output for comm messages 2013-10-22 19:40:35 -07:00
MinRK
3d3c3fd504 COMM: mirror Python callback API in Javascript 2013-10-22 19:40:34 -07:00
MinRK
15819e8535 pass whole message to Comm handlers 2013-10-22 19:40:34 -07:00
MinRK
3665cc241f rename widget to comm 2013-10-22 19:40:34 -07:00
MinRK
14fcdab73b make js / Python widgets symmetrical
don't enforce creation on Kernel side

also removed weak refs - premature optimization,
we can think about this later.
2013-10-22 19:40:33 -07:00
MinRK
230a2261e8 fix js/Python WidgetManager symmetry
remove some log statements
2013-10-22 19:40:33 -07:00
MinRK
6643cffa23 add javascript-side widgets 2013-10-22 19:40:32 -07:00
MinRK
8199909e62 Improvements to kernel.js
- dispatch iopub handlers by msg_type
- add Kernel.send_shell_message public API
- use strict (and related fixes)
2013-10-22 19:40:32 -07:00
Min RK
bc0dc279f1 Merge pull request #4303 from ipython/multidir
Add multidirectory support for the Notebook.

Major change to URL schemes in the notebook server,
documented in [IPEP 16](https://github.com/ipython/ipython/wiki/IPEP-16%3A-Notebook-multi-directory-dashboard-and-URL-mapping).
2013-10-22 18:45:30 -07:00
Paul Ivanov
8b26933af5 Merge pull request #4378 from minrk/split-below
split adds new cell above, rather than below
2013-10-21 13:52:35 -07:00
Paul Ivanov
a2d731ff39 fix 'close and halt' in notebook File menu 2013-10-20 20:57:10 -07:00
MinRK
50665831bd update copy API in js 2013-10-18 17:26:14 -07:00
MinRK
aea1bbde6a s/session_id/id 2013-10-18 16:13:53 -07:00
MinRK
0558ec4ce0 Cells shouldn't know about Sessions 2013-10-18 16:13:53 -07:00
MinRK
d1a36fe4c0 use 'id' for checkpoint ID key
rather than redundant checkpoint.checkpoint_id
2013-10-17 14:55:00 -07:00
MinRK
5a60141bed use splitext in notebook_list
fixes case where notebooks with '.' in name were misrendered
2013-10-17 14:31:20 -07:00
MinRK
11013e648d add utils.splitext to js
mimic Python os.path.splitext
2013-10-17 14:30:15 -07:00
MinRK
5ca1ad666d add missing cell.session in tooltip.js 2013-10-17 14:09:20 -07:00
Brian E. Granger
9c42ca8a72 Fully removing .py file upload.
In the future all uploads should just use the contents web service
and we should support any type of file.
2013-10-17 14:09:20 -07:00
Brian E. Granger
51fc769edd Handle notebook downloads through the /files URL. 2013-10-17 14:09:20 -07:00
MinRK
4a12890d65 disable download-as-pt
since it doesn't work. Adds a note about nbconvert needed to bring it back.
2013-10-17 14:09:19 -07:00
MinRK
fc4fb92580 review pass on multidir js 2013-10-17 14:09:18 -07:00
MinRK
e16a5807c7 fixup bad rebase 2013-10-17 14:09:18 -07:00
MinRK
5593526108 don't let empty strings introduce extra slashes in url_path_join 2013-10-17 14:09:15 -07:00
MinRK
a7f297f8f3 save before download-as
uses `async : false`

closes #852

download-as-py still unavailable.
2013-10-17 14:09:15 -07:00
MinRK
8b94ee2b47 use async : false to avoid pop-up blocker on New / Copy notebook 2013-10-17 14:09:14 -07:00
MinRK
b33ffa7068 update upload and copy
adds 'notebook.ipynb/copy' url handler

because we were putting too many things in a single POST handler.
2013-10-17 14:09:14 -07:00
MinRK
4e12521082 fix dashboard upload 2013-10-17 14:09:14 -07:00
MinRK
d1e0aded7d mixup notebook_list 2013-10-17 14:09:14 -07:00
MinRK
40f577b538 add utils.url_path_join
javascript equivalent of Python-side function.
2013-10-17 14:09:13 -07:00
Zachary Sailer
da58c8c470 Fixed session js ajax request.
Session was not creating a kernel object on the client side,
after the server created successfully created a session.
2013-10-17 14:09:12 -07:00
Zachary Sailer
c26700cd3a changes after session manager code review 2013-10-17 14:09:12 -07:00