From aab46cca61a46bbe3909294ebfcb56d4162e2542 Mon Sep 17 00:00:00 2001 From: Frikky Date: Thu, 9 Jan 2025 22:54:35 +0100 Subject: [PATCH] Minor UI fixes for Shuffle Tools dragging --- frontend/src/components/DetectionExplorer.jsx | 10 +++++++--- frontend/src/views/AngularWorkflow.jsx | 12 +++++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/DetectionExplorer.jsx b/frontend/src/components/DetectionExplorer.jsx index 81eda8c0..fed09d26 100644 --- a/frontend/src/components/DetectionExplorer.jsx +++ b/frontend/src/components/DetectionExplorer.jsx @@ -133,14 +133,18 @@ const DetectionExplorer = (props) => { const handleConnectClick = () => { if (detectionWorkflowId !== "") { + console.log("Already have a workflow ID for this detection") + //toast.info(`Already have a detection workflow for ${detectionInfo?.category}`) // FIXME: Show the Usecase UI for how to fix the workflow(s) // Instead loading full workflow and showing it directly? Hmm //toast.warn("Please reload the UI to load the detection status") - return + //return } if (isDetectionActive) { - return + console.log("Already connected") + //toast.info(`Connected to ${detectionInfo?.category}`) + //return } if (detectionInfo.category === undefined || detectionInfo.category === null) { @@ -276,7 +280,7 @@ const DetectionExplorer = (props) => { }} > - {detectionInfo?.title} {filteredRules === undefined || filteredRules === null ? null : `(${filteredRules?.length} rules)`} + {detectionInfo?.title} {filteredRules === undefined || filteredRules === null ? null : `(${filteredRules?.length} rule${filteredRules?.length > 1 ? "s" : ""})`}
diff --git a/frontend/src/views/AngularWorkflow.jsx b/frontend/src/views/AngularWorkflow.jsx index ae87ef6a..bfeff035 100755 --- a/frontend/src/views/AngularWorkflow.jsx +++ b/frontend/src/views/AngularWorkflow.jsx @@ -10021,7 +10021,14 @@ const releaseToConnectLabel = "Release to Connect" const small = props.small const actionString = props.action const [hover, setHover] = React.useState(false); - + React.useEffect(() => { + if(app.name === "Shuffle Tools"){ + if (app.actions !== undefined && (app.actions === null || app.actions.length === 1)) { + loadAppConfig(app.id, false) + } + } + }, []) + if (app === undefined || app === null) { return (
{ clickedApp(hit)