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

static/js/home.js is forcing templates/home.html to display "Start My Server" when server is stopped #4621

Open
luanabeckerdaluz opened this issue Oct 30, 2023 · 1 comment
Labels

Comments

@luanabeckerdaluz
Copy link

luanabeckerdaluz commented Oct 30, 2023

Bug description

The bug only occurs when the "Stop My Server" button is clicked. Even though I changed the "Start my Server" button label on html, this is happening because static/js/home.js script is forcing the "Start My Server" button to display "Start My Server".

How to reproduce

You can change the start button html condition to display different strings depending if the server is active or not, as following:

Original templates/home.html:

<a id="start" role="button" class="btn btn-lg btn-primary" href="{{ url }}">
    {% if not default_server.active %}Start{% endif %}
    My Server
</a>

My templates/home.html:

<a id="start" role="button" class="btn btn-lg btn-primary" href="{{ url }}">
    {% if not default_server.active %}
        Start
    {% else %}
        Access
    {% endif %}
</a>

Expected behaviour

After click on the "Stop My Server" button, the start button will have the "Start My Server" label forced by the jupyterhub home.js, and not the one you defined on home.html

Personal set up

jupyterhub/jupyterhub 4.0.2
Python 3.10.12

@welcome
Copy link

welcome bot commented Oct 30, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant