Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closing many notebooks at once #970

Closed
ekeitho opened this issue Jan 18, 2016 · 29 comments
Closed

Closing many notebooks at once #970

ekeitho opened this issue Jan 18, 2016 · 29 comments
Milestone

Comments

@ekeitho
Copy link

ekeitho commented Jan 18, 2016

I'm currently taking a Data Science class at Cal Poly and I've noticed that I have many notebooks and terminals open. I thought it would be helpful to have a button that closes everything at once and pops a dialogue up to make sure of the delete, rather than clicking on every single button to shutdown the notebooks. Even though people can call, $('.btn.btn-warning.btn-xs').click(), to close all notebooks, I think it would be more intuitive to just have a button.

@takluyver
Copy link
Member

You should be able to select all the running notebooks and then click a shutdown button at the top.

@ekeitho
Copy link
Author

ekeitho commented Jan 18, 2016

I'm currently on the "Running" Tab and I tried selecting the notebooks on Chrome, Firefox, and Safari but they are not clickable.
screen shot 2016-01-18 at 2 52 43 pm

@takluyver
Copy link
Member

Aha, I see. You can select them on the files tab, though I think you have to act on one directory at a time. It probably makes sense for them to be selectable in the running tab too.

@minrk minrk added this to the 5.0 milestone Jun 16, 2016
@minrk minrk modified the milestone: 5.0 Jan 13, 2017
@osaid-r
Copy link

osaid-r commented Oct 1, 2017

Hi, I'd like to work on this! Can you direct me to the files where these changes need to be made ?

@takluyver
Copy link
Member

It's either in sessionlist.js or kernellist.js - I'm a bit unsure about the distinction between those two.

@Axle7XStriker
Copy link
Contributor

Is anyone working on this issue? If not, can I take up this issue?

@takluyver
Copy link
Member

I don't think it's being worked on at the moment. @ragnerok , please let us know if you are still looking into it.

@osaid-r
Copy link

osaid-r commented Feb 6, 2018

yeah sorry I couldn't work on it. You can take it up @Axle7XStriker

@Axle7XStriker
Copy link
Contributor

Axle7XStriker commented Feb 14, 2018

So, I have created the user interface for closing many notebooks and terminals at once. But still i am not able to get the desired functionality required for shutting down the notebooks and terminals. Basically the main problem is to store the selected/checked notebooks. I am not able to understand what's happening in the code related to that matter. Please help me in that matter.
Currently the UI looks something like this :-
image
screenshot_2018-02-14_16-50-25
image

@takluyver
Copy link
Member

I imagine it will involve something similar to the shutdown_selected function used for the file list:

NotebookList.prototype.shutdown_selected = function() {
var that = this;
this.selected.forEach(function(item) {
if (item.type === 'notebook') {
that.shutdown_notebook(item.path);
}
});
// Deselect items after successful shutdown.
that.select('select-none');
};

@Axle7XStriker
Copy link
Contributor

I am almost finished implementing the feature, just the notebook refresh part is left, running_list refresh part in particular. When I try to refresh the running_list(kernel list) a call to session_list.load_sessions is made which in turn make a call to session_list.sessions_loaded which in turn make a call to notebook_list.sessions_loaded, but the problem is if an instance of running_list(kernel list) make a call than also in the end the call is made to the instance of notebook_list and not back to the running_list. I am not able to figure out how do i fix this. Need help.

SesssionList.prototype.sessions_loaded = function(data){
this.sessions = {};
var len = data.length;
var nb_path;
for (var i=0; i<len; i++) {
// The classic notebook only knows about sessions for notebooks,
// but the server now knows about more general sessions for
// things like consoles.
if (data[i].type === 'notebook') {
nb_path = data[i].notebook.path;
this.sessions[nb_path] = {
id: data[i].id,
kernel: {
name: data[i].kernel.name
}
};
}
}
this.events.trigger('sessions_loaded.Dashboard', this.sessions);
};

@AlexanderDavid
Copy link

@Axle7XStriker Are you still in need of help? Or have you figured it out?

@Axle7XStriker
Copy link
Contributor

Yes, I still need help, I had really appreciate if you can help me in this regard.

@AlexanderDavid
Copy link

@Axle7XStriker Sure! Have you made any progress since your last update?

@Axle7XStriker
Copy link
Contributor

I have made some progress with regards to the issue as a whole but I haven't found any solution to the problem depicted above.

@LiryChen
Copy link

LiryChen commented Sep 6, 2018

Hey I am a first-timer looking for tasks to do too. I found this issue pretty interesting. Anything I can help with?

@Axle7XStriker
Copy link
Contributor

That's Great. Everything about the issue is already mentioned above. Please have a look at it and ask me anything you didn't understand.

@LiryChen
Copy link

LiryChen commented Oct 2, 2018

Sorry, I don't think I will continue to work on this due to the limited time I have besides school :( I would like to pick something up in the future once I have more free time!

@anjalibhavan
Copy link

Hi! I'm a beginner in open source contributions, but I'd like to try this out. Kindly let me know if anyone else is working on it or something. :)

@Axle7XStriker
Copy link
Contributor

Yeah, this issue is being worked upon. Just one part of the issue is left which is also being worked upon. Although if you have any ideas related to the issue. I'll be glad to hear from you.

@ishanema1
Copy link

Is it still open. If yes I want to work on it.

@kevin-bates
Copy link
Member

Hi @ishanema1 - thank you for your interest in contributing. It looks like #4300 deserves a kick. I'll try to do that. If we find that it's been abandoned or additional help is needed, then your help would be appreciated. Please stay tuned.

@Ajay95
Copy link

Ajay95 commented Apr 9, 2020

@kevin-bates, I would like to work on this issue as well!. Do let me know

@kevin-bates
Copy link
Member

Thank you for interest in helping out @Ajay95! As I mentioned to Isha, #4300 needs to get reviewed since it's meant to address this functionality. Unfortunately, this requires a review from a maintainer knowledgable about the front-end. I'm not sure how this should move forward and is one of the reasons I opened #5360.

@dhivyasreedhar
Copy link

Hi, can I work on this? I'm new so can someone guide me?

@SURABHI-GUPTA
Copy link

@Axle7XStriker Hey. Shall I help you with this?

@jtpio jtpio added this to the 7.0 milestone Sep 26, 2022
@jtpio
Copy link
Member

jtpio commented Sep 26, 2022

Adding this issue to the 7.0 milestone.

Since Notebook 7 is based on JupyterLab components, it includes a button to terminate all terminals and kernels at once like in JupyterLab:

image

Leaving this issue open until Notebook 7 final is released.

@andrii-i
Copy link
Contributor

Taking in account that Notebook 7 adds "Shut Down All" button that shuts down all running kernels, should this issue be closed as resolved?

Or does this track a request to have a button to shut down all kernels AND close respective browser tabs/windows? This might not be optimal as users usually expect to have control over individual browser windows/tabs and don't expect one browser window/tab to be closed from another tab. This can lead to data loss.

@andrii-i andrii-i modified the milestones: 7.0, 7.0.x Jun 13, 2023
@jtpio
Copy link
Member

jtpio commented Aug 4, 2023

Closing as fixed in Notebook 7 (see replies above).

Don't hesitate to open a new issue if you have more feedback or want to discuss this more. Thanks!

@jtpio jtpio closed this as completed Aug 4, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.