##// END OF EJS Templates
generate `ipython console` config file...
generate `ipython console` config file when populating a profile

File last commit:

r18771:e4d57dfd
r18845:f3cedfd8
Show More
main.js
147 lines | 4.3 KiB | application/javascript | JavascriptLexer
Jonathan Frederic
Started work to make tree requirejs friendly.
r17189 // Copyright (c) IPython Development Team.
// Distributed under the terms of the Modified BSD License.
Jonathan Frederic
Use ipython namepsace for instances.
r17193 require([
Jonathan Frederic
MWE,...
r17200 'jquery',
Min RK
update frontend with path/name changes...
r18752 'base/js/namespace',
'base/js/dialog',
Jonathan Frederic
Fixed events
r17195 'base/js/events',
Jonathan Frederic
Started work to make tree requirejs friendly.
r17189 'base/js/page',
'base/js/utils',
Jeff Hemmelgarn
Move contentmanager to contents
r18643 'contents',
Jonathan Frederic
Started work to make tree requirejs friendly.
r17189 'tree/js/notebooklist',
'tree/js/clusterlist',
'tree/js/sessionlist',
'tree/js/kernellist',
Thomas Kluyver
Add list of available terminals in the dashboard
r18555 'tree/js/terminallist',
Jonathan Frederic
Started work to make tree requirejs friendly.
r17189 'auth/js/loginwidget',
MinRK
note loaded, unused dependencies in require
r17323 // only loaded, not used:
MinRK
add bootstrap shim for require...
r17312 'jqueryui',
'bootstrap',
Jason Grout
Trigger app_initialized event *after* the 'global' IPython object is initialized
r17319 'custom/custom',
Jonathan Frederic
Started work to make tree requirejs friendly.
r17189 ], function(
Min RK
update frontend with path/name changes...
r18752 $,
IPython,
dialog,
Jonathan Frederic
Fix imports of "modules",...
r17202 events,
Min RK
update frontend with path/name changes...
r18752 page,
utils,
contents_service,
Jonathan Frederic
Fix imports of "modules",...
r17202 notebooklist,
clusterlist,
sesssionlist,
Thomas Kluyver
Add list of available terminals in the dashboard
r18555 kernellist,
terminallist,
Jonathan Frederic
Fix imports of "modules",...
r17202 loginwidget){
Min RK
update frontend with path/name changes...
r18752 "use strict";
Brian E. Granger
Implemented basic notebook browser and fixed numerous bugs.
r4488
Jonathan Frederic
Fix imports of "modules",...
r17202 page = new page.Page();
jon
In person review with @ellisonbg
r17210 var common_options = {
Jonathan Frederic
Almost done!...
r17198 base_url: utils.get_body_data("baseUrl"),
notebook_path: utils.get_body_data("notebookPath"),
Jonathan Frederic
Started work to make tree requirejs friendly.
r17189 };
Min RK
update frontend with path/name changes...
r18752 var session_list = new sesssionlist.SesssionList($.extend({
jon
In person review with @ellisonbg
r17210 events: events},
common_options));
Min RK
update frontend with path/name changes...
r18752 var contents = new contents_service.Contents($.extend({
KesterTong
Replace other methods with ContentManager.new_notebook...
r18624 events: events},
common_options));
Min RK
update frontend with path/name changes...
r18752 var notebook_list = new notebooklist.NotebookList('#notebook_list', $.extend({
Jeff Hemmelgarn
Move contentmanager to contents
r18643 contents: contents,
jon
In person review with @ellisonbg
r17210 session_list: session_list},
common_options));
Min RK
update frontend with path/name changes...
r18752 var cluster_list = new clusterlist.ClusterList('#cluster_list', common_options);
var kernel_list = new kernellist.KernelList('#running_list', $.extend({
jon
In person review with @ellisonbg
r17210 session_list: session_list},
common_options));
Thomas Kluyver
Only display terminals in dashboard if terminals are available
r18557
Min RK
update frontend with path/name changes...
r18752 var terminal_list;
Thomas Kluyver
Only display terminals in dashboard if terminals are available
r18557 if (utils.get_body_data("terminalsAvailable") === "True") {
terminal_list = new terminallist.TerminalList('#terminal_list', common_options);
}
Min RK
update frontend with path/name changes...
r18752 var login_widget = new loginwidget.LoginWidget('#login_widget', common_options);
Zachary Sailer
removed '/new' URL and added POST notebook request
r13016
Thomas Kluyver
Various minor fixes from review
r18659 $('#new_notebook').click(function (e) {
Thomas Kluyver
Open window before creating new notebook...
r18771 var w = window.open();
Min RK
contents.new_untitled to match Python API
r18760 contents.new_untitled(common_options.notebook_path, {
Min RK
address review in contents service...
r18758 type: "notebook",
Kester Tong
Modifies Contents API to return Error objects...
r18661 success: function (data) {
Thomas Kluyver
Open window before creating new notebook...
r18771 w.location = utils.url_join_encode(
common_options.base_url, 'notebooks', data.path
);
Thomas Kluyver
Don't do UI stuff in contents API module
r18649 },
Kester Tong
Modifies Contents API to return Error objects...
r18661 error: function(error) {
Thomas Kluyver
Open window before creating new notebook...
r18771 w.close();
Thomas Kluyver
Don't do UI stuff in contents API module
r18649 dialog.modal({
title : 'Creating Notebook Failed',
Kester Tong
Modifies Contents API to return Error objects...
r18661 body : "The error was: " + error.message,
Thomas Kluyver
Don't do UI stuff in contents API module
r18649 buttons : {'OK' : {'class' : 'btn-primary'}}
});
}
});
Zachary Sailer
removed '/new' URL and added POST notebook request
r13016 });
Jonathan Frederic
Fix imports of "modules",...
r17202
Matthias BUSSONNIER
dashboard autorefresh...
r6844 var interval_id=0;
// auto refresh every xx secondes, no need to be fast,
// update is done at least when page get focus
var time_refresh = 60; // in sec
var enable_autorefresh = function(){
//refresh immediately , then start interval
Jeffrey Bush
File list refreshes no longer move the upload filename boxes....
r17651 session_list.load_sessions();
cluster_list.load_list();
Matthias BUSSONNIER
dashboard autorefresh...
r6844 if (!interval_id){
interval_id = setInterval(function(){
Jeffrey Bush
File list refreshes no longer move the upload filename boxes....
r17651 session_list.load_sessions();
cluster_list.load_list();
Matthias BUSSONNIER
dashboard autorefresh...
r6844 }, time_refresh*1000);
}
Jonathan Frederic
Started work to make tree requirejs friendly.
r17189 };
Matthias BUSSONNIER
dashboard autorefresh...
r6844
var disable_autorefresh = function(){
clearInterval(interval_id);
interval_id = 0;
Jonathan Frederic
Started work to make tree requirejs friendly.
r17189 };
Matthias BUSSONNIER
dashboard autorefresh...
r6844
// stop autorefresh when page lose focus
$(window).blur(function() {
disable_autorefresh();
Jonathan Frederic
Started work to make tree requirejs friendly.
r17189 });
Matthias BUSSONNIER
dashboard autorefresh...
r6844
//re-enable when page get focus back
$(window).focus(function() {
enable_autorefresh();
});
// finally start it, it will refresh immediately
enable_autorefresh();
Jonathan Frederic
Started work to make tree requirejs friendly.
r17189 page.show();
Jason Grout
Trigger app_initialized event *after* the 'global' IPython object is initialized
r17319
// For backwards compatability.
IPython.page = page;
IPython.notebook_list = notebook_list;
IPython.cluster_list = cluster_list;
IPython.session_list = session_list;
IPython.kernel_list = kernel_list;
IPython.login_widget = login_widget;
Jonathan Frederic
Started work to make tree requirejs friendly.
r17189 events.trigger('app_initialized.DashboardApp');
Matthias BUSSONNIER
alternate notebook upload methods...
r6838 // bound the upload method to the on change of the file select list
$("#alternate_upload").change(function (event){
Jonathan Frederic
Started work to make tree requirejs friendly.
r17189 notebook_list.handleFilesUpload(event,'form');
Matthias BUSSONNIER
alternate notebook upload methods...
r6838 });
MinRK
fix tab hash / url behavior...
r10927
// set hash on tab click
$("#tabs").find("a").click(function() {
window.location.hash = $(this).attr("href");
Jonathan Frederic
Started work to make tree requirejs friendly.
r17189 });
MinRK
fix tab hash / url behavior...
r10927
// load tab if url hash
if (window.location.hash) {
$("#tabs").find("a[href=" + window.location.hash + "]").click();
}
Brian E. Granger
Implemented basic notebook browser and fixed numerous bugs.
r4488 });