Commit Graph

568 Commits

Author SHA1 Message Date
Stefan van der Walt
0a41777a8d Add info, error and warning message boxes. 2011-11-18 17:12:52 -08:00
Stefan van der Walt
3b6c151b72 Add logout button. 2011-11-18 16:59:48 -08:00
Stefan van der Walt
c4b7ee1a75 Use template inheritance. 2011-11-18 13:17:36 -08:00
Stefan van der Walt
15520ba820 Notify user about invalid password. 2011-11-18 12:04:17 -08:00
Stefan van der Walt
b2972a7e98 Integrate hashed passwords into the notebook. 2011-11-18 10:53:09 -08:00
Pablo Winant
f2f715beb6 Latexify formulas contained in html text.
closes gh-994
2011-11-14 20:02:24 -08:00
Fernando Perez
1bb4c726c3 Merge pull request #955 from minrk/websocket
Websocket fixes:

1. alert client on failed and lost web socket connections

A long message is given if the connection fails within 1s, which assumes the connection did not succeed. Otherwise, it is a short 'connection closed unexpectedly'.

This also means that clients are notified on server termination (for better or worse).

2. remove superfluous ws-hostname parameter from notebook

This made the notebook server artificially and unnecessarily brittle against tunneling and explicit hostname resolution.  Now, the ws_url is defined based on the Origin of the request for the url, so it always matches the http[s] url.  This means that it will follow the same tunnel, and the hostname will be already resolved.  Resolving the hostname twice makes no sense at all unless the websockets are going to a different server than the http requests.

Implemented as a property, so it should still be easy to change for future cases where it might behave differently (e.g. websockets on a different host, or at a non-root url).
2011-11-10 19:31:27 -08:00
MinRK
a4b6d6bb9f don't use Origin header to determine ws_url 2011-11-10 19:01:44 -08:00
MinRK
7519ff3b41 split likely multiline strings when writing to/from JSON 2011-11-09 12:10:03 -08:00
Fernando Perez
8d739fb5a2 Fix CSS so word wrapping stays within output box. 2011-10-31 22:57:54 -07:00
Fernando Perez
a852c75dd7 Word-wrap output correctly in the notebook; prevents excessive scrolling.
Firefox seems to not honor it correctly, but Webkit browsers (Chrome,
rekonq, Safari) do.
2011-10-31 21:39:17 -07:00
MinRK
487d110557 use jQuery dialog instead of alert() 2011-10-31 19:07:25 -07:00
MinRK
b73d616279 alert client on failed and lost web socket connections
A long message is given if the connection fails within 1s.  Otherwise, it is a short 'connection closed unexpectedly'.

This also means that clients are notified on server termination.
2011-10-30 22:57:51 -07:00
MinRK
00c797e2b5 remove superfluous ws-hostname parameter from notebook
This made the notebook server artificially and unnecessarily brittle to tunneling, and non-local hostname resolution.  The ws_url is now defined based on the Origin of the request.  This allows tunneled hosts and ports to preserve connections, as the ws_url always matches the one in use by the client.

Implemented as a property, to facilitate future cases where it might behave differently.
2011-10-30 22:57:51 -07:00
Fernando Perez
6e19364cfd Update version check to work with tornado 2.1.0 or 2.1.1 2011-10-30 13:12:12 -07:00
Fernando Perez
e1a2eae156 Monkeypatch Tornado 2.1.1 so it works with Google Chrome 16.
We're just applying manually a fix from Tornado itself, see for
details:

https://github.com/facebook/tornado/issues/385
https://github.com/facebook/tornado/commit/84d7b458f956727c3b0d6710
2011-10-30 12:11:22 -07:00
MinRK
f2972ad5c4 add 'running' class to running code cells
Will allow special styling of code cells that are running via
`div.code_cell.running` in css.  Currently, no change is made.
2011-10-28 19:57:02 -07:00
MinRK
0e4afee63b set 'In [*]' to indicate pending code cell 2011-10-28 19:56:55 -07:00
Fernando Perez
83ddbf5987 Merge pull request #931 from minrk/readonly
The notebook now supports a `--read-only` flag, which allows users to view all notebooks being served but not to edit them or execute any code.  These actions are not allowed and the buttons, shortcuts, etc. are removed, but the requests will raise authentication errors if they manage to send the events anyway.  Save/print functions remain available.

This flag can be used in two modes:

1. When running an unauthenticated server, one can run a *second* read-only server in the same directory on a public IP address.  This will let users connect to the read-only view without having to worry about configuring passwords and certificates for the execution server.

