Commit Graph

138 Commits

Author SHA1 Message Date
Min RK
c62298f40b empty default_url when outside IPython 2015-01-27 10:51:33 -08:00
Min RK
2d0b8b1d6a use default_url for logo link 2015-01-27 10:39:50 -08:00
Min RK
1cac03528b use single WebSocket connection for all channels
multiplex on a 'channel' key in message,
rather than separate websockets.

Unlike zmq, there aren't different message patterns that require the channels to be separate.

Reduces FD count by factor of 3 and connection complexity in js.
2015-01-06 11:15:15 -08:00
Min RK
c6b610f04f make FilesRedirectHandler redirect logic accessible
from a static method

instead of calling FRH.get(self), which doesn't work on Python 2
due to unbound method class checking.
2014-12-27 15:11:42 -08:00
Min RK
979eb2d281 don't enforce .ipynb extension in URLs
let ContentsManager decide what's a notebook
2014-12-19 12:42:28 -08:00
Min RK
41b548bacc use gen.Return for Python 2 2014-12-16 21:20:09 -08:00
Min RK
dc70ae6b07 allow ContentsManager methods to return Futures
mainly adding `@gen.coroutine` and `yield gen.maybe_future` all over the place.

No FileContentsManager methods are actually async at this point.
2014-12-16 15:01:59 -08:00
Thomas Kluyver
4c62fd4210 Merge pull request #7149 from minrk/thread-nb
run test notebook server in thread
2014-12-10 10:06:02 -08:00
Thomas Kluyver
4cee2f5f3a Merge pull request #7128 from minrk/more-v-less-m
A little more V, a little less M in the text editor
2014-12-09 14:03:04 -08:00
MinRK
1ec9cfc25c use IOLoop.current in a few places
better allow notebook server to run in a thread
2014-12-08 15:47:56 -08:00
Min RK
c81609f5d6 redirect /edit/ to /files/ if not (utf8) text 2014-12-08 11:34:21 -08:00
Min RK
8c2ced501d address review in custom auth 2014-12-08 10:51:14 -08:00
Min RK
dbb5e9a107 allow LoginHandler to override get_current_user 2014-12-07 14:10:54 -08:00
Min RK
bb01b716e0 allow login_handler to be undefined
(for use outside IPython)
2014-12-07 14:10:53 -08:00
Min RK
16d1f0fd84 update custom auth per review
- pass settings around, not applications
2014-12-07 14:10:53 -08:00
Phil Elson
d81990c941 Added authentication configuration for the notebook app. 2014-12-07 14:10:52 -08:00
Kyle Kelley
858d153bff Remove extraneous pass
YOU SHALL NOT PASS!
I rap fast like Shadowfax!
2014-12-02 15:12:14 -06:00
Kyle Kelley
219ca3046a Clean up default content security policy setup 2014-12-02 15:12:14 -06:00
Kyle Kelley
17d1c2d488 Report CSP violations as warnings. 2014-12-02 15:12:14 -06:00
Kyle Kelley
5343787e9d Remove CSP reporting since it fills console. 2014-12-02 15:12:14 -06:00
Kyle Kelley
5065429bfd Clean up logs, enable debug log for header except 2014-12-02 15:12:13 -06:00
Kyle Kelley
bd85ff25df Restrict frame-ancestors to 'self' in CSP 2014-12-02 15:12:13 -06:00
Kyle Kelley
3068733c46 Log reporter policy to debug 2014-12-02 15:12:13 -06:00
Kyle Kelley
cb19f07c9a csp_report_uri caused a cyclic dependency 2014-12-02 15:12:13 -06:00
Kyle Kelley
5b53d2db45 Set default policy to nothing, only report. 2014-12-02 15:12:13 -06:00
Kyle Kelley
23b9f09177 Log CSP violations via report 2014-12-02 15:12:13 -06:00
Kyle Kelley
a00d6930f2 Adapt headers to using Content Security Policy 2014-12-02 15:12:12 -06:00
Min RK
9a4de7b78d Merge pull request #7041 from takluyver/nbconfig-manager
ConfigManager class for frontend config
2014-12-01 11:32:09 -08:00
Thomas Kluyver
98cd14c04c Remove profile_dir from handler class 2014-11-25 18:10:14 -08:00
Thomas Kluyver
febd670716 First stab at ConfigManager class 2014-11-25 18:02:24 -08:00
Min RK
3cf5262b0c don't cache files in static/custom or nbextensions
always rely on 304 for cache content there
2014-11-24 21:29:45 -08:00
Min RK
a492ac554d add '?v=<date>' to require URLs
- resets cache on server restart
- don't cache requests on master (rely on 304 for content caching)
2014-11-24 20:58:04 -08:00
MinRK
fe730a60c2 set no-cache header in StaticFileHandlers
rely on 304 Not Modified for caching content
2014-11-24 20:19:55 -08:00
Min RK
48d77b3f03 Merge pull request #6886 from minrk/tornado-4
require tornado 4
2014-11-13 12:23:32 -08:00
Min RK
e4e1d47203 Merge pull request #6694 from takluyver/config-rest-api
Add REST API for retrieving, storing and updating config
2014-11-12 21:40:30 -08:00
Min RK
a257e580a0 Merge pull request #6854 from takluyver/post-new-terminal
Create new terminals with POST request to API
2014-11-11 14:12:54 -08:00
Min RK
ba370731a5 fix and test path regexes
- require leading `/`
- match empty string
- disallow consecutive `//`

