Fixed Table FormControl active colors + updated workflow pills + minor ux fixes (#2943)
Signed-off-by: Sayan Mondal <sayan@chaosnative.com>
This commit is contained in:
parent
bbf66174de
commit
fd9a3aeb6f
|
@ -1057,7 +1057,7 @@ createWorkflow:
|
||||||
errYaml: Error in CRD Yaml.
|
errYaml: Error in CRD Yaml.
|
||||||
codeIsFine: Your code is fine.
|
codeIsFine: Your code is fine.
|
||||||
youCanMoveOn: You can move on !
|
youCanMoveOn: You can move on !
|
||||||
workflowNameValidationMessage: Workflow name can only be alpha numeric and should not contain capital letters
|
workflowNameValidationMessage: Workflow name can only be lowercase characters and alpha numeric
|
||||||
subjectValidationMessage: Subject can only have alphanumeric characters and - . _ in-between
|
subjectValidationMessage: Subject can only have alphanumeric characters and - . _ in-between
|
||||||
test: test
|
test: test
|
||||||
YAML: YAML
|
YAML: YAML
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Avatar, Button, Typography } from '@material-ui/core';
|
import { Avatar, Typography } from '@material-ui/core';
|
||||||
import { ButtonOutlined, InputField, Modal } from 'litmus-ui';
|
import { ButtonOutlined, InputField, Modal } from 'litmus-ui';
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
@ -37,9 +37,9 @@ const UserDetails: React.FC<PersonalDetailsProps> = ({
|
||||||
// avatar image source string
|
// avatar image source string
|
||||||
const [avatar, setAvatar] = useState<string>('./avatars/default.svg');
|
const [avatar, setAvatar] = useState<string>('./avatars/default.svg');
|
||||||
|
|
||||||
const handleOpen = () => {
|
// const handleOpen = () => {
|
||||||
setOpen(true);
|
// setOpen(true);
|
||||||
};
|
// };
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
setOpen(false);
|
setOpen(false);
|
||||||
|
@ -61,9 +61,9 @@ const UserDetails: React.FC<PersonalDetailsProps> = ({
|
||||||
className={classes.avatarBackground}
|
className={classes.avatarBackground}
|
||||||
src={avatar}
|
src={avatar}
|
||||||
/>
|
/>
|
||||||
<Button className={classes.edit} onClick={handleOpen} disabled>
|
{/* <Button className={classes.edit} onClick={handleOpen} disabled>
|
||||||
{t('settings.userManagementTab.createUser.userDetails.button')}
|
{t('settings.userManagementTab.createUser.userDetails.button')}
|
||||||
</Button>
|
</Button> */}
|
||||||
<Modal
|
<Modal
|
||||||
open={open}
|
open={open}
|
||||||
onClose={handleClose}
|
onClose={handleClose}
|
||||||
|
|
|
@ -242,8 +242,9 @@ const TableToolBar: React.FC<TableToolBarProps> = ({
|
||||||
</Typography>
|
</Typography>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<div className={classes.addButton}>
|
|
||||||
<ButtonFilled
|
<ButtonFilled
|
||||||
|
className={classes.addButton}
|
||||||
|
size="small"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
history.push({
|
history.push({
|
||||||
pathname: '/analytics/dashboard/create',
|
pathname: '/analytics/dashboard/create',
|
||||||
|
@ -255,7 +256,6 @@ const TableToolBar: React.FC<TableToolBarProps> = ({
|
||||||
{t('analyticsDashboard.dashboardTable.addDashboard')}
|
{t('analyticsDashboard.dashboardTable.addDashboard')}
|
||||||
</Typography>
|
</Typography>
|
||||||
</ButtonFilled>
|
</ButtonFilled>
|
||||||
</div>
|
|
||||||
<DateRangeSelector
|
<DateRangeSelector
|
||||||
anchorEl={dateRangeSelectorRef.current as HTMLElement}
|
anchorEl={dateRangeSelectorRef.current as HTMLElement}
|
||||||
isOpen={isDateRangeSelectorPopoverOpen}
|
isOpen={isDateRangeSelectorPopoverOpen}
|
||||||
|
|
|
@ -192,15 +192,11 @@ const useStyles = makeStyles((theme) => ({
|
||||||
},
|
},
|
||||||
|
|
||||||
dateRangeDefault: {
|
dateRangeDefault: {
|
||||||
height: '2rem',
|
|
||||||
textDecoration: 'none',
|
|
||||||
textTransform: 'none',
|
|
||||||
padding: theme.spacing(1),
|
padding: theme.spacing(1),
|
||||||
},
|
},
|
||||||
|
|
||||||
addButton: {
|
addButton: {
|
||||||
marginRight: theme.spacing(3),
|
margin: theme.spacing(0, 2),
|
||||||
marginLeft: theme.spacing(1),
|
|
||||||
},
|
},
|
||||||
|
|
||||||
icon: {
|
icon: {
|
||||||
|
|
|
@ -54,7 +54,7 @@ const WorkflowGraphs: React.FC<WorkflowGraphsProps> = ({ data }) => {
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<div className={classes.root}>
|
<div className={classes.root}>
|
||||||
<FormControl variant="outlined" className={classes.formControl} focused>
|
<FormControl variant="outlined" className={classes.formControl}>
|
||||||
<InputLabel className={classes.selectText} />
|
<InputLabel className={classes.selectText} />
|
||||||
<Select
|
<Select
|
||||||
value={filters}
|
value={filters}
|
||||||
|
|
|
@ -23,6 +23,7 @@ const useStyles = makeStyles((theme) => ({
|
||||||
},
|
},
|
||||||
selectText: {
|
selectText: {
|
||||||
height: '2.5rem',
|
height: '2.5rem',
|
||||||
|
color: theme.palette.text.primary,
|
||||||
padding: theme.spacing(0.5),
|
padding: theme.spacing(0.5),
|
||||||
},
|
},
|
||||||
formControl: {
|
formControl: {
|
||||||
|
|
|
@ -189,11 +189,7 @@ const BrowseSchedule: React.FC = () => {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FormControl
|
<FormControl variant="outlined" className={classes.formControl}>
|
||||||
variant="outlined"
|
|
||||||
className={classes.formControl}
|
|
||||||
focused
|
|
||||||
>
|
|
||||||
<InputLabel className={classes.selectText}>Name</InputLabel>
|
<InputLabel className={classes.selectText}>Name</InputLabel>
|
||||||
<Select
|
<Select
|
||||||
value={filters.suspended}
|
value={filters.suspended}
|
||||||
|
@ -219,12 +215,7 @@ const BrowseSchedule: React.FC = () => {
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|
||||||
{/* Select Cluster */}
|
{/* Select Cluster */}
|
||||||
<FormControl
|
<FormControl variant="outlined" className={classes.formControl}>
|
||||||
variant="outlined"
|
|
||||||
className={classes.formControl}
|
|
||||||
color="primary"
|
|
||||||
focused
|
|
||||||
>
|
|
||||||
<InputLabel className={classes.selectText}>Target Agent</InputLabel>
|
<InputLabel className={classes.selectText}>Target Agent</InputLabel>
|
||||||
<Select
|
<Select
|
||||||
value={filters.cluster_name}
|
value={filters.cluster_name}
|
||||||
|
|
|
@ -31,6 +31,7 @@ const useStyles = makeStyles((theme) => ({
|
||||||
},
|
},
|
||||||
selectText: {
|
selectText: {
|
||||||
height: '2.5rem',
|
height: '2.5rem',
|
||||||
|
color: theme.palette.text.primary,
|
||||||
padding: theme.spacing(0.5),
|
padding: theme.spacing(0.5),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ const HeaderSection: React.FC<HeaderSectionProps> = ({
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Select Workflow */}
|
{/* Select Workflow */}
|
||||||
<FormControl variant="outlined" className={classes.formControl} focused>
|
<FormControl variant="outlined" className={classes.formControl}>
|
||||||
<InputLabel className={classes.selectText}>
|
<InputLabel className={classes.selectText}>
|
||||||
Workflow Status
|
Workflow Status
|
||||||
</InputLabel>
|
</InputLabel>
|
||||||
|
@ -118,7 +118,7 @@ const HeaderSection: React.FC<HeaderSectionProps> = ({
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|
||||||
{/* Select Cluster */}
|
{/* Select Cluster */}
|
||||||
<FormControl variant="outlined" className={classes.formControl} focused>
|
<FormControl variant="outlined" className={classes.formControl}>
|
||||||
<InputLabel className={classes.selectText}>Target Cluster</InputLabel>
|
<InputLabel className={classes.selectText}>Target Cluster</InputLabel>
|
||||||
<Select
|
<Select
|
||||||
value={clusterValue}
|
value={clusterValue}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {
|
||||||
import ChevronRightIcon from '@material-ui/icons/ChevronRight';
|
import ChevronRightIcon from '@material-ui/icons/ChevronRight';
|
||||||
import KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';
|
import KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';
|
||||||
import MoreVertIcon from '@material-ui/icons/MoreVert';
|
import MoreVertIcon from '@material-ui/icons/MoreVert';
|
||||||
import { ButtonFilled, LightPills } from 'litmus-ui';
|
import { ButtonFilled, OutlinedPills } from 'litmus-ui';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import TimePopOver from '../../../components/TimePopOver';
|
import TimePopOver from '../../../components/TimePopOver';
|
||||||
|
@ -143,13 +143,13 @@ const TableData: React.FC<TableDataProps> = ({ data, refetchQuery }) => {
|
||||||
const getVariant = (variant: string | undefined) => {
|
const getVariant = (variant: string | undefined) => {
|
||||||
switch (variant) {
|
switch (variant) {
|
||||||
case 'succeeded':
|
case 'succeeded':
|
||||||
return 'success';
|
return 'succeeded';
|
||||||
case 'failed':
|
case 'failed':
|
||||||
return 'danger';
|
return 'failed';
|
||||||
case 'running':
|
case 'running':
|
||||||
return 'warning';
|
return 'running';
|
||||||
default:
|
default:
|
||||||
return undefined;
|
return 'pending';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -237,7 +237,8 @@ const TableData: React.FC<TableDataProps> = ({ data, refetchQuery }) => {
|
||||||
</Popover>
|
</Popover>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
<LightPills
|
<OutlinedPills
|
||||||
|
size="small"
|
||||||
variant={getVariant(data.phase?.toLowerCase())}
|
variant={getVariant(data.phase?.toLowerCase())}
|
||||||
label={data.phase ?? ''}
|
label={data.phase ?? ''}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -35,6 +35,7 @@ const useStyles = makeStyles((theme) => ({
|
||||||
|
|
||||||
selectText: {
|
selectText: {
|
||||||
height: '2.5rem',
|
height: '2.5rem',
|
||||||
|
color: theme.palette.text.primary,
|
||||||
padding: theme.spacing(0.5),
|
padding: theme.spacing(0.5),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -44,10 +45,11 @@ const useStyles = makeStyles((theme) => ({
|
||||||
height: '2.5rem',
|
height: '2.5rem',
|
||||||
minWidth: '9rem',
|
minWidth: '9rem',
|
||||||
border: '0.125rem solid',
|
border: '0.125rem solid',
|
||||||
borderRadius: 4,
|
|
||||||
borderColor: theme.palette.primary.main,
|
|
||||||
marginRight: theme.spacing(3.75),
|
marginRight: theme.spacing(3.75),
|
||||||
textTransform: 'none',
|
textTransform: 'none',
|
||||||
|
'&:focus': {
|
||||||
|
borderColor: theme.palette.primary.main,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
displayDate: {
|
displayDate: {
|
||||||
marginLeft: theme.spacing(1),
|
marginLeft: theme.spacing(1),
|
||||||
|
|
|
@ -9,16 +9,16 @@ import {
|
||||||
Select,
|
Select,
|
||||||
Typography,
|
Typography,
|
||||||
} from '@material-ui/core';
|
} from '@material-ui/core';
|
||||||
|
import { useTheme } from '@material-ui/core/styles';
|
||||||
import ChevronRightIcon from '@material-ui/icons/ChevronRight';
|
import ChevronRightIcon from '@material-ui/icons/ChevronRight';
|
||||||
import KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';
|
import KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';
|
||||||
import SearchIcon from '@material-ui/icons/Search';
|
import SearchIcon from '@material-ui/icons/Search';
|
||||||
import { ButtonOutlined } from 'litmus-ui';
|
import { ButtonOutlined } from 'litmus-ui';
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { DateRangePicker } from 'react-date-range';
|
import { DateRangePicker } from 'react-date-range';
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { useTheme } from '@material-ui/core/styles';
|
|
||||||
import 'react-date-range/dist/styles.css'; // main css file
|
import 'react-date-range/dist/styles.css'; // main css file
|
||||||
import 'react-date-range/dist/theme/default.css'; // theme css file
|
import 'react-date-range/dist/theme/default.css'; // theme css file
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import useStyles from './styles';
|
import useStyles from './styles';
|
||||||
|
|
||||||
interface HeaderSectionProps {
|
interface HeaderSectionProps {
|
||||||
|
@ -97,12 +97,7 @@ const HeaderSection: React.FC<HeaderSectionProps> = ({
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Select Workflow */}
|
{/* Select Workflow */}
|
||||||
<FormControl
|
<FormControl variant="outlined" className={classes.formControl}>
|
||||||
variant="outlined"
|
|
||||||
className={classes.formControl}
|
|
||||||
color="primary"
|
|
||||||
focused
|
|
||||||
>
|
|
||||||
<InputLabel className={classes.selectText}>
|
<InputLabel className={classes.selectText}>
|
||||||
{t('workflowCluster.header.status')}
|
{t('workflowCluster.header.status')}
|
||||||
</InputLabel>
|
</InputLabel>
|
||||||
|
@ -128,12 +123,7 @@ const HeaderSection: React.FC<HeaderSectionProps> = ({
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|
||||||
{/* Select Cluster */}
|
{/* Select Cluster */}
|
||||||
<FormControl
|
<FormControl variant="outlined" className={classes.formControl}>
|
||||||
variant="outlined"
|
|
||||||
className={classes.formControl}
|
|
||||||
color="primary"
|
|
||||||
focused
|
|
||||||
>
|
|
||||||
<InputLabel className={classes.selectText}>
|
<InputLabel className={classes.selectText}>
|
||||||
{t('workflowCluster.header.target')}
|
{t('workflowCluster.header.target')}
|
||||||
</InputLabel>
|
</InputLabel>
|
||||||
|
@ -154,8 +144,8 @@ const HeaderSection: React.FC<HeaderSectionProps> = ({
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</Select>
|
</Select>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<div className={classes.dateBtn}>
|
|
||||||
<ButtonOutlined disabled={false} onClick={popOverClick}>
|
<ButtonOutlined className={classes.selectRange} onClick={popOverClick}>
|
||||||
<Typography className={classes.displayDate}>
|
<Typography className={classes.displayDate}>
|
||||||
{displayDate}
|
{displayDate}
|
||||||
<IconButton className={classes.iconButton}>
|
<IconButton className={classes.iconButton}>
|
||||||
|
@ -163,7 +153,6 @@ const HeaderSection: React.FC<HeaderSectionProps> = ({
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Typography>
|
</Typography>
|
||||||
</ButtonOutlined>
|
</ButtonOutlined>
|
||||||
</div>
|
|
||||||
<Popover
|
<Popover
|
||||||
open={isOpen}
|
open={isOpen}
|
||||||
anchorEl={popAnchorEl}
|
anchorEl={popAnchorEl}
|
||||||
|
|
|
@ -32,18 +32,20 @@ const useStyles = makeStyles((theme) => ({
|
||||||
},
|
},
|
||||||
selectText: {
|
selectText: {
|
||||||
height: '2.5rem',
|
height: '2.5rem',
|
||||||
|
color: theme.palette.text.primary,
|
||||||
padding: theme.spacing(0.5),
|
padding: theme.spacing(0.5),
|
||||||
},
|
},
|
||||||
selectDate: {
|
selectRange: {
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
height: '2.5rem',
|
height: '2.5rem',
|
||||||
minWidth: '9rem',
|
minWidth: '9rem',
|
||||||
border: '1.7px solid',
|
borderColor: theme.palette.border.main,
|
||||||
borderRadius: '2rem',
|
|
||||||
borderColor: theme.palette.secondary.main,
|
|
||||||
marginRight: theme.spacing(3.75),
|
marginRight: theme.spacing(3.75),
|
||||||
textTransform: 'none',
|
textTransform: 'none',
|
||||||
|
'&:focus': {
|
||||||
|
borderColor: theme.palette.primary.main,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
displayDate: {
|
displayDate: {
|
||||||
marginLeft: theme.spacing(1),
|
marginLeft: theme.spacing(1),
|
||||||
|
@ -198,9 +200,6 @@ const useStyles = makeStyles((theme) => ({
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
gap: '1rem',
|
gap: '1rem',
|
||||||
},
|
},
|
||||||
dateBtn: {
|
|
||||||
marginRight: theme.spacing(2.5),
|
|
||||||
},
|
|
||||||
w7: { width: '7rem' },
|
w7: { width: '7rem' },
|
||||||
// delete user
|
// delete user
|
||||||
delDiv: {
|
delDiv: {
|
||||||
|
|
Loading…
Reference in New Issue