2. When running a server configured with authentication (and hopefully an SSL certificate), starting it with `--read-only` allows unauthenticated users read-only access to notebooks. This means that the same server on a single port can be both used by authenticated users for execution and by the public for viewing the available notebooks.
2011-10-28 16:02:03 -07:00
Fernando Perez
7c04cc70fd Merge pull request #921 from minrk/traiterror
Show invalid config message on TraitErrors during initialization.

implemented via `@catch_config` decorator
    
Now, the event that was triggered by invalid app config (see `--log-level 5`) is triggered by bad config at any point during initialization.
    
This *will* catch TraitError-raising bugs in IPython itself, but only during initialization.

Also, deregister crash handler on use to avoid it being triggered recursively/repeatedly.
2011-10-28 15:34:37 -07:00
MinRK
1f7fd1db3f catch_config -> catch_config_error 2011-10-28 15:22:24 -07:00
MinRK
65a6cb3b1c move read_only flag to page-level
contents of LPanel are not drawn until after collapse

read_only is in a <meta> tag
2011-10-28 14:45:41 -07:00
Fernando Perez
6e1bbf8fc3 Start webbrowser in a thread. Prevents lockup with Chrome.
If a user has Chrome set as their default browser (system-wide or via
the `BROWSER` environment variable), opening the notebook hangs
because the chrome call doesn't return immediately.  This solves the
issue by opening the browser in a thread.

Note that there remains an issue where killing the notebook will kill
Chrome if the Chrome session was started by us.  I haven't found a way
to work around that despite attempts by making the webbrowser.open()
call in a subprocess.
2011-10-27 23:52:36 -07:00
MinRK
a3a0be08bb allow fully read-only mode if no password is set 2011-10-27 23:23:34 -07:00
MinRK
a18ddb9ec4 add missing loginwidget.js 2011-10-27 21:56:02 -07:00
MinRK
a6de5947de add read-only view for notebooks
When using a password, read-only mode allows unauthenticated users
read-only access to notebooks.  Editing, execution, etc. are not
allowed in read-only mode, but save/print functions are available.

No kernels are started until an authenticated user opens a notebook.
2011-10-25 22:14:09 -07:00
Brian Granger
a6c9123018 Adding space between paragraphs in rendered html in the notebook. 2011-10-25 18:28:39 -07:00
MinRK
9a7fda926d Allow notebook server to run in read-only mode
Kernels are never started, and all save/delete/execution handlers raise
403: Forbidden.

/cc @fperez
2011-10-24 21:33:05 -07:00
MinRK
268c5e778d Show invalid config message on TraitErrors during initialization
implemented via @catch_config decorator

Now, the event that was triggered by invalid app config (see `--log-level 5`) is triggered by bad config at any point during initialization.

This *will* catch TraitError bugs in IPython itself, but only during initialization.

closes gh-908
2011-10-22 11:35:20 -07:00
MinRK
dd8761ea1d Allow IPython to run without sqlite3
The History will always appear empty, so history magics, etc. don't do anything.  Readline history for a single session works fine.

Test suite should now pass without sqlite
2011-10-20 10:36:10 -07:00
MinRK
89f11475da dashboard page title -> IPython Dashboard 2011-10-18 23:26:53 -07:00
MinRK
76650e316d Restore kernel status to header 2011-10-18 23:26:20 -07:00
MinRK
48c344ecf5 fix --no-browser flag in notebook after rename 2011-10-18 22:12:09 -07:00
MinRK
30c45c517d fix Cell->Help header typo 2011-10-18 20:02:12 -07:00
Fernando Perez
38af53d027 Merge pull request #899 from minrk/nbwork
Internal notebook refactoring and cleanup, plus fixing a bug that prevented Tornado from authenticating users with password.
2011-10-18 18:58:25 -07:00
MinRK
9be2911296 style Sign In button with jQuery 2011-10-18 18:11:14 -07:00
Brian E. Granger
970742c267 Using self.request._cookies in WS handlers. 2011-10-18 18:11:14 -07:00
Brian E. Granger
9b945e7bc2 Added kill_kernel to notebook template. 2011-10-18 18:11:14 -07:00
MinRK
6c5f69e97a Moving status widget to Kernel section of L panel. 2011-10-18 18:11:08 -07:00
MinRK
139fe52832 Renaming user cookie to username to better match usage. 2011-10-18 18:10:22 -07:00
Brian E. Granger
fd06bd1610 Minor changes to the notebook handlers. 2011-10-18 17:55:27 -07:00
Brian E. Granger
d26a7e5fcc Removed save widget delay. 2011-10-18 17:55:27 -07:00
Brian E. Granger
5f3fd837a4 Renaming NBBrowserHandler->ProjectDashboardHandler. 2011-10-18 17:55:26 -07:00
Brian E. Granger
05729f7c0c Further cleanup and renaming of notebook. 2011-10-18 17:55:26 -07:00
Brian E. Granger
2318fe4ef5 Renaming things in the notebook.
* nbbrowser -> projectdashboard.
* Getting rid of underscores on .js filenames.
2011-10-18 17:55:26 -07:00
Brian E. Granger
ae37e2fe2c Simplifying logic on login page. 2011-10-18 17:55:26 -07:00
Brian E. Granger
1f699c8c23 Further work updating JS URL scheme to use data-base-project-url. 2011-10-18 17:55:26 -07:00
Brian E. Granger
cc3516be01 Updating notebook list to use data-base-project-url. 2011-10-18 17:55:26 -07:00
Brian E. Granger
1f06a280ca Updating JS URL scheme to use embedded data.
All ajax requests from JS now use the data-base-project-url
and data-base-kernel-url data attributes set on the body.
2011-10-18 17:55:25 -07:00
Brian E. Granger
36e15cb5c2 Adding data-project to the body data attribs. 2011-10-18 17:55:25 -07:00
Brian E. Granger
c900979a80 Misc changes to the notebook.
* IPythonNotebookApp->NotebookApp.
* Cleaned up html templates of unused stylesheets.
2011-10-18 17:55:25 -07:00
Brian E. Granger
7611a38721 Minor changes to handlers. 2011-10-18 17:55:25 -07:00
MinRK
4f26dae311 don't present meaningless username option in notebook
username isn't used for anything other than hash input
for authentication, so remove the field in the login form
and just use a uuid.
2011-10-18 17:55:25 -07:00
Brian E. Granger
66d5c9f8a6 Adding base_project_url and base_kernel_url as HTML data attribs.
* Also saving the notebook_id using that as well.
2011-10-18 17:55:25 -07:00
Fernando Perez
986f2e7223 Merge pull request #893 from minrk/clearoutput
Adding clear_output to kernel and HTML notebook.

This enables the clearing of output during the execution of a cell. It can be used for simple forms of animation in the notebook.
2011-10-18 17:55:13 -07:00
MinRK
033c9d9848 Add tooltips to the notebook via 'title' attr.
All buttons, show/hide clickable areas, etc. should have some tooltip describing
what they do.  There are jQuery plugins for enhanced tooltips, but this gets
the lightest version working.

closes #436
2011-10-18 17:43:29 -07:00
MinRK
24d37b6bcc add channel-selection to clear_output
example notebook updated accordingly
2011-10-17 19:27:50 -07:00
Brian Granger
10deb3b744 Adding clear_output to kernel and HTML notebook. 2011-10-17 16:19:58 -07:00
Fernando Perez
9fa9f0b15f Merge pull request #884 from fperez/nb-usability
Various Notebook usability fixes:

- add kernel restart dialog confirmation (it destroys the user session)
- add missing keybindings
- change language from 'terminal mode' to 'in-place execution' which is more descriptive
- adjust spacing/padding and colors slightly for readability and better use of space in small screens.
- add line numbering toggle to code cells.  Triggered with C-m-l.
- show keybindings in monospaced font.
- add QuickHelp button that is always visible and at the top.
- add missing keybindings for kernel interrupt/restart from the kbd.
2011-10-17 16:10:25 -07:00
Fernando Perez
55223d0414 Adjust title area sizes to improve alignment. 2011-10-17 16:07:40 -07:00
MinRK
a42f678fd1 Merge PR-883
Notify user if notebook save fails.

