Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions public/static/locales/en/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"minDiskSpace": "Minimum Disk Space",
"minCPUCores": "Minimum CPU Cores",
"minMemory": "Minimum Memory",
"mountDataStore": "Mount data store in analysis",
"mountDataStoreHelp": "When enabled, your analysis reads and writes directly to the Data Store. When disabled, files are copied in at launch and copied back when the analysis completes.",
"multiInputEmptyLabel": "Select the \"Browse\" button to add inputs.",
"newAnalysisName": "{{appName}} analysis1",
"name": "Name",
Expand Down
2 changes: 2 additions & 0 deletions src/components/apps/launch/AppLaunchForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ const AppLaunchForm = (props) => {
version_id,
name: appName,
app_type,
overall_job_type,
groups,
requirements,
},
Expand Down Expand Up @@ -417,6 +418,7 @@ const AppLaunchForm = (props) => {
<ResourceRequirementsForm
baseId={stepIdResources}
limits={values.limits}
overallJobType={overall_job_type}
defaultMaxCPUCores={
defaultMaxCPUCores
}
Expand Down
13 changes: 13 additions & 0 deletions src/components/apps/launch/ResourceRequirements.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ import ids from "./ids";
import styles from "./styles";

import buildID from "components/utils/DebugIDUtil";
import FormCheckbox from "components/forms/FormCheckbox";
import FormSelectField from "components/forms/FormSelectField";
import TOOL_TYPES from "components/models/ToolTypes";

import {
Accordion,
Expand Down Expand Up @@ -235,10 +237,12 @@ const ResourceRequirementsForm = ({
defaultMaxCPUCores,
defaultMaxMemory,
defaultMaxDiskSpace,
overallJobType,
limits,
}) => {
const { classes } = useStyles();
const { t } = useTranslation("launch");
const isVICE = overallJobType === TOOL_TYPES.INTERACTIVE;
return (
<>
<Accordion defaultExpanded>
Expand Down Expand Up @@ -319,6 +323,15 @@ const ResourceRequirementsForm = ({
)}
</AccordionDetails>
</Accordion>
{isVICE && (
<FastField
id={buildID(baseId, ids.RESOURCE_REQUESTS.MOUNT_DATA_STORE)}
name="mount_data_store"
label={t("mountDataStore")}
helperText={t("mountDataStoreHelp")}
component={FormCheckbox}
/>
)}
</>
);
};
Expand Down
13 changes: 12 additions & 1 deletion src/components/apps/launch/formatters.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,15 @@ const initAppLaunchValues = (
defaultSelectedMaxCpus,
defaultMaxCpuCores = defaultSelectedMaxCpus,
defaultOutputDir,
app: { id, version_id, system_id, name, requirements, groups },
app: {
id,
version_id,
system_id,
name,
requirements,
groups,
mount_data_store,
},
}
) => {
// If no default_max_cpu_cores is returned from the API,
Expand Down Expand Up @@ -83,6 +91,7 @@ const initAppLaunchValues = (
app_id: id,
app_version_id: version_id,
system_id,
mount_data_store: mount_data_store ?? true,
groups: initGroupValues(groups),
limits: requirements,
requirements: reqInitValues || [],
Expand Down Expand Up @@ -200,6 +209,7 @@ const formatSubmission = (
system_id,
app_id,
app_version_id,
mount_data_store,
requirements,
groups,
}
Expand All @@ -223,6 +233,7 @@ const formatSubmission = (
system_id,
app_id,
app_version_id,
mount_data_store,
requirements: formattedRequirements,
config: groups?.reduce(paramConfigsReducer, {}),
};
Expand Down
1 change: 1 addition & 0 deletions src/components/apps/launch/ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const ids = {
MIN_DISK_SPACE: "minDiskSpace",
TOOL_GPU: "idToolGpu",
TOOL_GPU_MODELS: "idToolGpuModels",
MOUNT_DATA_STORE: "mountDataStore",
},

TEMPLATE_GROUP: "group",
Expand Down
1 change: 1 addition & 0 deletions stories/apps/launch/data/JupyterLabNoParamsApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const JupyterLabNoParamsApp = {
label: "Jupyter Lab no params",
id: "4dcda8a6-5761-11ea-bd06-008cfa5ae621",
app_type: "DE",
overall_job_type: "interactive",
groups: [],
};

Expand Down
Loading