From 30a5657181fe155143bade64ecf90ea1d464905e Mon Sep 17 00:00:00 2001 From: Amardeepsingh Siglani Date: Wed, 21 Dec 2022 13:30:20 -0800 Subject: [PATCH] Made minor changes to polish the UI (#247) * polished UI Signed-off-by: Amardeepsingh Siglani * updated legend for alert severity Signed-off-by: Amardeepsingh Siglani * updated cypress test Signed-off-by: Amardeepsingh Siglani * use prepend prop for vis group by control Signed-off-by: Amardeepsingh Siglani Signed-off-by: Amardeepsingh Siglani --- cypress/integration/1_detectors.spec.js | 6 ++--- .../pages/Alerts/containers/Alerts/Alerts.tsx | 7 +++--- .../DetectorRulesView/DetectorRulesView.tsx | 2 +- .../containers/Detectors/Detectors.tsx | 2 +- .../GettingStarted/GetStartedStep.tsx | 4 ++-- .../GettingStarted/GettingStartedPopup.tsx | 3 +-- .../components/Widgets/RecentAlertsWidget.tsx | 5 +---- .../Widgets/RecentFindingsWidget.tsx | 5 +---- .../Overview/containers/Overview/Overview.tsx | 22 +++++++++---------- public/utils/helpers.tsx | 5 +---- 10 files changed, 25 insertions(+), 36 deletions(-) diff --git a/cypress/integration/1_detectors.spec.js b/cypress/integration/1_detectors.spec.js index 46106bf11..65d1027f2 100644 --- a/cypress/integration/1_detectors.spec.js +++ b/cypress/integration/1_detectors.spec.js @@ -204,7 +204,7 @@ describe('Detectors', () => { cy.contains('test detector').click({ force: true }); // Confirm number of rules before edit - cy.contains('Detection rules (1)'); + cy.contains('Active rules (1)'); // Click "Edit" button in Detector rules panel cy.get(`[data-test-subj="edit-detector-rules"]`).click({ force: true }); @@ -229,7 +229,7 @@ describe('Detectors', () => { cy.get(`[data-test-subj="save-detector-rules-edits"]`).click({ force: true }); // Confirm 1 rule has been removed from detector - cy.contains('Detection rules (0)'); + cy.contains('Active rules (0)'); // Click "Edit" button in Detector rules panel cy.get(`[data-test-subj="edit-detector-rules"]`).click({ force: true }); @@ -253,7 +253,7 @@ describe('Detectors', () => { cy.get(`[data-test-subj="save-detector-rules-edits"]`).click({ force: true }); // Confirm 1 rule has been added to detector - cy.contains('Detection rules (1)'); + cy.contains('Active rules (1)'); }); it('...can be deleted', () => { diff --git a/public/pages/Alerts/containers/Alerts/Alerts.tsx b/public/pages/Alerts/containers/Alerts/Alerts.tsx index 983fc33eb..e362039e4 100644 --- a/public/pages/Alerts/containers/Alerts/Alerts.tsx +++ b/public/pages/Alerts/containers/Alerts/Alerts.tsx @@ -7,11 +7,11 @@ import { DurationRange, EuiBasicTableColumn, EuiButton, - EuiButtonEmpty, EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiInMemoryTable, + EuiLink, EuiPanel, EuiSpacer, EuiSuperDatePicker, @@ -34,7 +34,6 @@ import { DEFAULT_DATE_RANGE, DEFAULT_EMPTY_DATA, MAX_RECENTLY_USED_TIME_RANGES, - ROUTES, } from '../../../../utils/constants'; import { CoreServicesContext } from '../../../../components/core_services'; import AlertsService from '../../../../services/AlertsService'; @@ -146,7 +145,7 @@ class Alerts extends Component { sortable: false, dataType: 'string', render: (triggerName: string, alertItem: AlertItem) => ( - this.setFlyout(alertItem)}>{triggerName} + this.setFlyout(alertItem)}>{triggerName} ), }, { @@ -224,7 +223,7 @@ class Alerts extends Component { alert: 1, time, status: alert.state, - severity: alert.severity, + severity: parseAlertSeverityToOption(alert.severity)?.label || alert.severity, }; }); diff --git a/public/pages/Detectors/components/DetectorRulesView/DetectorRulesView.tsx b/public/pages/Detectors/components/DetectorRulesView/DetectorRulesView.tsx index 452af54ac..e3762bade 100644 --- a/public/pages/Detectors/components/DetectorRulesView/DetectorRulesView.tsx +++ b/public/pages/Detectors/components/DetectorRulesView/DetectorRulesView.tsx @@ -139,7 +139,7 @@ export const DetectorRulesView: React.FC = (props) => { {rules} ) : ( - + {rules} ); diff --git a/public/pages/Detectors/containers/Detectors/Detectors.tsx b/public/pages/Detectors/containers/Detectors/Detectors.tsx index 208e0d272..5707cf38d 100644 --- a/public/pages/Detectors/containers/Detectors/Detectors.tsx +++ b/public/pages/Detectors/containers/Detectors/Detectors.tsx @@ -277,7 +277,7 @@ export default class Detectors extends Component }, { field: 'rulesCount', - name: 'Rules', + name: 'Active rules', sortable: true, dataType: 'number', align: 'left', diff --git a/public/pages/Overview/components/GettingStarted/GetStartedStep.tsx b/public/pages/Overview/components/GettingStarted/GetStartedStep.tsx index 9c01956fe..4eb264b7c 100644 --- a/public/pages/Overview/components/GettingStarted/GetStartedStep.tsx +++ b/public/pages/Overview/components/GettingStarted/GetStartedStep.tsx @@ -26,8 +26,8 @@ export const GetStartedStep: React.FC = ({ buttons, title } - {buttons.map((btn: GetStartedStepButton) => ( - + {buttons.map((btn: GetStartedStepButton, index: number) => ( + {btn.text} diff --git a/public/pages/Overview/components/GettingStarted/GettingStartedPopup.tsx b/public/pages/Overview/components/GettingStarted/GettingStartedPopup.tsx index 51d262309..3f824eec5 100644 --- a/public/pages/Overview/components/GettingStarted/GettingStartedPopup.tsx +++ b/public/pages/Overview/components/GettingStarted/GettingStartedPopup.tsx @@ -129,8 +129,7 @@ export const GettingStartedPopup: React.FC = ({

- Security analytics generates critical security insights from existing security event - logs.  + Generates critical security insights from your event logs.  Learn more diff --git a/public/pages/Overview/components/Widgets/RecentAlertsWidget.tsx b/public/pages/Overview/components/Widgets/RecentAlertsWidget.tsx index 6580ed615..398291a3c 100644 --- a/public/pages/Overview/components/Widgets/RecentAlertsWidget.tsx +++ b/public/pages/Overview/components/Widgets/RecentAlertsWidget.tsx @@ -61,10 +61,7 @@ export const RecentAlertsWidget: React.FC = ({ ); return ( - + ); diff --git a/public/pages/Overview/components/Widgets/RecentFindingsWidget.tsx b/public/pages/Overview/components/Widgets/RecentFindingsWidget.tsx index d18136bfd..2e0bbe1df 100644 --- a/public/pages/Overview/components/Widgets/RecentFindingsWidget.tsx +++ b/public/pages/Overview/components/Widgets/RecentFindingsWidget.tsx @@ -66,10 +66,7 @@ export const RecentFindingsWidget: React.FC = ({ ); return ( - + ); diff --git a/public/pages/Overview/containers/Overview/Overview.tsx b/public/pages/Overview/containers/Overview/Overview.tsx index 9106f7033..ec35abb92 100644 --- a/public/pages/Overview/containers/Overview/Overview.tsx +++ b/public/pages/Overview/containers/Overview/Overview.tsx @@ -125,23 +125,23 @@ export const Overview: React.FC = (props) => { return ( - - - - - - +

Overview

+ + + + + -
Group by
-
- - +
);