closes #883
2011-10-17 15:24:53 -07:00
Fernando Perez
781c5ad281 Underline quick help button key accelerator (h). 2011-10-17 15:23:57 -07:00
MinRK
8d139492ce show_keyboard_shortcuts -> toggle_keyboard_shortcuts
Now multiple calls no longer show multiple instances of the shortcut dialog.  Rather, clicking the quick help, or invoking `C-m h` will hide
the dialog if shown.
2011-10-17 15:02:05 -07:00
MinRK
53d10a61ab fix quickhelp widget
Move header.js -> quickhelp.js, as it not longer acts on whole header.
2011-10-17 14:58:08 -07:00
Thomas Kluyver
74771e4037 Add ability to open the notebook in a browser when it starts. 2011-10-17 22:33:02 +01:00
Fernando Perez
b06d0f03c6 Adjust cell background and number color after review with @minrk. 2011-10-17 14:00:38 -07:00
Fernando Perez
77c62893bc Keep kernel-related bindings together in code. 2011-10-17 00:43:47 -07:00
Fernando Perez
1a109765b8 Clean up accidentally introduced hard tabs in JS code. 2011-10-17 00:37:27 -07:00
Fernando Perez
83790b7e29 Fix text cell color, was too light to be seen on certain monitors/browsers. 2011-10-16 20:02:53 -07:00
Fernando Perez
e9d744f06c Add quick help button: broken ATM, style and binding aren't working.
Help needed here, will discuss during pull request before merging.
2011-10-16 20:02:53 -07:00
Fernando Perez
6d0715988f Change button labels in restart dialog to action words. 2011-10-16 20:02:53 -07:00
Fernando Perez
e852a86669 Add confirmation dialog to kernel restart action. 2011-10-16 20:02:53 -07:00
Fernando Perez
e41ba5a75c Refactor line num. toggle into proper function, access via C-m-l.
This makes the keybinding consistent with the rest, updated help dialog.
2011-10-16 20:02:53 -07:00
Fernando Perez
8fb9f71e42 Use monospaced font for keybinding display. 2011-10-16 20:02:53 -07:00
Fernando Perez
e8326241eb Add C-m-{'i', '.'} as keybindings for kernel interrupt/restart. 2011-10-16 20:02:53 -07:00
Fernando Perez
3db974a4f4 Padding adjustments to better use vertical and horizontal whitespace.
Verified that all prompts align correctly on linux/chrome + ffox, and
that input prompts up to 4 digits long still fit.
2011-10-16 20:02:53 -07:00
Fernando Perez
e00e604144 Add Ctrl-L as a way to toggle line-numbers for any individual code cell 2011-10-16 20:02:53 -07:00
MinRK
7041224f96 fix typo in stripping kernel args in nb and qt
closes #885
2011-10-16 19:56:47 -07:00
Felix Werner
a4bec7e65d Fixed testing of new notebook name before saving. 2011-10-16 19:35:18 +02:00
Felix Werner
f5b52442aa Notify the user of errors when saving a notebook. 2011-10-16 18:24:12 +02:00
Felix Werner
a89d947322 Update document title and last_saved_name only after a successful save. 2011-10-16 18:18:32 +02:00
Fernando Perez
13377a2d23 Merge branch 'carreau-mathjax-warning'
Warn user if MathJax can't be fetched from notebook

Closes #744.
2011-10-15 01:28:08 -07:00
Fernando Perez
87462b4259 Minor fixes to text and formatting of error message. 2011-10-15 01:27:36 -07:00
Fernando Perez
df43150509 Merge pull request #850 from fperez/codemirror
Update codemirror to 2.15 and make the code internally more version-agnostic.

Added our own README file with information about what changes we carry to upstream CodeMirror and what version we currently use.
2011-10-14 13:30:55 -07:00
Matthias BUSSONNIER
85ea4222fb Hide warning message about matjax when page load
also fix Matjax->MathJax
2011-10-14 19:28:36 +02:00
Matthias BUSSONNIER
b05d2c21a9 Matjax Warning message improvement.
merge '<script>' balises.
	Improve message text and style.
	Remove instead of hide
2011-10-14 11:10:15 +02:00
Fernando Perez
00af93da43 IPython-specific changes to CodeMirror: recognize '?' in Python mode. 2011-10-13 19:55:21 -07:00
MinRK
52592d47b1 fix missing trailing comma in kernel.js 2011-10-13 13:31:18 -07:00
Matthias BUSSONNIER
4d5e605082 Warn user if MathJax can't be fetched from notebook
closes #744
2011-10-13 20:50:41 +02:00
MinRK
4d7ef4899e enable HMAC message signing by default in notebook kernels
This is separate from previous, because it is more likely to be rejected.

It requires the the Session objects in Handlers get a reference all the way back up to the IPython App that started the environment.
2011-10-12 21:28:04 -07:00
MinRK
b01c6ef0c4 use zmq.KernelManager to manage individual kernels in notebook
This means that proper restart is now available, rather than
killing and starting a new kernel, breaking connections to
secondary frontends.
2011-10-12 21:28:04 -07:00
MinRK
e38729c9b2 fix kernel_argv scrubbing to cover args passed with space
$> ipqt --shell 12345

would not scrub the port, previously
2011-10-12 21:28:03 -07:00
MinRK
4eb4926812 use ROUTER/DEALER sockets for stdin
stdin requests are now directed to the frontend that made the execution
request that called raw_input.

allow_stdin flag added to execution_request to indicate whether stdin_requests are allowed.

StdInNotImplementedError exception class added to IPython.core.error, and is raised if raw_input is called from execute requests where allow_input is undefined.

