-
Notifications
You must be signed in to change notification settings - Fork 12
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
Implement new App Launcher Not Running Page/Functionality #384
Changes from 9 commits
f15fd32
b39b4b4
ca9846c
319753a
554f0fd
fafa445
d32a00f
853ba51
60ec168
8e08525
ff716b4
51d2fcd
e6ed248
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,8 @@ | |
get_conda_envs, | ||
get_jupyterhub_config, | ||
get_spawner_profiles, | ||
get_thumbnail_data_url, get_shared_servers, | ||
get_thumbnail_data_url, | ||
get_shared_servers, | ||
) | ||
from jhub_apps.spawner.types import FRAMEWORKS | ||
from jhub_apps.version import get_version | ||
|
@@ -101,7 +102,12 @@ async def get_server(user: User = Depends(get_current_user), server_name=None): | |
hub_client = HubClient(username=user.name) | ||
hub_user = hub_client.get_user() | ||
user_servers = hub_user["servers"] | ||
if server_name: | ||
|
||
# If server_name is 'lab' then it is the default user | ||
if server_name == "lab" or server_name == "vscode": | ||
server_name = "" | ||
|
||
if server_name is not None: | ||
Comment on lines
+106
to
+110
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was updated to allow calling this endpoint from the default server (JupyterLab or VSCode). Just passing an empty server_name string today results in the endpoint returning all apps, which is not what we want here. |
||
# Get a particular server | ||
for s_name, server_details in user_servers.items(): | ||
if s_name == server_name: | ||
|
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1 @@ | ||
{% extends "page.html" %} {% block main %} | ||
|
||
<div id="root"></div> | ||
<script src="/services/japps/static/js/index.js?v={{version_hash}}"></script> | ||
<link | ||
rel="stylesheet" | ||
href="/services/japps/static/css/index.css?v={{version_hash}}" | ||
/> | ||
<script type="text/javascript"> | ||
window.theme = { | ||
logo: "{{ logo }}", | ||
}; | ||
// Hide the navbar since using new one | ||
document.querySelector(".navbar")?.style.setProperty("display", "none"); | ||
</script> | ||
|
||
{% endblock %} | ||
{% extends "japps_page.html" %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% extends "page.html" %} {% block main %} | ||
|
||
<div id="root"></div> | ||
<script src="/services/japps/static/js/index.js?v={{version_hash}}"></script> | ||
<link | ||
rel="stylesheet" | ||
href="/services/japps/static/css/index.css?v={{version_hash}}" | ||
/> | ||
<script type="text/javascript"> | ||
window.theme = { | ||
logo: "{{ logo }}", | ||
}; | ||
// Hide the navbar since using new one | ||
document.querySelector(".navbar")?.style.setProperty("display", "none"); | ||
</script> | ||
|
||
{% endblock %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{% extends "japps_page.html" %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -441,6 +441,10 @@ a:focus { | |
border: unset; | ||
} | ||
|
||
.card-dialog-body-wrapper { | ||
padding: 0 24px 20px !important; | ||
} | ||
|
||
Comment on lines
+444
to
+447
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix spacing issue in modal dialogs, which are currently being overridden by JupyterLab styling |
||
.MuiButton-containedPrimary:not(:disabled) { | ||
color: var(--light-text-color); | ||
background-color: var(--primary-color) !important; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,6 +125,7 @@ export const ContextMenu = ({ | |
}} | ||
onClick={(e) => { | ||
if (!item.disabled && item.onClick) { | ||
e.stopPropagation(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This prevents the onclick event from bubbling up when the context menu should actually be handling the event |
||
item.onClick(e); | ||
} | ||
handleClose(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
.card-dialog-body-wrapper { | ||
padding: 0px 24px; | ||
padding: 0px 24px 8px 24px; | ||
} | ||
|
||
.card-dialog-body { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, this page template is only used by pages which require a custom route through the japps service. This change was just to reduce confusion with naming between this template and the real base template (japps_page)