Skip to content
Snippets Groups Projects
Commit eb85dbb6 authored by Skander Hatira's avatar Skander Hatira
Browse files

added notifications button for slurm mails

parent b6b2a21c
No related branches found
No related tags found
No related merge requests found
Pipeline #54308 failed
Subproject commit 418fbdd0d56a33f9c48f1dcf5aa16e4f38f65009
Subproject commit 876f966022371d2c9c0a6236bd109f851f48475f
......@@ -27,9 +27,11 @@ function createProfile(body, uniqueDir, uniqueDirRemote) {
};
const slurmProfile = {
jobs: parseInt(body.jobs),
cluster:
"sbatch -t {resources.time_min} --mem={resources.mem_mb} -c {resources.cpus} -o logs_slurm/{rule}_{wildcards} -e logs_slurm/{rule}_{wildcards} --mail-type=FAIL,END --mail-user=" +
body.email,
cluster: body.notification
? "sbatch -t {resources.time_min} --mem={resources.mem_mb} -c {resources.cpus} -o logs_slurm/{rule}_{wildcards} -e logs_slurm/{rule}_{wildcards}" +
"--mail-type=FAIL,END --mail-user=" +
body.email
: "sbatch -t {resources.time_min} --mem={resources.mem_mb} -c {resources.cpus} -o logs_slurm/{rule}_{wildcards} -e logs_slurm/{rule}_{wildcards}",
"default-resources": ["cpus=1", "mem_mb=10000", "time_min=5440"],
configfile: body.remote
? "config/config.yaml"
......
......@@ -29,9 +29,11 @@ function createProfile(body, uniqueDir, uniqueDirRemote) {
};
const slurmProfile = {
jobs: parseInt(body.jobs),
cluster:
"sbatch -t {resources.time_min} --mem={resources.mem_mb} -c {resources.cpus} -o logs_slurm/{rule}_{wildcards} -e logs_slurm/{rule}_{wildcards} --mail-type=FAIL,END --mail-user=" +
body.email,
cluster: body.notification
? "sbatch -t {resources.time_min} --mem={resources.mem_mb} -c {resources.cpus} -o logs_slurm/{rule}_{wildcards} -e logs_slurm/{rule}_{wildcards}" +
"--mail-type=FAIL,END --mail-user=" +
body.email
: "sbatch -t {resources.time_min} --mem={resources.mem_mb} -c {resources.cpus} -o logs_slurm/{rule}_{wildcards} -e logs_slurm/{rule}_{wildcards}",
"default-resources": ["cpus=1", "mem_mb=10000", "time_min=5440"],
configfile: body.remote
? "config/configComparison.yaml"
......
......@@ -609,6 +609,20 @@ export default function GlobalConfig() {
label="SLURM Cluster"
></FormControlLabel>
</Grid>
<Grid item xs={12} sm={4}>
<FormControlLabel
className={classes.formControl}
control={
<Checkbox
onChange={handleCheckBox}
color="secondary"
name="notification"
checked={compState.notification}
/>
}
label="Send Email Notification"
></FormControlLabel>
</Grid>
</Grid>
) : (
<Grid item xs={12} sm={4}>
......
......@@ -83,7 +83,7 @@ const Login = () => {
signup(userData, dispatch, history);
};
const { errors } = state;
console.log(errors);
return (
<Container component="main" maxWidth="md">
<CssBaseline />
......@@ -99,7 +99,7 @@ const Login = () => {
onChange={onChange}
value={state.name}
error={errors.name === ""}
helperText={errors.name === "" ? "Empty!" : errors.name}
helperText={errors.name === "" ? "Empty!" : errors.namenotfound}
className={classnames("", {
invalid: errors.name || errors.namenotfound,
})}
......@@ -118,7 +118,9 @@ const Login = () => {
onChange={onChange}
value={state.password}
error={errors.password === ""}
helperText={errors.password === "" ? "Empty!" : errors.password}
helperText={
errors.password === "" ? "Empty!" : errors.passwordincorrect
}
className={classnames("", {
invalid: errors.password || errors.passwordincorrect,
})}
......
......@@ -441,6 +441,20 @@ export default function GlobalConfig() {
label="SLURM Cluster"
></FormControlLabel>
</Grid>
<Grid item xs={12} sm={4}>
<FormControlLabel
className={classes.formControl}
control={
<Checkbox
onChange={handleCheckBox}
color="secondary"
name="notification"
checked={runState.notification}
/>
}
label="Send Email Notification"
></FormControlLabel>
</Grid>
</Grid>
) : (
<Grid item xs={12} sm={4}>
......
......@@ -172,6 +172,7 @@ export default function InteractiveList() {
sftp.end();
})
.catch((err) => {
setLoading((prevState) => ({ ...prevState, [idx]: false }));
console.error(err.message);
sftp.end();
});
......
......@@ -35,6 +35,7 @@ const useProvideConfig = () => {
l: 20,
n: 0,
subsample: false,
notification: true,
cluster: false,
remote: false,
cpu: "1",
......@@ -63,6 +64,7 @@ const useProvideConfig = () => {
contexts: ["CpG"],
genome: "",
species: "",
notification: true,
annot: "",
remoteDir: "",
outdir: "",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment