-
{ruleName}
-
-
+
- {description}
-
-
+
+
+ {description}
+
+
+
{/* we need icons here ??? */}
-
-);
+ )
+}
-const Detection = () => {
+const Detection = (props) => {
+ const {globalUrl} = props;
+ const [ruleInfo, setRuleInfo] = React.useState([]);
+
+ const getSigmaInfo = () => {
+ const url = globalUrl + "/api/v1/files/detection/sigma_rules"
+
+ fetch(url, {
+ method: "GET",
+ credentials: "include",
+ headers: {
+ "Content-Type": "application/json",
+ },
+ }) .then((response) =>
+ response.json().then((responseJson) => {
+ if (responseJson["success"] === false) {
+ toast("Failed to get sigma rules");
+ } else {
+ setRuleInfo(responseJson);
+ }
+
+ }),
+ )
+ .catch((error) => {
+ console.log("Error in geting sigma files: ", error);
+ });
+ }
+
+ React.useEffect(() => {
+ getSigmaInfo()
+}, []);
+
return (
-
-
+
+
Group 1 Title
- Not Connected to SIEM
+
+ Not Connected to SIEM
+
-
+
-
- Global disable/enable
+
+
+ Global disable/enable
+
-
-
-
+ {ruleInfo.length > 0 &&
+ ruleInfo.map((card) => (
+
+ ))}
);