jupyter-naas / naas

Low-code Python library to safely use notebooks in production: schedule workflows, generate assets, trigger webhooks, send notifications, build pipelines, manage secrets (Cloud-only)
https://app.naas.ai/
GNU Affero General Public License v3.0
286 stars 25 forks source link

Add a alert when the scheduler in set to "* * * * *" #209

Closed jravenel closed 2 years ago

jravenel commented 3 years ago

As a user, I want to have a warning message that says. : "

"You are about to run your scheduler every minute of every day, are you sure you want to continue?" Button => YES / NO

https://www.javatpoint.com/python-tkinter-button

Dr0p42 commented 3 years ago

Hello guys, I think it won't be possible to use Tkinter to display a popin. We might consider looking for a solution like this one maybe? https://www.stefaanlippens.net/jupyter-notebook-dialog.html

Dr0p42 commented 3 years ago

Maybe something like that could be a first easy version:

from IPython.display import display, Javascript
display(Javascript("""
alert('Warning you just scheduled a notebook to run every minute!');
"""))

Later on it could be nice to see if we can use confirm instead of alert to have the possibility to cancel if needed.


It's showing up like that on Firefox:

image
jravenel commented 3 years ago

This task has been transformed to an alert as per as our discussion to lower impacts on the core feature.