From f78f8dda364d065d4165a93c6ac2af0956d5d94f Mon Sep 17 00:00:00 2001 From: Jovan Cvetkovic Date: Mon, 9 Jan 2023 10:28:00 +0100 Subject: [PATCH 1/2] [FEATURE] Detector must have at least one alert set #288 Signed-off-by: Jovan Cvetkovic --- .../ConfigureAlerts/containers/ConfigureAlerts.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/pages/CreateDetector/components/ConfigureAlerts/containers/ConfigureAlerts.tsx b/public/pages/CreateDetector/components/ConfigureAlerts/containers/ConfigureAlerts.tsx index 9cf0ddbc1..5f4ce02b8 100644 --- a/public/pages/CreateDetector/components/ConfigureAlerts/containers/ConfigureAlerts.tsx +++ b/public/pages/CreateDetector/components/ConfigureAlerts/containers/ConfigureAlerts.tsx @@ -130,9 +130,13 @@ export default class ConfigureAlerts extends Component this.onDelete(index)}> - Remove alert trigger - + triggers.length > 1 ? ( + this.onDelete(index)}> + Remove alert trigger + + ) : ( + <> + ) } > From eb3f3a5799299b5848256e10fb974e23f1a9663d Mon Sep 17 00:00:00 2001 From: Jovan Cvetkovic Date: Mon, 30 Jan 2023 10:38:44 +0100 Subject: [PATCH 2/2] [BUG] The detector edit pages should not have the Security Analytics sidebar visible. #386 Signed-off-by: Jovan Cvetkovic --- public/pages/Main/Main.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/pages/Main/Main.tsx b/public/pages/Main/Main.tsx index 933955615..64f578c0d 100644 --- a/public/pages/Main/Main.tsx +++ b/public/pages/Main/Main.tsx @@ -54,6 +54,10 @@ const HIDDEN_NAV_ROUTES: string[] = [ ROUTES.RULES_EDIT, ROUTES.RULES_DUPLICATE, ROUTES.RULES_IMPORT, + ROUTES.EDIT_DETECTOR_DETAILS, + ROUTES.EDIT_DETECTOR_RULES, + ROUTES.EDIT_FIELD_MAPPINGS, + ROUTES.EDIT_DETECTOR_ALERT_TRIGGERS, ]; interface MainProps extends RouteComponentProps { @@ -220,7 +224,7 @@ export default class Main extends Component { services && ( {/* Hide side navigation bar when on any HIDDEN_NAV_ROUTES pages. */} - {!HIDDEN_NAV_ROUTES.includes(pathname) && ( + {!HIDDEN_NAV_ROUTES.some((route) => pathname.match(route)) && (