Skip to content

Commit

Permalink
Merge branch 'main' into services-section
Browse files Browse the repository at this point in the history
  • Loading branch information
aktech committed Oct 2, 2023
2 parents 28983ef + b9b2320 commit 1e843f7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion jhub_apps/launcher/panel_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ def _get_server_apps(username):
framework_conf: FrameworkConf = FRAMEWORKS_MAPPING.get(
user_options["framework"]
)
if not framework_conf:
print(f"Warning: Framework conf not found for: {user_options['framework']}")
continue
app = App(
name=server_name,
filepath=user_options["filepath"],
Expand Down Expand Up @@ -435,7 +438,7 @@ def get_input_form_widget():
)

def framework_handler(selected_framework):
if selected_framework == Framework.generic.value:
if selected_framework == Framework.custom.value:
input_form_widget.custom_command.visible = True
else:
input_form_widget.custom_command.visible = False
Expand Down
4 changes: 2 additions & 2 deletions jhub_apps/spawner/spawner_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def get_args(self):
app_filepath = None
if framework not in [
Framework.jupyterlab.value,
Framework.generic.value,
Framework.custom.value,
]:
app_filepath = filepath or EXAMPLES_DIR / EXAMPLES_FILE.get(
framework
Expand All @@ -38,7 +38,7 @@ def get_args(self):
self.user_options["filepath"] = str(app_filepath)

custom_cmd = self.user_options.get("custom_command")
if framework == Framework.generic.value:
if framework == Framework.custom.value:
assert custom_cmd
command = Command(args=GENERIC_ARGS + custom_cmd.split())
else:
Expand Down
6 changes: 3 additions & 3 deletions jhub_apps/spawner/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Framework(Enum):
voila = "voila"
gradio = "gradio"
jupyterlab = "jupyterlab"
generic = "generic"
custom = "custom"

@classmethod
def values(cls):
Expand Down Expand Up @@ -74,8 +74,8 @@ def values(cls):
logo="https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Jupyter_logo.svg/1200px-Jupyter_logo.svg.png",
),
FrameworkConf(
name=Framework.generic.value,
display_name="Generic",
name=Framework.custom.value,
display_name="Custom Command",
logo="https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Jupyter_logo.svg/1200px-Jupyter_logo.svg.png",
),
]
Expand Down

0 comments on commit 1e843f7

Please sign in to comment.