closes gh-673
2011-10-12 14:29:22 -07:00
Fernando Perez
b8bab4a051 Update templates to new directory name for codemirror. 2011-10-09 16:36:34 -07:00
Fernando Perez
9cca38f452 Do not use version # in codemirror directory name.
Simply call it 'codemirror', so we don't have explicit version numbers
inside a bunch of files.

A file called ipython-version-N.NN will be kept to easily let us know
which version we're shipping with IPython.
2011-10-09 16:36:34 -07:00
Fernando Perez
6b0fdf2356 Update CodeMirror code to v2.15 2011-10-09 16:36:34 -07:00
Fernando Perez
99c90f43c9 Merge pull request #845 from takluyver/py3-tests
This gets the bulk of the test suite passing on Python 3 - there's just a few isolated cases where it still doesn't.
2011-10-09 11:54:13 -07:00
Fernando Perez
43a4db17e6 Merge pull request #830 from minrk/stream
Several improvements to stdout/stderr handling and visual layout of cells.

Now stdout and stderr are kept contiguous (in a single div) if they are being written to continuously, and stderr is shown with a light red background to help distinguish from stdout.

Further, input cells now have a light gray background to help distinguish them from plain stdout areas.
2011-10-08 15:52:53 -07:00
Thomas Kluyver
c61d455a77 Various fixes to tests in IPython.utils. 2011-10-08 13:08:44 +01:00
MinRK
940d636656 fix Input prompt/code alignment
with note for future reference
2011-10-07 20:59:54 -07:00
MinRK
30028c3ca0 round corner and light bg on code areas
c/o @fperez
2011-10-07 19:05:19 -07:00
Fernando Perez
eba1a8c796 Merge pull request #801 from takluyver/py3-notebook
Gets the notebook working under Python3.
2011-10-07 18:57:32 -07:00
MinRK
c022dca01a small CSS adjustments in notebook
* add think border around input area
* change background instead of foreground on stderr
* only stderr/stdout are output_stream, general text (including streams) is output_text
* reduce vertical padding on stream output, per @fperez
2011-10-07 17:01:58 -07:00
Bernardo B. Marques
8e32204222 remove all trailling spaces 2011-10-04 11:14:41 -03:00
Thomas Kluyver
609e4134ff Decode data for saving notebook, allowing saving in Python 3. 2011-10-02 16:19:30 +01:00
MinRK
788d7e6348 allow stdout/stderr to have distinct css
make stderr output darkred
2011-09-30 17:09:46 -07:00
MinRK
a9d9a8b72c support contiguous stream output in notebook
Consecutive messages to stdout or stderr will not be split
into separate divs, until a new message to different stream
arrives.

Appending will only occur when the latest output is the same
as the new one. Interleaving messages will still result in
multiple divs.
2011-09-30 17:08:04 -07:00
MinRK
56c8403ac0 allow more processing in test_for
* test_for uses import_item, instead of __import__
* test_for now allows a callback, for processing the result of import_item prior to comparison with min_zmq
* callback is only called when min_zmq is defined
* callback's default is to just return mod.__version__
* use this to check tornado version, and zmq as a version tuple
* fix pexpect check to use external.pexpect
2011-09-23 16:57:40 -07:00
MinRK
50f9bd9ceb update tornado dependency to 2.1
The notebook server will no longer try to launch with 2.0.

