Disabled delete button in Targets & Settings, Fixed empty dropdown in targets section (#2254)

Signed-off-by: Vansh Bhatia <vansh.bhatia@mayadata.io>
This commit is contained in:
Ak 2020-10-14 15:07:07 +05:30 committed by GitHub
parent 371338fb0e
commit 360f299970
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 57 deletions

View File

@ -164,6 +164,11 @@ chaosWorkflows:
once: Once
seeAnalytics: See analytics
createWorkflow:
workflowCluster:
activeCluster: Choose an active cluster
none: None
settings:
teamingTab:
deleteModal:

View File

@ -75,7 +75,8 @@ const ClusterInfo: React.FC<ClusterVarsProps> = ({ location }) => {
</div>
</div>
<div className={classes.expDiv}>
<ButtonOutline handleClick={() => {}} isDisabled={false}>
{/* Set isDisabled to false when implemented */}
<ButtonOutline handleClick={() => {}} isDisabled>
<div className={classes.expDiv}>
<img
src="/icons/bin-red.svg"

View File

@ -26,11 +26,11 @@ const useStyles = makeStyles((theme: Theme) => ({
},
buttonBox: {
display: 'flex',
flexDirection: 'row',
paddingLeft: theme.spacing(3),
paddingTop: theme.spacing(2.5),
},
copyText: {
display: 'flex',
flexDirection: 'row',
},
yamlLink: {
width: '90%',

View File

@ -123,21 +123,23 @@ const WorkflowCluster: React.FC<WorkflowClusterProps> = ({ gotoStep }) => {
</Typography>
<div className={classes.radiobutton}>
<FormControl
variant="outlined"
className={classes.formControl}
color="secondary"
>
<FormControl variant="outlined" className={classes.formControl}>
<InputLabel className={classes.selectText}>
{t('workflowCluster.header.selectCluster')}
{t('createWorkflow.workflowCluster.activeCluster')}
</InputLabel>
<Select
labelId="Active Cluster"
value={name}
onChange={handleChange}
label="Active Cluster"
input={<Input />}
MenuProps={MenuProps}
className={classes.selectText}
color="secondary"
>
<MenuItem value="" disabled>
<em> {t('createWorkflow.workflowCluster.none')}</em>
</MenuItem>
{clusterData.map((name: Cluster) => (
<MenuItem key={name.cluster_id} value={name.cluster_id}>
{name.cluster_name}

View File

@ -65,7 +65,7 @@ const UserDetails: React.FC<PersonalDetailsProps> = ({
className={classes.avatarBackground}
src={avatar}
/>
<Button className={classes.edit} onClick={handleOpen}>
<Button className={classes.edit} onClick={handleOpen} disabled>
{t('settings.userManagementTab.createUser.userDetails.button')}
</Button>
<Unimodal isOpen={open} handleClose={handleClose} hasCloseBtn>

View File

@ -1,4 +1,4 @@
import { IconButton, Typography } from '@material-ui/core';
import { Typography } from '@material-ui/core';
import React from 'react';
import { useTranslation } from 'react-i18next';
import ButtonFilled from '../../../../../components/Button/ButtonFilled';
@ -20,7 +20,6 @@ const DelUser: React.FC<DelUserProps> = ({
tableDelete,
teammingDel,
handleTable,
disabled,
}) => {
const classes = useStyles();
@ -35,51 +34,6 @@ const DelUser: React.FC<DelUserProps> = ({
return (
<div>
{tableDelete ? (
<>
{/* <MenuItem
value="delete"
onClick={() => {
setOpen(true);
}}
>
<IconButton disabled>
<img alt="delete" src="./icons/bin.svg" />
</IconButton>
<Typography>Delete User</Typography>
</MenuItem> */}
</>
) : (
<>
{teammingDel ? (
<>
<IconButton
disabled={disabled}
onClick={() => {
setOpen(true);
}}
>
<img alt="delete" src="./icons/bin-grey.svg" />
</IconButton>
</>
) : (
<div
role="button"
tabIndex={0}
onKeyDown={() => {
setOpen(true);
}}
className={classes.delDiv}
onClick={() => {
setOpen(true);
}}
>
<img src="./icons/bin.svg" alt="delete" className={classes.bin} />
<Typography>Delete user </Typography>
</div>
)}
</>
)}
<Unimodal isOpen={open} handleClose={handleClose} hasCloseBtn>
<div className={classes.body}>
<img src="./icons/userDel.svg" alt="lock" />