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

Add the mount options in azure blob #671

Merged
merged 1 commit into from
Nov 21, 2019
Merged
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
19 changes: 18 additions & 1 deletion src/dashboard/src/pages/Submission/Training.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ const Training: React.ComponentClass = withRouter(({ history }) => {
const [accountKey, setAccountKey] = React.useState("");
const [containerName, setContainerName] = React.useState("");
const [mountPath, setMountPath] = React.useState("");
const [mountOptions, setMoutOptions] = React.useState("--file-cache-timeout-in-seconds=120");
const onAccountNameChange = React.useCallback(
(event: React.ChangeEvent<HTMLInputElement>) => {
setAccountName(event.target.value);
Expand All @@ -223,7 +224,12 @@ const Training: React.ComponentClass = withRouter(({ history }) => {
},
[setMountPath]
)

const onMountOptionsChange = React.useCallback(
(event: React.ChangeEvent<HTMLInputElement>) => {
setMoutOptions(event.target.value);
},
[setMoutOptions]
)
const [workPath, setWorkPath] = React.useState("");
const onWorkPathChange = React.useCallback(
(event: React.ChangeEvent<HTMLInputElement>) => {
Expand Down Expand Up @@ -352,6 +358,7 @@ const Training: React.ComponentClass = withRouter(({ history }) => {
blobfuseObj['accountKey'] = accountKey || '';
blobfuseObj['containerName'] = containerName || '';
blobfuseObj['mountPath'] = mountPath || '';
blobfuseObj['mountOptions'] = mountOptions;
plugins['blobfuse'].push(blobfuseObj);
const template = {
name,
Expand Down Expand Up @@ -531,6 +538,7 @@ const Training: React.ComponentClass = withRouter(({ history }) => {
blobfuseObj['accountKey'] = accountKey || '';
blobfuseObj['containerName'] = containerName || '';
blobfuseObj['mountPath'] = mountPath || '';
blobfuseObj['mountOptions'] = mountOptions;
plugins['blobfuse'].push(blobfuseObj);

const job: any = {
Expand Down Expand Up @@ -952,6 +960,15 @@ const Training: React.ComponentClass = withRouter(({ history }) => {
variant="filled"
/>
</Grid>
<Grid item xs={12}>
<TextField
value={mountOptions}
onChange={onMountOptionsChange}
label="Mount Options"
fullWidth
variant="filled"
/>
</Grid>
</Grid>
</CardContent>
<CardContent>
Expand Down