Test imports and install doc updated to match.
2011-09-23 15:03:16 -07:00
Thomas Kluyver
0f5c0f67c9 Fix for notebook in Python 3. 2011-09-18 17:28:59 +01:00
MinRK
5dd7dce0b2 fix installation of zmq IOLoop into tornado
incorrectly overrode the module, rather than the class in the module, which is more reliable.
2011-09-15 15:12:52 -07:00
Brian Granger
b7ab64f304 fixConsole no longer trims the final text. 2011-09-12 21:12:08 -07:00
MinRK
88236a7ab8 always use StringIO, never cStringIO
cStringIO is not unicode-safe
2011-09-12 12:28:26 -07:00
MinRK
3ee19c6563 only store hashed user_id in notebook cookie
hashed user_id is used for authentication, rather than hashed password.  Thus, user cookie is only set after authentication succeeds.
2011-09-06 15:48:20 -07:00
Brian E. Granger
98393e9a28 Merge branch 'enh/httpauth' of https://github.com/satra/ipython into satra-enh/httpauth 2011-09-06 14:13:12 -07:00
Brian E. Granger
1ae92b2d88 Merge pull request #748 from ellisonbg/tornado-iptest
Check for tornado before running frontend.html tests.
2011-09-06 14:10:58 -07:00
MinRK
d11ef986a4 authenticate Websockets with the session cookie
Now all Notebook connections are authenticated.
2011-08-30 16:27:12 -07:00
MinRK
152fe1b6f1 Authenticate all notebook requests (except websockets)
* BaseHandler renamed AuthenticatedHandler
* also clears cookies if invalid, to prevent repeated 'Invalid cookie signature' warning messages.
2011-08-30 12:13:30 -07:00
MinRK
dbfe19f6e2 notebook auth adjustments
* keyword -> password
* removed password alias
* add login.html as template
* new cookie key for each Server instance
2011-08-30 11:24:52 -07:00
Brian E. Granger
8c76fcf71c Fixing Ctrl-Enter on Firefox. 2011-08-30 09:51:06 -07:00
Brian E. Granger
408fde5aa3 Check for tornado before running frontend.html tests. 2011-08-30 09:39:57 -07:00
Satrajit Ghosh
00986be4f8 fix: added keyword to notebook aliases 2011-08-29 21:36:39 +03:00
Satrajit Ghosh
546a0147fb fix: changed keyword input field to type password 2011-08-27 22:37:44 +03:00
MinRK
549cf4ee2a fix undefined 'session_id' member in kernel.js 2011-08-26 23:18:48 -07:00
Satrajit Ghosh
c4d90c8a08 enh: added authentication ability for webapp 2011-08-27 07:09:57 +02:00
Brian E. Granger
1021c3dc88 Merge branch 'fix/https' of https://github.com/satra/ipython into satra-fix/https 2011-08-25 11:43:58 -07:00
Brian E. Granger
c6d030761e Merge branch 'placeholder' of https://github.com/minrk/ipython into minrk-placeholder 2011-08-25 11:41:26 -07:00
MinRK
3aed0a0b94 use null char to start text cell placeholders 2011-08-25 08:51:30 -07:00
Satrajit Ghosh
7d0467df1c fix: applied fernando's if simplification fix 2011-08-25 12:25:26 +02:00
Satrajit Ghosh
1ae18b5be7 fix: display secure url with proper protocol 2011-08-25 11:42:17 +02:00
Fernando Perez
d1cfedaf16 Leave commented-out stable url code for reference, with TODO. 2011-08-25 02:29:33 -07:00
Brian E. Granger
f1e4a59777 Adding messages to HTTPError raising.
These messages are not returned to the browser, but are printed
to the server logs and will help the code readability.
I have also used a more specific code in some cases.
2011-08-24 11:29:16 -07:00
Brian E. Granger
acc81dfbee Ctrl-Enter now does not delete input, but selects it. 2011-08-24 10:31:41 -07:00
Brian E. Granger
fa8ab6f37d Going back to using uuid.uuid4() for notebook ids.
We were having problems with notebook renaming when using uuid5,
as there are many places in the code where we assume that the
notebook id is unique and unchanging as long as the notebook
server runs.
2011-08-24 10:16:21 -07:00
Brian E. Granger
706819d81c Merge branch 'htmlnotebook' 2011-08-23 15:47:57 -07:00
Brian E. Granger
0b19dd7bfe Temporary fix for placeholder related CM bug. 2011-08-23 12:31:37 -07:00
Brian E. Granger
c2df8a9005 Merge branch 'mathjax' of https://github.com/minrk/ipython into minrk-mathjax 2011-08-22 16:24:53 -07:00
MinRK
ba1df9be55 underline keyboard shortcut letter on buttons 2011-08-21 17:55:45 -07:00
Fernando Perez
b8c1ab1ada Fix above/below keybinding mismatch and rename api to use above/below 2011-08-21 17:54:03 -07:00
Stefan van der Walt
3a8811e115 Add code highlighting to markdown cells. 2011-08-21 14:14:16 -07:00
MinRK
638bc02a8f update notebook template to prefer offline mathjax 2011-08-20 17:01:56 -07:00
Stefan van der Walt
dfeb4342ed Align colons in help dialog. 2011-08-20 14:56:10 -07:00
Brian E. Granger
d60edf973d Changing prev/next keyboard shortcut to use p/n. 2011-08-19 22:00:25 -07:00
Brian E. Granger
b89d656a3c Fixing console.log messages related to keyboard shortcuts. 2011-08-19 21:49:32 -07:00
Brian E. Granger
cf0c66fe4e Adding keyboard shortcut help dialog. 2011-08-19 21:24:08 -07:00
Brian E. Granger
d3e67106a1 Adding keyboard shortcuts. 2011-08-19 20:10:32 -07:00
Fernando Perez
2522a651d9 Right-align prompts to remove spurious whitespace. 2011-08-19 17:46:46 -07:00
Brian E. Granger
5b19a85fa4 Adjusting width of prompt area. 2011-08-19 17:23:54 -07:00
Brian E. Granger
6798c5cc97 All output types are not indented. 2011-08-19 17:01:12 -07:00
Brian E. Granger
919a393622 Fixing bug in new metadata implementation. 2011-08-19 16:21:09 -07:00
Brian E. Granger
5cb8bb1f27 Reorganize the L panel buttons. 2011-08-19 16:18:59 -07:00
Brian E. Granger
ab384fc787 Cell collapse/expand is not called "Toggle". 2011-08-19 15:59:51 -07:00
Brian E. Granger
133b96d086 Changing CodeMirror-scroll to overflow-y: hidden.
* It seems that our old setting of visible was causing scroll bars
  to appear if font sizes change in Chrome.