This means that path_regex should be included as `/api/whatever%s`, not `/api/whatever/%s`
2014-11-10 14:02:21 -08:00
MinRK
3ada0c2c27 Remove separate 'path', 'name' in Contents API
- path is full path (including name)
- name is only used for read-only convenience, and plays no role in any API
- remove 'untitled upload' (POST with content and no path)
2014-11-10 14:02:18 -08:00
Min RK
19bcc5fed9 bump minimum tornado version to 4.0
remove various websocket workaround for tornado 3
2014-11-07 22:39:25 -08:00
Min RK
f8d59bcd9e forward-port draft76 websockets
from tornado-3.2.2

only enabled during testing with phantomjs
2014-11-07 22:39:24 -08:00
Thomas Kluyver
a76a546627 Add REST API for retrieving, storing and updating config 2014-11-06 11:18:04 -08:00
Thomas Kluyver
f8ec8d4abe Various minor fixes from review 2014-11-03 10:18:28 -08:00
Thomas Kluyver
14106cbd66 Move contents API module into services 2014-11-03 10:18:27 -08:00
Jeff Hemmelgarn
53463898eb Move contentmanager to contents 2014-11-03 10:18:27 -08:00
KesterTong
3994d4d56a Adds configuration options to use Google Drive content manager
Adds the key contentmanager_js_source to webapp_settings that allows for specifying the content manager JavaScript source file.  Also adds a NotebookManager subclass, ClientSideNotebookManager, which does minimal logic.  This class is used when the JavaScript content manager doesn't use the Python notebook manager, but rather implements that logic client side, as is the case for the Google Drive based content manager.

A sample command line that uses the Google Drive content manager, and the ClientSideNotebookManager, is

ipython notebook --NotebookApp.webapp_settings="{'contentmanager_js_source': 'base/js/drive_contentmanager'}" --NotebookApp.notebook_manager_class="IPython.html.services.notebooks.clientsidenbmanager.ClientSideNotebookManager"
2014-11-03 10:18:04 -08:00
Min RK
96183a60a0 create new terminals with POST /api/terminals
instead of GET terminals/new

to be consistent with creating new notebooks.

We had to stop using GET notebooks/new
because browsers would create new notebooks when making preview thumbnails for commonly visited pages, etc.
I assume the same issue would apply to terminals
2014-11-02 11:09:03 -08:00
Matthias Bussonnier
63d4534959 Get pre_get to work and make session logs when adapter changes 2014-11-01 19:39:40 +01:00
Min RK
965102ba60 Merge pull request #6554 from Carreau/itsallaboutme
Add About IPython
2014-10-30 14:23:16 -07:00
Min RK
e5b135a905 debugging websocket connections
- add debug statement at the very beginning of a web socket request
- add debug statement in open, indicating that the connection has been accepted
- add timeout, so failed or slow kernel_info doesn't cause the request to never get a response
- don't send kernel_info_request before authenticating the request

The last one required some icky coroutine shenanigans,
because of our subclass structure, but it should work fine.
2014-10-29 09:17:52 -07:00
Bussonnier Matthias
5ecf6efdac cache sys-info 2014-10-29 14:55:12 +01:00