Merge branch '2.0.0' of github.com:satti-hari-krishna-reddy/Shuffle into 2.0.0
This commit is contained in:
@@ -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,25 +21193,23 @@ 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) => {
|
||||||
setSelectedRules(event.target.value);
|
setSelectedRules(event.target.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSelectAll = () => {
|
const handleSelectAll = () => {
|
||||||
const allEnabledRules = rules.filter(rule => rule.is_enabled).map(rule => rule.file_id);
|
const allEnabledRules = rules.filter(rule => rule.is_enabled).map(rule => rule.file_id);
|
||||||
setSelectedRules(allEnabledRules);
|
setSelectedRules(allEnabledRules);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
setTenzirConfigModalOpen(false);
|
setTenzirConfigModalOpen(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
const selectedRuleFiles = rules
|
const selectedRuleFiles = rules
|
||||||
.filter(rule => selectedRules.includes(rule.file_id));
|
.filter(rule => selectedRules.includes(rule.file_id));
|
||||||
@@ -21239,85 +21237,90 @@ 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}
|
return (
|
||||||
disableEnforceFocus={true}
|
<Dialog
|
||||||
disableBackdropClick={true}
|
PaperComponent={PaperComponent}
|
||||||
style={{ pointerEvents: "none" }}
|
hideBackdrop={true}
|
||||||
open={tenzirConfigModalOpen}
|
disableEnforceFocus={true}
|
||||||
PaperProps={{
|
disableBackdropClick={true}
|
||||||
style: {
|
style={{ pointerEvents: "none" }}
|
||||||
pointerEvents: "auto",
|
open={tenzirConfigModalOpen}
|
||||||
color: "white",
|
PaperProps={{
|
||||||
minWidth: 600,
|
style: {
|
||||||
minHeight: 200,
|
pointerEvents: "auto",
|
||||||
maxHeight: 200,
|
color: "white",
|
||||||
padding: 15,
|
minWidth: 600,
|
||||||
overflow: "hidden",
|
minHeight: 200,
|
||||||
zIndex: 10012,
|
maxHeight: 200,
|
||||||
border: theme.palette.defaultBorder,
|
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
|
|
||||||
style={{
|
|
||||||
zIndex: 5000,
|
|
||||||
position: "absolute",
|
|
||||||
top: 14,
|
|
||||||
right: 18,
|
|
||||||
color: "grey",
|
|
||||||
}}
|
}}
|
||||||
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}
|
||||||
|
|||||||
Reference in New Issue
Block a user