Fixed ux issue 28, 29 and 36 (#2835)
Signed-off-by: Sayan Mondal <sayan@chaosnative.com>
This commit is contained in:
parent
6563d0f435
commit
ddcc7c7589
|
@ -718,7 +718,7 @@ const WorkflowComparisonTable = () => {
|
||||||
: classes.tableMainCompare
|
: classes.tableMainCompare
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Table aria-label="simple table">
|
<Table stickyHeader aria-label="simple table">
|
||||||
<TableHeader
|
<TableHeader
|
||||||
onSelectAllClick={handleSelectAllClick}
|
onSelectAllClick={handleSelectAllClick}
|
||||||
numSelected={selected.length}
|
numSelected={selected.length}
|
||||||
|
@ -794,7 +794,7 @@ const WorkflowComparisonTable = () => {
|
||||||
</TableRow>
|
</TableRow>
|
||||||
)}
|
)}
|
||||||
{emptyRows > 0 && (
|
{emptyRows > 0 && (
|
||||||
<TableRow style={{ height: 75 * emptyRows }}>
|
<TableRow style={{ height: '20rem' }}>
|
||||||
<TableCell colSpan={6} />
|
<TableCell colSpan={6} />
|
||||||
</TableRow>
|
</TableRow>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -110,6 +110,7 @@ const useStyles = makeStyles((theme) => ({
|
||||||
|
|
||||||
tableBody: {
|
tableBody: {
|
||||||
backgroundColor: theme.palette.background.paper,
|
backgroundColor: theme.palette.background.paper,
|
||||||
|
overflowY: 'auto',
|
||||||
},
|
},
|
||||||
tableMainShowAll: {
|
tableMainShowAll: {
|
||||||
marginTop: theme.spacing(4.25),
|
marginTop: theme.spacing(4.25),
|
||||||
|
|
|
@ -65,13 +65,13 @@ const useStyles = makeStyles((theme: Theme) => ({
|
||||||
|
|
||||||
experimentWrapperDiv: {
|
experimentWrapperDiv: {
|
||||||
display: 'grid',
|
display: 'grid',
|
||||||
margin: '2rem',
|
margin: theme.spacing(2, 0),
|
||||||
gridTemplateColumns: '1fr 1fr 1fr 1fr',
|
gridTemplateColumns: 'repeat(auto-fit, minmax(15rem, 1fr))',
|
||||||
gridGap: '1.5rem',
|
gridGap: '1.5rem',
|
||||||
},
|
},
|
||||||
tests: {
|
tests: {
|
||||||
width: '17rem',
|
width: '17rem',
|
||||||
marginRight: theme.spacing(1),
|
margin: theme.spacing(0, 2, 2, 0),
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
export default useStyles;
|
export default useStyles;
|
||||||
|
|
|
@ -79,6 +79,25 @@ const AddProbe: React.FC<AddProbeProps> = ({
|
||||||
setProbeType(newProbe);
|
setProbeType(newProbe);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Reset all input data on clicking close button or cancel button
|
||||||
|
const clearData = () => {
|
||||||
|
setProbeData({
|
||||||
|
name: '',
|
||||||
|
type: 'httpProbe',
|
||||||
|
mode: 'Continuous',
|
||||||
|
runProperties: {},
|
||||||
|
'httpProbe/inputs': {},
|
||||||
|
});
|
||||||
|
setRunProperties({
|
||||||
|
probeTimeout: '',
|
||||||
|
retry: '',
|
||||||
|
interval: '',
|
||||||
|
probePollingInterval: '',
|
||||||
|
initialDelaySeconds: '',
|
||||||
|
});
|
||||||
|
setProbeType('httpProbe/inputs');
|
||||||
|
};
|
||||||
|
|
||||||
const handleAddProbe = () => {
|
const handleAddProbe = () => {
|
||||||
const properties = runProperties;
|
const properties = runProperties;
|
||||||
if (Number.isNaN(parseInt(properties.initialDelaySeconds as string, 10))) {
|
if (Number.isNaN(parseInt(properties.initialDelaySeconds as string, 10))) {
|
||||||
|
@ -100,13 +119,22 @@ const AddProbe: React.FC<AddProbeProps> = ({
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
open={open}
|
open={open}
|
||||||
onClose={handleClose}
|
onClose={() => {
|
||||||
|
clearData();
|
||||||
|
handleClose();
|
||||||
|
}}
|
||||||
width="60%"
|
width="60%"
|
||||||
className={classes.modal}
|
className={classes.modal}
|
||||||
aria-labelledby="simple-modal-title"
|
aria-labelledby="simple-modal-title"
|
||||||
aria-describedby="simple-modal-description"
|
aria-describedby="simple-modal-description"
|
||||||
modalActions={
|
modalActions={
|
||||||
<ButtonOutlined className={classes.closeButton} onClick={handleClose}>
|
<ButtonOutlined
|
||||||
|
className={classes.closeButton}
|
||||||
|
onClick={() => {
|
||||||
|
clearData();
|
||||||
|
handleClose();
|
||||||
|
}}
|
||||||
|
>
|
||||||
✕
|
✕
|
||||||
</ButtonOutlined>
|
</ButtonOutlined>
|
||||||
}
|
}
|
||||||
|
@ -292,7 +320,12 @@ const AddProbe: React.FC<AddProbeProps> = ({
|
||||||
<ProbeDetails setProbeData={setProbeData} probeData={probeData} />
|
<ProbeDetails setProbeData={setProbeData} probeData={probeData} />
|
||||||
|
|
||||||
<div className={classes.buttonDiv}>
|
<div className={classes.buttonDiv}>
|
||||||
<ButtonOutlined onClick={handleClose}>
|
<ButtonOutlined
|
||||||
|
onClick={() => {
|
||||||
|
clearData();
|
||||||
|
handleClose();
|
||||||
|
}}
|
||||||
|
>
|
||||||
{t('createWorkflow.tuneWorkflow.addProbe.button.cancel')}
|
{t('createWorkflow.tuneWorkflow.addProbe.button.cancel')}
|
||||||
</ButtonOutlined>
|
</ButtonOutlined>
|
||||||
<ButtonFilled type="submit">
|
<ButtonFilled type="submit">
|
||||||
|
|
Loading…
Reference in New Issue