This commit is contained in:
Frikky
2024-12-20 21:56:33 +02:00
parent 75fdbb4ffc
commit 376a6d5173
18 changed files with 1867 additions and 926 deletions
+50 -45
View File
@@ -229,7 +229,7 @@ useEffect(() => {
setOpenautomateTab(false);
setOpenSecurityTab(true);
setCurrentOpenTab("security");
} else if ((lastTabOpenByUser === "usecases" && currentPath.includes("/usecases2")) || currentPath.includes("/usecases2")) {
} else if ((lastTabOpenByUser === "usecases" && currentPath.includes("/usecases")) || currentPath.includes("/usecases")) {
setOpenautomateTab(true);
setOpenSecurityTab(false);
setCurrentOpenTab("usecases");
@@ -466,6 +466,7 @@ useEffect(() => {
onClick={(event) => {
handleClose();
}}
style={{fontSize: 18}}
>
<BusinessIcon style={{ marginRight: 5 }} /> Organization
</MenuItem>
@@ -475,6 +476,7 @@ useEffect(() => {
onClick={(event) => {
handleClose();
}}
style={{fontSize: 18}}
>
<SettingsIcon style={{ marginRight: 5 }} /> Account
</MenuItem>
@@ -486,6 +488,7 @@ useEffect(() => {
onClick={(event) => {
handleClose();
}}
style={{fontSize: 18}}
>
<NotificationsIcon style={{ marginRight: 5 }} /> Notifications ({
notifications === undefined || notifications === null ? 0 :
@@ -498,6 +501,7 @@ useEffect(() => {
onClick={(event) => {
handleClose();
}}
style={{fontSize: 18}}
>
<LightbulbIcon style={{ marginRight: 5 }} /> Use Cases
</MenuItem>
@@ -510,24 +514,26 @@ useEffect(() => {
onClick={(event) => {
handleClose();
}}
style={{fontSize: 18}}
>
<HelpOutlineIcon style={{ marginRight: 5 }} /> About
</MenuItem>
</Link>
<MenuItem
style={{ color: "white" }}
style={{ color: "white", fontSize: 18 }}
onClick={(event) => {
handleClickLogout();
event.preventDefault();
handleClose();
}}
>
<MeetingRoomIcon style={{ marginRight: 5 }} /> &nbsp;Logout
</MenuItem>
<Divider style={{ marginBottom: 10, }} />
<Typography variant="body2" color="textSecondary" align="center" style={{ marginTop: 5, marginBottom: 5, }}>
Version: 2.0.0-beta
<Typography color="textSecondary" align="center" style={{ marginTop: 5, marginBottom: 5, fontSize: 18 }}>
Version: 2.0.0-rc
</Typography>
</Menu>
</span>
@@ -717,6 +723,7 @@ useEffect(() => {
width: expandLeftNav ? "100%" : 30,
padding: 0,
},
fontSize: 18
};
const modalView = (
@@ -898,7 +905,7 @@ useEffect(() => {
whiteSpace: "nowrap",
}}
>
<kbd>Ctrl</kbd>/<kbd>Cmd</kbd>+<kbd>K</kbd>
<kbd>Ctrl</kbd>+<kbd>K</kbd>
</span>
),
disableUnderline: true,
@@ -936,6 +943,7 @@ useEffect(() => {
display: "flex",
flexDirection: "column",
padding: expandLeftNav ? "0 16px" : "0px 8px",
gap: 1.2,
}}
>
<Box sx={{ display: "flex", flexDirection: "row", marginTop: 2.5, width: expandLeftNav ? "100%" : 48, padding: "0px", }}>
@@ -950,18 +958,18 @@ useEffect(() => {
variant="text"
style={{
...ButtonStyle,
backgroundColor: ((currentOpenTab === "automate" && currentPath.includes("/dashboards/automate"))|| (!expandLeftNav && (currentPath === "/workflows" || currentPath === "/usecases2" || currentPath.includes("/search"))))? "#2f2f2f": "transparent",
backgroundColor: ((currentOpenTab === "automate" && currentPath.includes("/dashboards/automate"))|| (!expandLeftNav && (currentPath === "/workflows" || currentPath === "/usecases" || currentPath.includes("/search"))))? "#2f2f2f": "transparent",
}}
onMouseOver={(event)=>{
event.currentTarget.style.backgroundColor = "#2f2f2f";
}}
onMouseOut={(event)=>{
event.currentTarget.style.backgroundColor = ((currentOpenTab === "automate" && currentPath.includes("/dashboards/automate"))|| (!expandLeftNav && (currentPath === "/workflows" || currentPath === "/usecases2" || currentPath.includes("/search"))))? "#2f2f2f": "transparent";
event.currentTarget.style.backgroundColor = ((currentOpenTab === "automate" && currentPath.includes("/dashboards/automate"))|| (!expandLeftNav && (currentPath === "/workflows" || currentPath === "/usecases" || currentPath.includes("/search"))))? "#2f2f2f": "transparent";
}}
>
<img
src={detectionIcon}
style={{ width: 16, height: 16, marginRight: expandLeftNav ? 10 : 0 }}
style={{ width: 18, height: 18, marginRight: expandLeftNav ? 10 : 0 }}
alt="Automate Icon"
/>
<span
@@ -1020,7 +1028,7 @@ useEffect(() => {
display: "flex",
flexDirection: "column",
paddingLeft: 16,
gap: 4,
gap: 10,
}}
>
<Link to="/usecases" style={hrefStyle}>
@@ -1032,8 +1040,9 @@ useEffect(() => {
style={{
width: "100%",
height: 35,
color: "#C8C8C8",
color: currentOpenTab === "usecases" && expandLeftNav && currentPath.includes("/usecases") ? "#FFFFFF" : "#C8C8C8",
justifyContent: "flex-start",
fontSize: 18,
textTransform: "none",
backgroundColor: currentOpenTab === "usecases" && expandLeftNav && currentPath.includes("/usecases")? "#2f2f2f": "transparent",
marginLeft: 16
@@ -1046,13 +1055,13 @@ useEffect(() => {
}}
disableRipple={expandLeftNav ? false : true}
>
<span style={{display: expandLeftNav ? "inline" : "none",opacity: expandLeftNav ? 1 : 0, transition: "opacity 0.3s ease", position: 'relative', left: !expandLeftNav ? 10: 0, marginRight: 10, fontSize: 16 }}></span>{" "}
<span style={{display: expandLeftNav ? "inline" : "none",opacity: expandLeftNav ? 1 : 0, transition: "opacity 0.3s ease", position: 'relative', left: !expandLeftNav ? 10: 0, marginRight: 10, fontSize: 18 }}></span>{" "}
<span
style={{
display: expandLeftNav ? "inline" : "none",
opacity: expandLeftNav ? 1 : 0,
transition: "opacity 0.3s ease",
color: currentOpenTab === "usecases" && currentPath.includes("/usecases3") ? "#F1F1F1" : "#C8C8C8",
color: currentOpenTab === "usecases" && currentPath.includes("/usecases") ? "#FFFFFF" : "#C8C8C8",
}}
>
Usecases
@@ -1068,11 +1077,12 @@ useEffect(() => {
style={{
width: "100%",
height: 35,
color: "#C8C8C8",
color: currentOpenTab === "workflows" && currentPath === "/workflows" ? "#FFFFFF" : "#C8C8C8",
justifyContent: "flex-start",
textTransform: "none",
backgroundColor: currentOpenTab === "workflows" && currentPath === "/workflows" && expandLeftNav? "#2f2f2f": "transparent",
marginLeft: 16
marginLeft: 16,
fontSize: 18
}}
disableRipple={expandLeftNav ? false : true}
onMouseOver={(event)=>{
@@ -1082,13 +1092,13 @@ useEffect(() => {
event.currentTarget.style.backgroundColor = currentOpenTab === "workflows" && currentPath === "/workflows" && expandLeftNav? "#2f2f2f": "transparent";
}}
>
<span style={{display: expandLeftNav ? "inline" : "none", opacity: expandLeftNav ? 1 : 0, transition: "opacity 0.3s ease", position: 'relative', left: !expandLeftNav ? 10: 0, marginRight: 10, fontSize: 16 }}></span>{" "}
<span style={{display: expandLeftNav ? "inline" : "none", opacity: expandLeftNav ? 1 : 0, transition: "opacity 0.3s ease", position: 'relative', left: !expandLeftNav ? 10: 0, marginRight: 10, fontSize: 18 }}></span>{" "}
<span
style={{
display: expandLeftNav ? "inline" : "none",
opacity: expandLeftNav ? 1 : 0,
transition: "opacity 0.3s ease",
color: currentOpenTab === "workflows" && currentPath === "/workflows" ? "#F1F1F1" : "#C8C8C8",
color: currentOpenTab === "workflows" && currentPath === "/workflows" ? "#FFFFFF" : "#C8C8C8",
}}
>
Workflows
@@ -1104,11 +1114,12 @@ useEffect(() => {
style={{
width: "100%",
height: 35,
color: "#C8C8C8",
color: currentOpenTab === "apps" && currentPath.includes("/apps") ? "#FFFFFF" : "#C8C8C8",
justifyContent: "flex-start",
textTransform: "none",
backgroundColor: currentOpenTab === "apps" && expandLeftNav && currentPath.includes("/apps2") ? "#2f2f2f": "transparent",
marginLeft: 16
marginLeft: 16,
fontSize: 18
}}
onMouseOver={(event)=>{
event.currentTarget.style.backgroundColor = "#2f2f2f";
@@ -1118,13 +1129,13 @@ useEffect(() => {
}}
disableRipple={expandLeftNav ? false : true}
>
<span style={{display: expandLeftNav ? "inline" : "none",opacity: expandLeftNav ? 1 : 0, transition: "opacity 0.3s ease", position: 'relative', left: !expandLeftNav ? 10: 0, marginRight: 10, fontSize: 16 }}></span>{" "}
<span style={{display: expandLeftNav ? "inline" : "none",opacity: expandLeftNav ? 1 : 0, transition: "opacity 0.3s ease", position: 'relative', left: !expandLeftNav ? 10: 0, marginRight: 10, fontSize: 18 }}></span>{" "}
<span
style={{
display: expandLeftNav ? "inline" : "none",
opacity: expandLeftNav ? 1 : 0,
transition: "opacity 0.3s ease",
color: currentOpenTab === "apps" && currentPath.includes("/apps2") ? "#F1F1F1" : "#C8C8C8",
color: currentOpenTab === "apps" && currentPath.includes("/apps") ? "#FFFFFF" : "#C8C8C8",
}}
>
Apps
@@ -1142,17 +1153,14 @@ useEffect(() => {
>
<span style={{ display: "inline-block", width: "100%" }}>
<Link
to={userdata?.support ? "/dashboards/security" : "#"}
to={"#"}
style={{
...hrefStyle,
pointerEvents: userdata?.support ? "auto" : "none",
cursor: "not-allowed",
pointerEvents: "auto",
}}
>
<Button
disabled={true}
onClick={(event) => {
if (!userdata?.support) return;
setOpenSecurityTab(true);
setOpenautomateTab(false);
setCurrentOpenTab("security");
@@ -1161,29 +1169,23 @@ useEffect(() => {
style={{
...ButtonStyle,
backgroundColor:
((currentOpenTab === "security" && currentPath.includes("/security")) ||
(!expandLeftNav &&
(currentPath.includes("detections") || currentPath.includes("response"))))
currentOpenTab === "security"
? "#2f2f2f"
: "transparent",
cursor: userdata?.support ? "pointer" : "not-allowed",
}}
onMouseOver={(event)=>{
event.currentTarget.style.backgroundColor = "#2f2f2f";
}}
onMouseOut={(event)=>{
event.currentTarget.style.backgroundColor = ((currentOpenTab === "security" && currentPath.includes("/security")) ||
(!expandLeftNav &&
(currentPath.includes("detections") || currentPath.includes("response"))))
event.currentTarget.style.backgroundColor = currentOpenTab === "security"
? "#2f2f2f"
: "transparent";
}}
disabled={!userdata?.support}
>
<ShieldOutlinedIcon
style={{
width: 16,
height: 16,
width: 18,
height: 18,
marginRight: expandLeftNav ? 10 : 0,
color: userdata?.support ? "inherit" : "#6F6F6F",
}}
@@ -1192,14 +1194,13 @@ useEffect(() => {
style={{
display: expandLeftNav ? "inline" : "none",
marginRight: "auto",
color: userdata?.support
? currentOpenTab === "security" && currentPath.includes("/security")
fontSize: 18,
color: currentOpenTab === "security"
? "#F1F1F1"
: "#C8C8C8"
: "#6F6F6F",
}}
>
Content
Discover
</span>
</Button>
</Link>
@@ -1278,7 +1279,7 @@ useEffect(() => {
}}
disabled={userdata?.support === false}
>
<span style={{ position: "relative", left: !expandLeftNav ? 10 : 0, marginRight: 10, fontSize: 16 }}>
<span style={{ position: "relative", left: !expandLeftNav ? 10 : 0, marginRight: 10, fontSize: 18 }}>
</span>
<span
@@ -1286,6 +1287,7 @@ useEffect(() => {
display: expandLeftNav ? "inline" : "none",
opacity: expandLeftNav ? 1 : 0,
transition: "opacity 0.3s ease",
fontSize: 18,
color:
userdata?.support && currentOpenTab === "detection" && currentPath.includes("/detection")
? "#F1F1F1"
@@ -1329,7 +1331,7 @@ useEffect(() => {
cursor: userdata?.support ? "pointer" : "not-allowed",
}}
>
<span style={{ position: "relative", left: !expandLeftNav ? 10 : 0, marginRight: 10, fontSize: 16 }}>
<span style={{ position: "relative", left: !expandLeftNav ? 10 : 0, marginRight: 10, fontSize: 18 }}>
</span>
<span
@@ -1337,6 +1339,7 @@ useEffect(() => {
display: expandLeftNav ? "inline" : "none",
opacity: expandLeftNav ? 1 : 0,
transition: "opacity 0.3s ease",
fontSize: 18,
color:
userdata?.support && currentOpenTab === "response" && currentPath.includes("/response")
? "#F1F1F1"
@@ -1380,7 +1383,7 @@ useEffect(() => {
cursor: userdata?.support ? "pointer" : "not-allowed",
}}
>
<span style={{ position: "relative", left: !expandLeftNav ? 10 : 0, marginRight: 10, fontSize: 16 }}>
<span style={{ position: "relative", left: !expandLeftNav ? 10 : 0, marginRight: 10, fontSize: 18 }}>
</span>
<span
@@ -1388,6 +1391,7 @@ useEffect(() => {
display: expandLeftNav ? "inline" : "none",
opacity: expandLeftNav ? 1 : 0,
transition: "opacity 0.3s ease",
fontSize: 18,
color:
userdata?.support && currentOpenTab === "response" && currentPath.includes("/response")
? "#F1F1F1"
@@ -1458,7 +1462,7 @@ useEffect(() => {
<Typography
style={{
color: "#CDCDCD",
fontSize: 14,
fontSize: 18,
padding: "8px 8px",
marginBottom: 10,
}}
@@ -1688,7 +1692,7 @@ useEffect(() => {
},
transition: "opacity 0.3s ease",
textTransform: "none",
fontSize: 16,
fontSize: 18,
}}
disableElevation
disableRipple
@@ -1718,13 +1722,14 @@ useEffect(() => {
style={{
color: "#CDCDCD",
margin: "0 5px",
fontSize: 16,
fontSize: 18,
whiteSpace: "nowrap",
overflow: "hidden",
textOverflow: "ellipsis",
maxWidth: 150,
textAlign: "center",
marginLeft: 10,
}}
>
{userdata?.username}