Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cu 86c0fbyja transaction feedback #697

Open
wants to merge 4 commits into
base: poc-microfrontends
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -503,17 +503,20 @@ const App: React.FC = () => {
}

return (
<Box
padding={3}
sx={{backgroundColor: '#F1F1F1'}}
>
<Box padding={3} sx={{backgroundColor: '#F1F1F1'}}>
<Box>
<Grid item xs={12}>
<Box>
<Typography variant="h4">Transaction Log</Typography>
</Box>
<Box>
<Typography variant="subtitle1">
<Typography
variant="subtitle1"
sx={{
color:
'var(--Light-Text-Secondary, var(--text-secondary, rgba(0, 0, 0, 0.60)))'
}}
>
A log of the recent transactions through the system. Use Basic or
Advanced filters to find specific transactions to investigate or
rerun. Use settings to modify the list behaviour.
Expand All @@ -536,7 +539,7 @@ const App: React.FC = () => {
>
<Tab
label="Basic Filters"
sx={{color: tabValue === 0 ? '#54C4A4' : '#54C4A4'}}
sx={{color: tabValue === 0 ? '#54C4A4' : 'inherit'}}
/>
<Tab
label="Custom Filters"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
} from '@mui/material'
import SettingsIcon from '@mui/icons-material/Settings'
import SettingsDialog from '../dialogs/settings.dialog.component'
import {ChevronRight} from '@mui/icons-material'
import {BorderBottom, ChevronRight} from '@mui/icons-material'
import LockIcon from '@mui/icons-material/Lock'
import convertTimestampFormat from '../helpers/timestampformat.helper.component'
import StatusButton from '../buttons/status.button.component'
Expand Down Expand Up @@ -92,63 +92,101 @@ const TransactionLogTable: React.FC<{
}

return (
<Box sx={{padding: '16px'}}>
<Box>
<Box
sx={{
display: 'flex',
justifyContent: 'flex-end',
mb: 2
}}
>
<IconButton onClick={() => setSettingsOpen(true)} color="primary">
<Button onClick={() => setSettingsOpen(true)} color="primary">
<SettingsIcon />
<Typography
variant="body1"
sx={{marginRight: '8px', marginLeft: '3px'}}
>
SETTINGS
</Typography>
</IconButton>
</Button>
</Box>
<Box>
<TableContainer>
<Table>
<TableHead>
<TableRow>
<TableCell padding="checkbox">
<TableRow sx={{borderBottom: 'none', backgroundColor: '#F8F8F8'}}>
<TableCell
padding="checkbox"
sx={{
borderBottom: 'none',
borderTopLeftRadius: '12px',
borderBottomLeftRadius: '12px',
fontWeight: 'bold'
}}
>
<Checkbox checked={selectAll} onChange={handleSelectAll} />
</TableCell>
<TableCell>Type</TableCell>
<TableCell>Method</TableCell>
<TableCell>Host</TableCell>
<TableCell>Port</TableCell>
<TableCell>Path</TableCell>
<TableCell>Params</TableCell>
<TableCell>Channel</TableCell>
<TableCell>Client</TableCell>
<TableCell>Status</TableCell>
<TableCell>Time</TableCell>
<TableCell sx={{borderBottom: 'none', fontWeight: 'bold'}}>
Type
</TableCell>
<TableCell sx={{borderBottom: 'none', fontWeight: 'bold'}}>
Status
</TableCell>
<TableCell sx={{borderBottom: 'none', fontWeight: 'bold'}}>
Method
</TableCell>
<TableCell sx={{borderBottom: 'none', fontWeight: 'bold'}}>
Host
</TableCell>
<TableCell sx={{borderBottom: 'none', fontWeight: 'bold'}}>
Port
</TableCell>
<TableCell sx={{borderBottom: 'none', fontWeight: 'bold'}}>
Path
</TableCell>
<TableCell sx={{borderBottom: 'none', fontWeight: 'bold'}}>
Params
</TableCell>
<TableCell sx={{borderBottom: 'none', fontWeight: 'bold'}}>
Channel
</TableCell>
<TableCell sx={{borderBottom: 'none', fontWeight: 'bold'}}>
Client
</TableCell>
<TableCell
sx={{
borderBottom: 'none',
borderTopRightRadius: '12px',
borderBottomRightRadius: '12px',
fontWeight: 'bold'
}}
>
Time
</TableCell>
</TableRow>
</TableHead>
<TableBody>
{initialTransactionLoadComplete ? (
transactions.map((transaction, index) => (
<AnimatedTableRow
<TableRow
key={transaction['_id']}
initialColor="grey"
finalColor="white"
onClick={event => handleRowClick(event, transaction)}
sx={{
borderBottom: 'none',
fontFamily: 'Roboto, Helvetica, Arial, sans-serif'
}}
>
<TableCell
padding="checkbox"
className="non-clickable-column"
sx={{borderBottom: 'none'}}
>
<Checkbox
checked={selectedRows.has(transaction)}
onChange={() => handleRowSelect(transaction)}
/>
</TableCell>
<TableCell>
<TableCell sx={{borderBottom: 'none'}}>
<IconButton
sx={{
height: '32px',
Expand Down Expand Up @@ -202,25 +240,52 @@ const TransactionLogTable: React.FC<{
/>
</IconButton>
</TableCell>
<TableCell>{transaction.request.method}</TableCell>
<TableCell>{transaction.request.host}</TableCell>
<TableCell>{transaction.request.port}</TableCell>
<TableCell>{transaction.request.path}</TableCell>
<TableCell>{(transaction.request as any).params}</TableCell>
<TableCell>{(transaction as any).channelName}</TableCell>
<TableCell>{(transaction as any).clientName}</TableCell>
<TableCell>
<StatusButton
status={transaction.status}
buttonText={transaction.status}
/>
<TableCell
sx={{
color:
transaction.status === 'Processing'
? 'info.main'
: transaction.status === 'Pending Async'
? 'info.main'
: transaction.status === 'Successful'
? 'success.main'
: transaction.status === 'Completed'
? 'warning.main'
: transaction.status === 'Completed with error(s)'
? 'warning.main'
: 'error.main',
borderBottom: 'none'
}}
>
{transaction.status}
</TableCell>
<TableCell sx={{borderBottom: 'none'}}>
{transaction.request.method}
</TableCell>
<TableCell sx={{borderBottom: 'none'}}>
{transaction.request.host}
</TableCell>
<TableCell sx={{borderBottom: 'none'}}>
{transaction.request.port}
</TableCell>
<TableCell sx={{borderBottom: 'none'}}>
{transaction.request.path}
</TableCell>
<TableCell sx={{borderBottom: 'none'}}>
{(transaction.request as any).params}
</TableCell>
<TableCell>
<TableCell sx={{borderBottom: 'none'}}>
{(transaction as any).channelName}
</TableCell>
<TableCell sx={{borderBottom: 'none'}}>
{(transaction as any).clientName}
</TableCell>
<TableCell sx={{borderBottom: 'none'}}>
{convertTimestampFormat(
transaction.request.timestamp as any
)}
</TableCell>
</AnimatedTableRow>
</TableRow>
))
) : (
<TableRow>
Expand All @@ -230,16 +295,24 @@ const TransactionLogTable: React.FC<{
</TableRow>
)}
{initialTransactionLoadComplete && transactions.length === 0 && (
<TableRow>
<TableCell colSpan={11} align="center">
<TableRow sx={{borderBottom: 'none'}}>
<TableCell
colSpan={11}
align="center"
sx={{borderBottom: 'none'}}
>
There are no transactions for the current filters
</TableCell>
</TableRow>
)}
</TableBody>
<TableFooter>
<TableRow>
<TableCell colSpan={11} align="right">
<TableRow sx={{borderBottom: 'none'}}>
<TableCell
colSpan={11}
align="right"
sx={{borderBottom: 'none'}}
>
<Button
onClick={loadMore}
endIcon={<ChevronRight />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ const CustomizeDialog: React.FC<CustomizeDialogProps> = ({
handleFilterVisibilityChange
}) => {
return (
<Dialog open={open} onClose={onClose}>
<Dialog open={open} onClose={onClose} fullWidth>
<DialogTitle>Customize displayed filters</DialogTitle>
<DialogContent>
<List>
{Object.keys(visibleFilters).map(filter => (
<ListItem key={filter}>
<ListItem key={filter} sx={{padding: '0px 0px'}}>
<FormControlLabel
control={
<Checkbox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const BasicFilters: React.FC<BasicFilterProps> = ({
}

return (
<Box sx={{padding: '16px'}}>
<Box>
<Grid container spacing={2}>
<Grid item xs={12} sm={6} md={1.5} lg={1.5}>
<TextField
Expand Down