* Also changed json -> xml in Download UI.
2011-08-19 15:49:50 -07:00
Brian E. Granger
ea8b4de42d Implemented metadata for notebook format. 2011-08-19 15:44:32 -07:00
Brian E. Granger
7e7a6ab50b Notebook upload handles filenames with periods. 2011-08-19 11:41:48 -07:00
Brian E. Granger
d5fe8328e5 Converting notebooks to JSON format. 2011-08-18 23:22:55 -07:00
Brian E. Granger
0784df1b9d Making JSON the default .ipynb format. 2011-08-18 23:11:50 -07:00
Brian E. Granger
4d15c8b8e5 Fixing logic for rename behavior. 2011-08-18 21:34:15 -07:00
Brian E. Granger
8f149a2623 Help links work on Firefox. 2011-08-18 20:37:47 -07:00
Brian E. Granger
cbe3563d8d Save button becomes Rename when the notebook name changes. 2011-08-18 20:23:03 -07:00
Brian E. Granger
f35f9323e6 Better tabindex support. 2011-08-18 20:16:33 -07:00
Brian E. Granger
1293556dde Double clicking on the end space will insert a new cell. 2011-08-18 20:07:14 -07:00
Brian E. Granger
b17100a63b Merge branch 'htmlnotebook_list_notebooks' of https://github.com/stefanv/ipython into stefanv-htmlnotebook_list_notebooks 2011-08-18 19:53:18 -07:00
Brian E. Granger
7d53b7a7b2 Merge branch 'stefanv-htmlnotebook_publish' into htmlnotebook 2011-08-18 19:48:51 -07:00
Brian E. Granger
1d43249604 Adding page break logic to the print css.
* I have added page-break-inside logic to div.input and
  div.output_area.
* Fixed a bug in CodeCell that was putting the output_area class
  on the wrong div.
2011-08-18 19:47:52 -07:00
Stefan van der Walt
55ffc1c083 Move glob to global level import. 2011-08-18 19:31:16 -07:00
Stefan van der Walt
fb2c31b2ea Allow period characters in notebook names. 2011-08-18 19:11:49 -07:00
Brian E. Granger
6243652cfd Changing notebook uuid algorithm to preserver across sessions. 2011-08-18 18:43:33 -07:00
Brian E. Granger
69d2e18f7a Merge branch 'htmlnotebook_publish' of https://github.com/stefanv/ipython into stefanv-htmlnotebook_publish 2011-08-18 14:12:12 -07:00
Brian E. Granger
b5b4cf260f Modifying CodeMirror focus hack to work better.
I had removed a text area focus event earlier today and that
broke the . key. We are still having problems with CodeMirror
elements gaining focus, but this seems to fix the issue.
2011-08-17 17:19:42 -07:00
Stefan van der Walt
823124215c Refactor static printing. 2011-08-17 17:07:58 -07:00
Brian E. Granger
cff986a539 Removed HTMLCell from UI and added better placeholder logic. 2011-08-17 15:29:22 -07:00
Brian E. Granger
0f3bc468e3 Better alert message if no WebSockets are detected. 2011-08-17 15:11:55 -07:00
Brian E. Granger
e08bdc3d6f Better WebSocket detection added. 2011-08-17 15:01:46 -07:00
Brian E. Granger
164ef7c9cb Adding code to handle MozWebSocket for FF 6. 2011-08-17 14:55:44 -07:00
Brian E. Granger
e176318797 More review changes.
* Favicon.ico is served.
* Test suit now passes.
* Help links work for for me.
* Other changes made to address inline comments.
* The printing of long lines is an extremely subtle issue and I will open an issue for it.
* zmqws.py is completely gone so the naked print is not an issue.
* ipython-notebook removed from scripts.
* Updated copyright and authors of files.
* Fixed missing docstrings in IPython.nbformat.
2011-08-17 13:21:19 -07:00
Brian E. Granger
63a148fad5 Don't scroll to bottom when last cell is selected. 2011-08-17 11:50:57 -07:00
Stefan van der Walt
49ad421c8b htmlnotebook: Suppress cell boundary when publishing. 2011-08-16 22:40:36 -07:00
Stefan van der Walt
201999642f Implement static publishing of HTML notebook. 2011-08-16 18:56:34 -07:00
Brian E. Granger
70cf4b80ba Stripping notebook server flags from kernel's argv. 2011-08-16 11:58:20 -07:00
Brian E. Granger
1271cfcfcd Removing old CodeMirror version. 2011-08-15 23:40:31 -07:00
Brian E. Granger
dfac7eca2b WebSocket url is now passed to browser when a kernel is started. 2011-08-15 23:35:01 -07:00
Matthew Brett
acf85b0824 BF - allow nose with-doctest setting in environment
IPDoctest replaces the normal doctest plugin.  Previously we did this by
initializing the builtin plugins but skipping the doctest plugin.
However, if the user has a noserc file with 'with-doctest=1' or the
environment variable 'NOSE_WITH_DOCTEST', then nose will try and
initialize the doctest plugin when it isn't there, and barf.  This
commit defers the removal of the doctest plugin to the configuration
stage, so doctest can be enabled before it is thrown away by us.
2011-08-15 19:12:12 -07:00
Brian E. Granger
e45e339344 Kernel/notebook mapping is removed when a kernel dies.
* Previously, when a kernel died due to an external cause, the
  notebook/kernel mapping was not removed, so the kernel would
  be resused even though it was dead.
