Skip to content
This repository was archived by the owner on Mar 13, 2023. It is now read-only.
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: 1 addition & 1 deletion docs/content/02-tutorials/02-slurm-accounting.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Choose a name for your job, a number of nodes to run under, choose to `Run a com

![Cluster Properties](accounting/submit-job-dialog.png)

## Step 5 - View the Accounting Tab
## Step 6 - View the Accounting Tab

Once you've submitted a job, you can see the job information under the `Accounting tab`

Expand Down
2 changes: 1 addition & 1 deletion docs/content/02-tutorials/05-cloud9.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
title = "d. Cloud9 ☁️"
title = "e. Cloud9 ☁️"
weight = 25
+++

Expand Down
4 changes: 2 additions & 2 deletions docs/content/02-tutorials/06-downloading.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

+++
title = "d. Downloading ⇓"
weight = 25
title = "f. Downloading ⇓"
weight = 26
+++

This tutorial shows you how you can download a file from an external source at cluster start.
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/FileChooser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ function FileUploadButton(props: any) {
};
return (
<div>
{/* @ts-expect-error TS(2322) FIXME: Type '"contained"' is not assignable to type 'Vari... Remove this comment to see the full error message */}
<Button onClick={handleClick} variant="contained">
<Button onClick={handleClick}>
Choose file...
</Button>
<input
Expand Down
7 changes: 5 additions & 2 deletions frontend/src/old-pages/Configure/Source.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ import {
import { HiddenUploader } from '../../components/FileChooser'
import Loading from '../../components/Loading'

// Types
import { ClusterInfoSummary, ClusterStatus } from '../../types/clusters';

// Constants
const sourcePath = ['app', 'wizard', 'source'];
const sourceErrorsPath = ['app', 'wizard', 'errors', 'source'];
Expand Down Expand Up @@ -111,8 +114,8 @@ function ClusterSelect() {
let source = useState([...sourcePath, 'type']);
let validated = useState([...sourceErrorsPath, 'validated']);

const itemToOption = (item: any) => {
if(item)
const itemToOption = (item: ClusterInfoSummary) => {
if(item && item.clusterStatus != ClusterStatus.DeleteInProgress)
return {label: item.clusterName, value: item.clusterName}
else
return {label: i18next.t('wizard.source.clusterSelect.placeholder')}
Expand Down
31 changes: 1 addition & 30 deletions frontend/src/old-pages/CustomImages/ImageBuildDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {

// Components
import ValidationErrors from '../../components/ValidationErrors'
import FileUploadButton from '../../components/FileChooser'

// State
import { setState, useState, getState, clearState } from '../../store'
Expand Down Expand Up @@ -52,36 +53,6 @@ function buildImageValidate(suppressUpload = false) {
return valid;
}

const FileUploadButton = (props: any) => {
const hiddenFileInput = React.useRef(null);
const handleClick = (event: any) => {
// @ts-expect-error TS(2531) FIXME: Object is possibly 'null'.
hiddenFileInput.current.click();
};
const handleChange = (event: any) => {
var file = event.target.files[0]
var reader = new FileReader();
reader.onload = function(e) {
// @ts-expect-error TS(2531) FIXME: Object is possibly 'null'.
props.handleData(e.target.result)
}
reader.readAsText(file);
};
return (
<>
<Button onClick={handleClick}>
Choose file...
</Button>
<input
type="file"
ref={hiddenFileInput}
onChange={handleChange}
style={{display: 'none'}}
/>
</>
);
}

export default function ImageBuildDialog(props: any) {
const open = useState([...imageBuildPath, 'dialog']);
const imageConfig = useState([...imageBuildPath, 'config']) || "";
Expand Down