- Are you sure you want to delete the {launcher.name} session
- launcher?
+ Are you sure you want to delete the {launcher.name}{" "}
+ {launcherDefinition.text.inline} launcher?
{sessionsLength > 0 && (
- You have a session running from this launcher. If you delete this
- session launcher, that session will continue running, but it
- become an orphan session and will not be able to be launched again
- once stopped. If other RenkuLab users are running sessions from
- this launcher, their sessions will become orphan sessions as well.
+ You have a {launcherDefinition.text.inline} running from this
+ launcher. If you delete this launcher, that{" "}
+ {launcherDefinition.text.inline} will continue running, but it
+ become an orphan {launcherDefinition.text.inline} and will not be
+ able to be launched again once stopped. If other RenkuLab users
+ are running {launcherDefinition.text.inline}s from this launcher,
+ their {launcherDefinition.text.inline}s will become orphan{" "}
+ {launcherDefinition.text.inline}s as well.
)}
{sessionsLength === 0 && (
- If other RenkuLab users are running sessions from this launcher,
- their sessions will become orphan sessions. This means that their
- sessions will continue running, but will not be able to be
- launched again once stopped.
+ If other RenkuLab users are running{" "}
+ {launcherDefinition.text.inline}s from this launcher, their{" "}
+ {launcherDefinition.text.inline}s will become orphan{" "}
+ {launcherDefinition.text.inline}s. This means that their{" "}
+ {launcherDefinition.text.inline}s will continue running, but will
+ not be able to be launched again once stopped.
- The default URL specifies the URL pathname on the session to go
- to upon launch
+ The default URL specifies the URL pathname on the{" "}
+ {launcherDefinition?.text.inline} to go to upon launch
{launcher && launcher.environment?.default_url ? (
diff --git a/client/src/features/sessionsV2/SessionsV2.tsx b/client/src/features/sessionsV2/SessionsV2.tsx
index 7d7981d7ad..b0bd45f894 100644
--- a/client/src/features/sessionsV2/SessionsV2.tsx
+++ b/client/src/features/sessionsV2/SessionsV2.tsx
@@ -18,7 +18,7 @@
import cx from "classnames";
import { useCallback, useMemo } from "react";
-import { Pencil, PlayCircle, Trash } from "react-bootstrap-icons";
+import { Pencil, RocketTakeoff, Trash } from "react-bootstrap-icons";
import { generatePath } from "react-router";
import {
Badge,
@@ -109,7 +109,7 @@ export default function SessionsV2({ project }: SessionsV2Props) {
<>
{totalSessions > 0
- ? "Session launchers are available to everyone who can see the project. Running sessions are only accessible to you."
+ ? "Launchers are available to everyone who can see the project. Only you can see your running sessions and jobs."
: "Define interactive environments in which to do your work and share it with others."}
control={control}
@@ -358,7 +399,7 @@ export function AdvancedSettingsFields<
isOptional={true}
info={ENVIRONMENT_VALUES_DESCRIPTION.command}
errors={errors}
- helpText='Please enter a valid JSON array format e.g. ["python3","main.py"]'
+ helpText='Please enter a valid JSON array format e.g. ["python","my_repo/main.py"]'
/>
@@ -372,17 +413,19 @@ export function AdvancedSettingsFields<
helpText='Please enter a valid JSON array format e.g. ["--arg1", "--arg2", "--pwd=/home/user"]'
/>
>
);
diff --git a/client/src/features/sessionsV2/components/SessionForm/BuilderEnvironmentFields.tsx b/client/src/features/sessionsV2/components/SessionForm/BuilderEnvironmentFields.tsx
index ff9a61ce1c..b129f9811d 100644
--- a/client/src/features/sessionsV2/components/SessionForm/BuilderEnvironmentFields.tsx
+++ b/client/src/features/sessionsV2/components/SessionForm/BuilderEnvironmentFields.tsx
@@ -19,7 +19,7 @@
import { skipToken } from "@reduxjs/toolkit/query";
import cx from "classnames";
import { useContext, useMemo } from "react";
-import { useWatch, type Control, type Path } from "react-hook-form";
+import { useWatch, type Control, type Path, type FieldErrors } from "react-hook-form";
import { useProject } from "~/routes/projects/root";
import { ErrorAlert, InfoAlert, WarnAlert } from "../../../../components/Alert";
@@ -28,7 +28,13 @@ import { Loader } from "../../../../components/Loader";
import AppContext from "../../../../utils/context/appContext";
import { DEFAULT_APP_PARAMS } from "../../../../utils/context/appParams.constants";
import { useGetRepositoriesQuery } from "../../../repositories/api/repositories.api";
-import type { SessionLauncherForm } from "../../sessionsV2.types";
+import { ENVIRONMENT_VALUES_DESCRIPTION } from "../../session.constants";
+import { getLauncherCategoryDefinition } from "../../session.utils";
+import type {
+ LauncherCategory,
+ SessionLauncherForm,
+} from "../../sessionsV2.types";
+import { JsonField } from "./AdvancedSettingsFields";
import BuilderAdvancedSettings from "./BuilderAdvancedSettings";
import BuilderFrontendSelector from "./BuilderFrontendSelector";
import BuilderTypeSelector from "./BuilderTypeSelector";
@@ -37,12 +43,16 @@ import CodeRepositorySelector from "./CodeRepositorySelector";
interface BuilderEnvironmentFieldsProps {
control: Control;
+ errors?: FieldErrors;
isEdit?: boolean;
+ launcherCategory: LauncherCategory;
}
export default function BuilderEnvironmentFields({
control,
+ errors,
isEdit,
+ launcherCategory,
}: BuilderEnvironmentFieldsProps) {
const { params } = useContext(AppContext);
const imageBuildersEnabled =
@@ -54,6 +64,7 @@ export default function BuilderEnvironmentFields({
const { data, isLoading, error } = useGetRepositoriesQuery(
repositories.length > 0 ? repositories : skipToken,
);
+ const categoryDefinition = getLauncherCategoryDefinition(launcherCategory);
const selectedRepositoryUrl = useWatch({
control,
@@ -82,8 +93,9 @@ export default function BuilderEnvironmentFields({
if (!imageBuildersEnabled) {
return (
- Creating a session environment from code is not currently supported by
- this instance of RenkuLab. Contact an administrator to learn more.
+ Creating a {categoryDefinition.text.inline} environment from code is not
+ currently supported by this instance of RenkuLab. Contact an
+ administrator to learn more.
);
}
@@ -96,7 +108,7 @@ export default function BuilderEnvironmentFields({
) : repositories?.length == 0 ? (
No repositories found in this project. Add a repository first before
- creating a session environment from one.
+ creating a {categoryDefinition.text.inline} environment from one.
) : error || !data ? (
<>
@@ -119,14 +131,48 @@ export default function BuilderEnvironmentFields({
{selectedRepositoryIsPrivate && (
This is a private code repository. Only users who have pull (read)
- access to this code repository will be able to launch sessions.
+ access to this code repository will be able to launch {categoryDefinition.text.inline}.
)}
- Use a custom container image to create a session launcher. Provide the
- image name or reference, such as one from Docker Hub (e.g.,
- repository/image:tag).
+ {launcherCategory === "job"
+ ? "Provide a container image for your job launcher, such as one from Docker Hub (e.g., repository/image:tag)."
+ : "Use a custom container image to create a session launcher. Provide the image name or reference, such as one from Docker Hub (e.g., repository/image:tag)."}
-
-
Advanced settings
-
-
-
- Please see the{" "}
- {" "}
- for how to complete this form to make your image run on Renkulab.
-
-
+
+ {launcherCategory === "session" && (
+ <>
+
Advanced settings
+
+
+ Please see the{" "}
+ {" "}
+ for how to complete this form to make your image run on
+ Renkulab.
+