* The heartbeat now properly removes the notebook/kernel mapping.
2011-08-15 15:06:11 -07:00
Brian E. Granger
3602f7f023 Date is properly removed from JSON reply before WebSocket forward.
* Both the header and parent_header have a date field that cannot
  be json serialized. This field is just removed for now, but
  in the future, we will covert the date to a ISO8601 field.
* Better error handling around this code has also been added
  to prevent the server from crashing due to malformed messages.
2011-08-15 14:43:49 -07:00
Brian E. Granger
726f8c1780 Pager is not activated if the pager text is empty.
* Things like asdf.*? used to open the pager even though there
  was nothing to show.
2011-08-15 14:25:49 -07:00
Brian E. Granger
a086fc6d83 I like ClearAll better than Clr All. 2011-08-15 14:21:28 -07:00
Brian E. Granger
c7a12effa1 Export works with filenames having spaces.
* The fix was to put the filename in double quotes in the
  Content-Disposition header.
* Export As/Clear All have been renamed to Export and Clr All
2011-08-15 14:19:36 -07:00
Brian E. Granger
bf8ba0889e Code cell gets focused after "To Code" is triggered. 2011-08-15 14:15:21 -07:00
Brian E. Granger
dcd25caf9a Adding additional whitespace at botton of notebook for TAB comp. 2011-08-15 14:10:27 -07:00
Brian E. Granger
0790979100 Fixing tab completion edge cases. 2011-08-15 14:03:17 -07:00
Brian E. Granger
60147f495f A single tab-completion match is now automatically selected. 2011-08-14 23:41:54 -07:00
Brian E. Granger
e445ad1796 Fixing latex rendering bug. 2011-08-14 23:30:11 -07:00
Brian E. Granger
75c54c887e Notebook id removed from the notebook format. 2011-08-14 22:38:46 -07:00
Brian E. Granger
3d7d0f8b0b Added a notebook dirty flag that is used when exiting page. 2011-08-14 22:01:39 -07:00
Brian E. Granger
e911393836 Browser window title follows the name of the notebook. 2011-08-14 21:48:20 -07:00
Brian E. Granger
3be2ace4f2 Autotry additional ports if 8888 if already in use. 2011-08-14 21:41:01 -07:00
Brian E. Granger
63de9cd719 Fixing bug that caused plots to not be saved.
CodeCell.append_mime_type needed a default element.
2011-08-14 21:29:07 -07:00
Brian E. Granger
a9d6f2eb2d Major refactor of kernel connection management in the notebook.
* Full kernel heartbeating is working.
* Connections between the notebook and server and now created
  a new each time there is a WebSocket connection. Each channel is
  also handled separately. This dramatically simplifies the
  server code and makes for a more scalable system.
2011-08-14 17:58:25 -07:00
Brian E. Granger
b264e21a6d Clear all output is implemented. 2011-08-13 16:18:16 -07:00