forked from Shuffle/Shuffle
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial UI implementation for managing detection rules
- Loading branch information
1 parent
e51c11a
commit 796fde7
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import React from 'react'; | ||
import { Container, Box, TextField, Switch, Card, CardContent, IconButton, Typography, Button } from '@mui/material'; | ||
import EditIcon from '@mui/icons-material/Edit'; | ||
import { styled } from '@mui/system'; | ||
|
||
const ConnectedButton = styled(Button)({ | ||
backgroundColor: 'red', | ||
color: 'white', | ||
}); | ||
|
||
const RuleCard = ({ ruleName, description }) => ( | ||
<Card variant="outlined" sx={{ mb: 2 }}> | ||
<CardContent> | ||
<div style = {{display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 2 }}> | ||
<Typography variant="h6">{ruleName}</Typography> | ||
<div style ={{ display: 'flex', alignItems: 'center'}}> | ||
<IconButton > | ||
<EditIcon /> | ||
</IconButton> | ||
<Switch defaultChecked /> | ||
</div> | ||
</div> | ||
<Typography variant="body2" style = {{marginTop: '2%'}}>{description}</Typography> | ||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mt: 2 }}> | ||
<Box sx={{ display: 'flex', gap: 1 }}> | ||
{/* we need icons here ??? */} | ||
</Box> | ||
</Box> | ||
</CardContent> | ||
</Card> | ||
); | ||
|
||
const Detection = () => { | ||
return ( | ||
<Container sx={{ mt: 4 }}> | ||
<Box sx={{ border: '1px solid #ccc', borderRadius: 2, p: 3 }}> | ||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 2 }}> | ||
<Typography variant="h6" component="div"> | ||
Group 1 Title | ||
</Typography> | ||
<ConnectedButton variant="contained">Not Connected to SIEM</ConnectedButton> | ||
</Box> | ||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 2 }}> | ||
<TextField label="Search rules" variant="outlined" size="small" /> | ||
<Box sx={{ display: 'flex', alignItems: 'center' }}> | ||
<Typography variant="body2" sx={{ mr: 1 }}>Global disable/enable</Typography> | ||
<Switch defaultChecked /> | ||
</Box> | ||
</Box> | ||
<RuleCard ruleName="Rule Name" description="this is the random text generated by me to check how this looks in the ui" /> | ||
<RuleCard ruleName="Rule Name" description="Lorum Ipsum Lorum Ipsum Lorum Ipsum Lorum Ipsum Lorum Ipsum" /> | ||
<RuleCard ruleName="Rule Name" description="LorumIpsumLorumIpsumLorumIpsumLorumIpsumLorumIpsum" /> | ||
</Box> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default Detection; |