Merge branch '2.0.0' of github.com:satti-hari-krishna-reddy/Shuffle into 2.0.0

This commit is contained in:
satti-hari-krishna-reddy
2024-06-25 12:01:37 +05:30
parent 6873a22024
commit a3841e0602
+86 -83
View File
@@ -15416,7 +15416,7 @@ const releaseToConnectLabel = "Release to Connect"
toast("please stop the trigger to edit the configuration"); toast("please stop the trigger to edit the configuration");
return; return;
} else { } else {
setSelectedOption("Sigma Rulesearch"); setSelectedOption("SigmaRule");
setTenzirConfigModalOpen(true); setTenzirConfigModalOpen(true);
}}} }}}
style={{ style={{
@@ -15432,8 +15432,8 @@ const releaseToConnectLabel = "Release to Connect"
<FormControlLabel <FormControlLabel
control={ control={
<Radio <Radio
checked={selectedOption === "Sigma Rulesearch"} checked={selectedOption === "SigmaRule"}
onChange={() => setSelectedOption("Sigma Rulesearch")} onChange={() => setSelectedOption("SigmaRule")}
value={"Sigma Rulesearch"} value={"Sigma Rulesearch"}
name="option" name="option"
/> />
@@ -21193,10 +21193,8 @@ const releaseToConnectLabel = "Release to Connect"
</Dialog> </Dialog>
) : null; ) : null;
const tenzirConfigModal = () => { const TenzirConfigModal = () => {
if (!tenzirConfigModalOpen) return null; const [loading, setLoading] = useState(false);
const [loading, setLoading] = useState(true);
const [selectedRules, setSelectedRules] = useState([]); const [selectedRules, setSelectedRules] = useState([]);
const handleRuleChange = (event) => { const handleRuleChange = (event) => {
@@ -21240,84 +21238,89 @@ const releaseToConnectLabel = "Release to Connect"
const enabledSigmaInfo = rules.filter(rule => rule.is_enabled); const enabledSigmaInfo = rules.filter(rule => rule.is_enabled);
<Dialog if (!tenzirConfigModalOpen) return null;
PaperComponent={PaperComponent}
hideBackdrop={true}
disableEnforceFocus={true}
disableBackdropClick={true}
style={{ pointerEvents: "none" }}
open={tenzirConfigModalOpen}
PaperProps={{
style: {
pointerEvents: "auto",
color: "white",
minWidth: 600,
minHeight: 200,
maxHeight: 200,
padding: 15,
overflow: "hidden",
zIndex: 10012,
border: theme.palette.defaultBorder,
},
}}
>
{loading ? (
<CircularProgress />
) : (
<div
style={{
flex: 2,
padding: 0,
minHeight: isMobile ? "90%" : 700,
maxHeight: isMobile ? "90%" : 700,
overflowY: "auto",
overflowX: isMobile ? "auto" : "hidden",
}}
>
<DialogContent>
{selectedOption === 'sigmaRule' && (
<>
<FormControl fullWidth>
<InputLabel>Select Sigma Rules</InputLabel>
<Select
multiple
value={selectedRules}
onChange={handleRuleChange}
renderValue={(selected) => selected.join(', ')}
>
{enabledSigmaInfo.map(rule => (
<MenuItem key={rule.file_id} value={rule.file_id}>
<Checkbox checked={selectedRules.indexOf(rule.file_id) > -1} />
<ListItemText primary={rule.title} />
</MenuItem>
))}
</Select>
</FormControl>
<Button onClick={handleSelectAll}>Select All</Button>
</>
)}
</DialogContent>
<DialogActions>
<Button style={{ borderRadius: "0px" }} onClick={handleClose} color="primary">Cancel</Button>
<Button style={{ borderRadius: "0px" }} onClick={handleSubmit} color="primary">Submit</Button>
</DialogActions>
</div>
)}
<IconButton return (
style={{ <Dialog
zIndex: 5000, PaperComponent={PaperComponent}
position: "absolute", hideBackdrop={true}
top: 14, disableEnforceFocus={true}
right: 18, disableBackdropClick={true}
color: "grey", style={{ pointerEvents: "none" }}
open={tenzirConfigModalOpen}
PaperProps={{
style: {
pointerEvents: "auto",
color: "white",
minWidth: 600,
minHeight: 200,
maxHeight: 200,
padding: 15,
overflow: "hidden",
zIndex: 10012,
border: theme.palette.defaultBorder,
},
}} }}
onClick={handleClose}
> >
<CloseIcon /> {loading ? (
</IconButton> <CircularProgress />
</Dialog> ) : (
} <div
style={{
flex: 2,
padding: 0,
minHeight: isMobile ? "90%" : 700,
maxHeight: isMobile ? "90%" : 700,
overflowY: "auto",
overflowX: isMobile ? "auto" : "hidden",
}}
>
<DialogContent>
{selectedOption === 'SigmaRule' && (
<>
<FormControl fullWidth>
<InputLabel>Select Sigma Rules</InputLabel>
<Select
multiple
value={selectedRules}
onChange={handleRuleChange}
renderValue={(selected) => selected.join(', ')}
>
{enabledSigmaInfo.map(rule => (
<MenuItem key={rule.file_id} value={rule.file_id}>
<Checkbox checked={selectedRules.indexOf(rule.file_id) > -1} />
<ListItemText primary={rule.title} />
</MenuItem>
))}
</Select>
</FormControl>
<Button onClick={handleSelectAll}>Select All</Button>
</>
)}
</DialogContent>
<DialogActions>
<Button style={{ borderRadius: "0px" }} onClick={handleClose} color="primary">Cancel</Button>
<Button style={{ borderRadius: "0px" }} onClick={handleSubmit} color="primary">Submit</Button>
</DialogActions>
</div>
)}
<IconButton
style={{
zIndex: 5000,
position: "absolute",
top: 14,
right: 18,
color: "grey",
}}
onClick={handleClose}
>
<CloseIcon />
</IconButton>
</Dialog>
);
}
@@ -21897,7 +21900,7 @@ const releaseToConnectLabel = "Release to Connect"
{codePopoutModal} {codePopoutModal}
{workflowRevisions} {workflowRevisions}
{authenticationModal} {authenticationModal}
{tenzirConfigModal} {<TenzirConfigModal/>}
{/*editWorkflowModal*/} {/*editWorkflowModal*/}
{authgroupModal} {authgroupModal}
{executionArgumentModal} {executionArgumentModal}