Commit Graph

184 Commits

Author SHA1 Message Date
Jason Grout
da8cab76dd Clean up promises code some more. 2014-11-19 19:16:54 +00:00
Thomas Kluyver
7cf7d3f202 Merge pull request #6818 from jdfreder/race_conditions
Add promises to the widget framework.
2014-11-17 17:14:08 -08:00
Jonathan Frederic
61ebd40206 Bug fix, promise not resolving. 2014-11-17 11:44:10 -08:00
Min RK
d88f5c5898 Merge pull request #6874 from takluyver/config-js-api
Add JS config API
2014-11-15 12:52:38 -08:00
Min RK
c1a664dfb9 fix event hookup for kernel changed
event is kernel_created.Session

The spec name on the kernel also wasn't being changed when the kernel changed.
2014-11-15 12:19:35 -08:00
Jonathan Frederic
907bde3b25 Address review comments 2014-11-15 08:49:45 -08:00
Jonathan Frederic
3c949aad92 Remove message promise. 2014-11-15 08:49:45 -08:00
Jonathan Frederic
fe398593e7 Typo fix 2014-11-15 08:49:44 -08:00
Jonathan Frederic
93cedc167e Address @takluyver 's comments 2014-11-15 08:49:44 -08:00
Jonathan Frederic
eb319c8aab Promise logic is infectious like a disease 2014-11-15 08:49:44 -08:00
Jonathan Frederic
b56fc606ad Promise the messages to the model 2014-11-15 08:49:44 -08:00
Jonathan Frederic
bed3a4cfda use es6 2014-11-15 08:48:36 -08:00
Jonathan Frederic
bbcd5cb55f Bug fixes 2014-11-15 08:48:34 -08:00
Jonathan Frederic
3870bb571b Use rsvp.js for Promises 2014-11-15 08:48:34 -08:00
Jonathan Frederic
1d1572421f Add a WrappedError class 2014-11-15 08:48:34 -08:00
Jonathan Frederic
c41dcb35e9 Proxy console.error calls 2014-11-15 08:48:33 -08:00
Jonathan Frederic
2eae36ac9a Use load_class in comms instead of callbacks. 2014-11-15 08:48:33 -08:00
Thomas Kluyver
2bfdbfc631 Fix some other bugs 2014-11-14 17:06:58 -08:00
Thomas Kluyver
89222b6dfd Actually define the module
I didn't forget something really obvious and important. Not at all.
2014-11-14 16:57:43 -08:00
Thomas Kluyver
cbd4929785 Use promising_ajax in config API 2014-11-14 15:00:37 -08:00
Thomas Kluyver
625c4f5bc2 Fix punctuation 2014-11-14 14:55:07 -08:00
Thomas Kluyver
d9b71ff750 Add JS config API 2014-11-14 14:55:07 -08:00
Thomas Kluyver
d3699c8e3b Update JS docstrings in contents API 2014-11-13 14:44:57 -08:00
Thomas Kluyver
1e53c1f924 Re-raise errors with throw instead of Promise.reject() 2014-11-13 14:25:28 -08:00
Thomas Kluyver
56320588da Return JSON from contents API checkpoint methods 2014-11-13 12:20:53 -08:00
Thomas Kluyver
aecb4bffa5 All aboard the promise train 2014-11-13 12:17:49 -08:00
Thomas Kluyver
11cfcc40d4 Use promises for GET requests 2014-11-13 11:42:52 -08:00
Min RK
0a22217f7e Merge pull request #6900 from takluyver/contents-api-get-as-type
Contents API get as type
2014-11-12 21:43:50 -08:00
Thomas Kluyver
6f48b58b18 Fix various review comments 2014-11-11 14:46:53 -08:00
Thomas Kluyver
f9db65ab6f Expose and use get requests specifying type in the JS 2014-11-11 12:32:13 -08:00
Thomas Kluyver
c7529c53eb Eliminate remaining uses of extra_settings 2014-11-11 11:00:19 -08:00
Thomas Kluyver
ef98d48921 Disable passing extra AJAX settings to Contents.new() 2014-11-11 10:58:31 -08:00
Min RK
3870a30ce4 contents.new_untitled to match Python API 2014-11-10 17:29:53 -08:00
Min RK
39041a9f03 address review in contents service
- various docstrings, comments clarified and updated
- misc typos
- fix and test creating an untitled directory via POST
- only define `message` if there's something to say
2014-11-10 14:02:21 -08:00
Min RK
8407ba3a08 update frontend with path/name changes
- remove name from models
- path is full path (contains name)
2014-11-10 14:02:19 -08:00
Min RK
fe00509f32 add sticky Connection lost notification
when reconnect process gives up
2014-11-07 15:42:40 -08:00
Min RK
a6d427e5c9 add exponential falloff for reconnect
avoids constant reconnect attempts every 3 seconds forever

gives up after 6 tries (last timeout 64s)
2014-11-07 14:52:15 -08:00
Thomas Kluyver
9a7c6e78d9 JS Contents API doesn't need dialog module 2014-11-06 13:52:47 -08:00
Thomas Kluyver
b7a558d5b9 Use synchronous request for creating new notebooks
To get round popup blockers
2014-11-03 15:29:09 -08:00
Thomas Kluyver
2a497c16eb load_file -> load 2014-11-03 14:46:49 -08:00
Thomas Kluyver
a4f869aa8b Rename methods to remove _file suffix 2014-11-03 14:40:09 -08:00
Thomas Kluyver
5279418acf Make Contents.new more generic 2014-11-03 14:29:39 -08:00
Thomas Kluyver
658eb39c56 Remove one more unnecessary cache parameter 2014-11-03 10:19:51 -08:00
Thomas Kluyver
2962a3ce17 Remove some unnecessary cache: false parameters
According to the jQuery docs, this is only needed for GET and HEAD
requests.
2014-11-03 10:19:51 -08:00
Thomas Kluyver
a2f3e23fd8 Add copy_file to contents JS API 2014-11-03 10:19:51 -08:00
Thomas Kluyver
b8f9dc07e2 Fix error callback when deleting file 2014-11-03 10:19:51 -08:00
Kester Tong
9797a6b7c0 typo fix 2014-11-03 10:19:51 -08:00
Kester Tong
89df330129 Modifies Contents API to return Error objects
Modfies the Contents class to return JavaScript Error objects instead of passing on the return values from $.ajax().  This has two advantages.  First, it allows the content manager to parse errors and give more informative messages than the ajax response.  Second, it makes the Contents interface more general, since other kinds of backends might generate client-side errors.
2014-11-03 10:19:50 -08:00
Thomas Kluyver
ea314a2a86 Rename callback parameters to success/error 2014-11-03 10:18:28 -08:00
Thomas Kluyver
c1c591336e Some more event cleanup 2014-11-03 10:18:28 -08:00