Skip to content

Commit

Permalink
Remove unused import and function
Browse files Browse the repository at this point in the history
  • Loading branch information
Sofia Sazonova committed Jan 18, 2024
1 parent a9322fd commit 9d2c82f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 24 deletions.
19 changes: 6 additions & 13 deletions frontend/src/modules/Datasets/views/DatasetCreateForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
Grid,
Link,
MenuItem,
Switch,
TextField,
Typography
} from '@mui/material';
Expand Down Expand Up @@ -55,7 +54,6 @@ const DatasetCreateForm = (props) => {
'Secret'
]);


const topicsData = Topics.map((t) => ({ label: t, value: t }));

const fetchEnvironments = useCallback(async () => {
Expand Down Expand Up @@ -108,10 +106,6 @@ const DatasetCreateForm = (props) => {
}
}, [client, fetchEnvironments, dispatch]);

function test(x){
console.log(x);
}

async function submit(values, setStatus, setSubmitting, setErrors) {
try {
const response = await client.mutate(
Expand Down Expand Up @@ -239,8 +233,9 @@ const DatasetCreateForm = (props) => {
confidentiality: Yup.string()
.max(255)
.required('*Confidentiality is required'),
autoApprovalEnabled: Yup.boolean()
.required('*AutoApproval property is required'),
autoApprovalEnabled: Yup.boolean().required(
'*AutoApproval property is required'
)
})}
onSubmit={async (
values,
Expand Down Expand Up @@ -387,14 +382,12 @@ const DatasetCreateForm = (props) => {
value={values.autoApprovalEnabled}
variant="outlined"
>

<MenuItem key={'Enabled'} value={true}>
Enabled
</MenuItem>
<MenuItem key={'Enabled'} value={true}>
Enabled
</MenuItem>
<MenuItem key={'Enabled'} value={false}>
Disabled
</MenuItem>

</TextField>
</CardContent>
</Card>
Expand Down
9 changes: 3 additions & 6 deletions frontend/src/modules/Datasets/views/DatasetEditForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ const DatasetEditForm = (props) => {
confidentiality: values.confidentiality,
KmsAlias: values.KmsAlias,
autoApprovalEnabled: values.autoApprovalEnabled

}
})
);
Expand Down Expand Up @@ -265,7 +264,6 @@ const DatasetEditForm = (props) => {
confidentiality: dataset.confidentiality,
KmsAlias: dataset.KmsAlias,
autoApprovalEnabled: dataset.autoApprovalEnabled

}}
validationSchema={Yup.object().shape({
label: Yup.string()
Expand All @@ -278,8 +276,9 @@ const DatasetEditForm = (props) => {
confidentiality: Yup.string().required(
'*Confidentiality is required'
),
autoApprovalEnabled: Yup.boolean()
.required('*AutoApproval property is required'),
autoApprovalEnabled: Yup.boolean().required(
'*AutoApproval property is required'
)
})}
onSubmit={async (
values,
Expand Down Expand Up @@ -469,14 +468,12 @@ const DatasetEditForm = (props) => {
value={values.autoApprovalEnabled}
variant="outlined"
>

<MenuItem key={'Enabled'} value={true}>
Enabled
</MenuItem>
<MenuItem key={'Enabled'} value={false}>
Disabled
</MenuItem>

</TextField>
</CardContent>
</Card>
Expand Down
9 changes: 4 additions & 5 deletions frontend/src/modules/Datasets/views/DatasetImportForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ const DatasetImportForm = (props) => {
bucketName: '',
KmsKeyAlias: '',
confidentiality: '',
autoApprovalEnabled: false,
autoApprovalEnabled: false
}}
validationSchema={Yup.object().shape({
label: Yup.string()
Expand All @@ -245,8 +245,9 @@ const DatasetImportForm = (props) => {
confidentiality: Yup.string()
.max(255)
.required('*Confidentiality is required'),
autoApprovalEnabled: Yup.boolean()
.required('*AutoApproval property is required'),
autoApprovalEnabled: Yup.boolean().required(
'*AutoApproval property is required'
)
})}
onSubmit={async (
values,
Expand Down Expand Up @@ -394,14 +395,12 @@ const DatasetImportForm = (props) => {
value={values.autoApprovalEnabled}
variant="outlined"
>

<MenuItem key={'Enabled'} value={true}>
Enabled
</MenuItem>
<MenuItem key={'Enabled'} value={false}>
Disabled
</MenuItem>

</TextField>
</CardContent>
</Card>
Expand Down

0 comments on commit 9d2c82f

Please sign in to comment.