Commit Graph

5280 Commits

Author SHA1 Message Date
Gordon Ball
08895738f2 Merge master 2014-08-20 16:44:58 +02:00
Gordon Ball
05f07f1f71 Add a number of extra tests for the range widgets 2014-08-20 16:25:53 +02:00
Gordon Ball
2be045fe25 Support both value tuple and upper, lower traits for both int and float widgets 2014-08-20 16:25:33 +02:00
Jonathan Frederic
8877d32c4e Merge pull request #6194 from SylvainCorlay/immediate-widget-comm
Allow model id to be set externally on creation of the widget.
2014-08-19 14:33:03 -07:00
Jonathan Frederic
ed593f02f1 Merge pull request #6171 from tarzzz/slider-value-validate
Validate slider value, when limits change
2014-08-18 20:03:14 -07:00
Thomas Kluyver
fb00ee07b9 Merge pull request #6333 from minrk/tree-slash-redirect
allow slash in root->tree redirect
2014-08-18 11:11:54 -07:00
MinRK
d5a4553b8e improve indicators and handling of dead kernels and broken websocket connections
I think it's still possible to get to a state with no kernel and insufficient indication.
Imperfect, but an improvement.
2014-08-18 10:50:25 -07:00
MinRK
7ee8403ed8 allow slash in root->tree redirect
before #6117, only `/base_url/` worked,
after #6117, only `/base_url worked,
after this PR, both should work.
2014-08-18 10:47:20 -07:00
Jason Grout
0e5ceca059 Make the widget property_lock store the JSON state, not the original object
Comparison between arbitrary python objects can get crazy, whereas we really
only care about if the JSON state we are syncing is different.  So with this change,
we store and check against the JSON state.
2014-08-18 17:28:07 +00:00
Min RK
0539281c8a Merge pull request #6318 from minrk/tornado-4-error-html
use write_error instead of get_error_html
2014-08-16 11:43:29 -07:00
MinRK
568034c349 use write_error instead of get_error_html
get_error_html is removed in tornado 4.0
2014-08-15 13:41:13 -07:00
Jonathan Frederic
2790684a17 Fixed typo 2014-08-15 10:41:43 -07:00
Jonathan Frederic
a12b302597 renamed: widget_container.js -> widget_box.js 2014-08-15 10:37:46 -07:00
Jonathan Frederic
afdba2fd47 Fix logic, use box where applicable 2014-08-15 10:14:04 -07:00
Jonathan Frederic
9b5ece6661 Make popup inherit from widget box 2014-08-14 16:09:50 -07:00
Jonathan Frederic
371b12a9b0 Fab CSS 2014-08-14 15:53:13 -07:00
Jonathan Frederic
0aca365718 Address Sylvain's comments. 2014-08-14 15:51:41 -07:00
Tarun Gaba
258b888835 added 'var' 2014-08-15 02:59:28 +05:30
Tarun Gaba
dda92ff7ea Removed another stray alertO 2014-08-15 02:21:53 +05:30
Tarun Gaba
825186c868 Removed alert statement! 2014-08-15 02:19:26 +05:30
Tarun Gaba
539596bcdd adressed @jdfrederer's concern! 2014-08-15 02:18:38 +05:30
Jonathan Frederic
690059f8f8 Merge pull request #6296 from jasongrout/sync-hold
Add a new context manager, Widget.hold_sync(), which holds any syncing until the manager exits
2014-08-14 12:45:19 -07:00
Min RK
9c7bb48014 Merge pull request #6289 from takluyver/git-hooks-bash
Use bash shebang line for git hooks
2014-08-14 11:46:18 -07:00
Jeffrey Bush
f141a6926a File list refreshes no longer move the upload filename boxes.
The new file list is always placed after the upload filename boxes. I also removed the autorefresh guards against refreshing while having an upload box since this is no longer a problem.
2014-08-13 23:58:20 -07:00
Jeffrey Bush
1f68e22486 Fixed many edge cases in file uploads.
When there is an error reading a file, a message is shown (I could reproduce this easily by dragging a folder onto the list), added a missing "return false;" after an illegal notebook was detected, and we prevent no-name files and files starting with dots (which will not be visible in dashboard and automatically overwritten).
2014-08-13 22:55:53 -07:00
MinRK
0909694b50 avoid race condition when deleting/starting sessions
javascript doesn't guarantee the order of AJAX requests,
so we give `Session.delete` and `Kernel.kill` a callback signature.

Changing the kernel type calls `Notebook.start_kernel`,
which terminates the previous session, if defined,
before starting the new one.

A flag is stored, to prevent multiple simultaneous attempts to start sessions, raising a SessionAlreadyStarting Error,
preventing the spec_changed event from firing.
2014-08-13 22:11:32 -07:00
Jeffrey Bush
305c734830 Uploading a file with a name that already exists asks the user if they want to overwrite.
This is not perfect (it doesn't check against the real filesystem but the current list in the browser which may be stale) but it is better than nothing.
2014-08-13 22:07:57 -07:00
MinRK
bd5a88e954 handle undefined or closed zmq_stream in on_message
can happen if a message is waiting in a pipe and the web socket is closed before the message is handled.

And give ZMQChannels a nice repr with their kernel ID
2014-08-13 21:51:52 -07:00
Jeffrey Bush
5fff038965 Added ESC keep to upload textbox to cancel. 2014-08-13 20:57:35 -07:00
Thomas Kluyver
91fbd4d6fd Merge pull request #6303 from minrk/nbformat-error
Fix error message when failing to load a notebook
2014-08-13 17:46:59 -07:00
Jeffrey Bush
defabcc772 Minor improvements to file upload.
Updated file upload so that the icon of the new upload item reflects if it is a file or notebook, added the ability to use the "Enter" key in the filename text box to cause the upload to happen, and make it so that the list of files refreshes immediately upon successful upload.
2014-08-13 17:16:05 -07:00
MinRK
6d542013a4 add utils.ajax_error_msg for extracting the JSON error message. 2014-08-13 14:40:51 -07:00
MinRK
cb3da26e61 display JSON error message on failed notebook load
if there is one (escaped for safety).
2014-08-13 14:27:12 -07:00
MinRK
e3696996be JS: close WebSockets when killing kernels
by calling Kernel.stop_channels() in Session.delete and Kernel.kill
2014-08-13 14:21:14 -07:00
Jonathan Frederic
2db702fa57 Filenames s/container/box 2014-08-13 13:29:30 -07:00
Jonathan Frederic
d985ee86c6 s/Container/Box 2014-08-13 13:19:27 -07:00
MinRK
b3b168648a close websocket connections on ping/pong timeout
we recently added ws pings for keep alive,
and we can now use the longs to close dead connections.

This can apparently happen when connections are not closed cleanly,
e.g. on VPNs.

Setting ws_ping_timeout = 0 disables the ping mechanism altogether.
2014-08-13 11:32:25 -07:00
Jonathan Frederic
865fb20c00 Merge pull request #6284 from jasongrout/patch-6
Default view should be the base widget view class
2014-08-12 13:06:59 -07:00
Jason Grout
5cd46788f9 Before syncing a widget's state, check first for the property lock, then for the widget state lock 2014-08-12 18:23:57 +00:00
Jason Grout
af26d9cc24 Add a new context manager, Widget.hold_sync(), which holds any syncing until the manager exits
Sometimes for consistency or efficiency purposes, it makes sense to update
a group of properties all at once.  This context manager makes this possible.

We also fix a bug where send_state was not passing the key on to get_state.
2014-08-12 17:29:41 +00:00
Thomas Kluyver
e60f8bdda1 Merge pull request #6228 from jdfreder/eventful-list-dict
Add EventfulList and EventfulDict trait types.
2014-08-11 18:09:04 -07:00
Sylvain Corlay
f9fa4ada06 allowing widet id to be set externally 2014-08-11 18:36:59 +00:00
Jason Grout
8513f673e3 Make the widget comm attribute more straigtforward
Instead of automagically instantiating a comm when it is accessed, require a call to open().  This makes the comm attribute much less magical, and hopefully more understandable.
2014-08-11 18:36:59 +00:00
Jason Grout
16c366d1b5 Automatically open a comm on creation of widgets
This will immediately create a model on the javascript side when a widget is created.  This means that, for example, a widget that only interacts with its model can work without "displaying" it.
2014-08-11 18:30:26 +00:00
Thomas Kluyver
347e16aa22 No need to check for rpy2 in test machinery 2014-08-11 10:06:31 -07:00
Thomas Kluyver
d6517f51c3 Git hooks use bash specific syntax 2014-08-10 17:26:54 -07:00
Jonathan Frederic
848c223785 Rebase cleanup 2014-08-08 15:00:22 -07:00
Jonathan Frederic
36721c73c6 Added some doc strings on the widgets.
Also address the comments Matthias left me.
2014-08-08 14:57:51 -07:00
Jonathan Frederic
dbb88f95cd Make HBox and VBox helper functions 2014-08-08 14:57:51 -07:00
Sylvain Corlay
c9ed512d54 adding hbox and vbox
Conflicts:
	IPython/html/static/widgets/js/widget_container.js
	IPython/html/widgets/widget_container.py
2014-08-08 14:57:51 -07:00