Skip to content

Commit

Permalink
[FEATURE] Rules UI/UX improvements (opensearch-project#592) (opensear…
Browse files Browse the repository at this point in the history
…ch-project#609)

* [FEATURE] Rules UI/UX improvements opensearch-project#585



* [BUG] Detection rules page | Filter name typo opensearch-project#588



* Code review



---------

Signed-off-by: Jovan Cvetkovic <[email protected]>
Co-authored-by: Jovan Cvetkovic <[email protected]>
Signed-off-by: AWSHurneyt <[email protected]>
  • Loading branch information
2 people authored and AWSHurneyt committed Oct 12, 2023
1 parent 1946ab8 commit 4ae39d9
Show file tree
Hide file tree
Showing 13 changed files with 86 additions and 62 deletions.
8 changes: 4 additions & 4 deletions cypress/integration/2_rules.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ describe('Rules', () => {

// Check that correct page is showing
cy.waitForPageLoad('rules', {
contains: 'Rules',
contains: 'Detection rules',
});
});

Expand Down Expand Up @@ -220,15 +220,15 @@ describe('Rules', () => {
cy.wait('@getRules');

cy.waitForPageLoad('rules', {
contains: 'Rules',
contains: 'Detection rules',
});

checkRulesFlyout();
});

it('...can be edited', () => {
cy.waitForPageLoad('rules', {
contains: 'Rules',
contains: 'Detection rules',
});

cy.get(`input[placeholder="Search rules"]`).ospSearch(SAMPLE_RULE.name);
Expand Down Expand Up @@ -278,7 +278,7 @@ describe('Rules', () => {
});

cy.waitForPageLoad('rules', {
contains: 'Rules',
contains: 'Detection rules',
});

cy.wait('@getRules');
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
},
"scripts": {
"cypress:open": "cypress open",
"cypress:run": "cypress run",
"osd": "node ../../scripts/osd",
"opensearch": "node ../../scripts/opensearch",
"lint": "node ../../scripts/eslint .",
Expand Down
1 change: 1 addition & 0 deletions public/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ $euiTextColor: $euiColorDarkestShade !default;
@import "./pages/Correlations/Correlations.scss";
@import "./pages/Correlations/components/FindingCard.scss";
@import "./pages/Findings/components/CorrelationsTable/CorrelationsTable.scss";
@import "./pages/Rules/components/RuleEditor/RuleEditorForm.scss";
@import "./pages/Rules/components/RuleEditor/DetectionVisualEditor.scss";

.selected-radio-panel {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ exports[`<DetectorRulesView /> spec renders the component 1`] = `
Object {
"field": "category",
"multiSelect": "or",
"name": "Rule Type",
"name": "Log type",
"options": Array [
Object {
"name": "Network",
Expand Down Expand Up @@ -476,7 +476,7 @@ exports[`<DetectorRulesView /> spec renders the component 1`] = `
Object {
"field": "level",
"multiSelect": "or",
"name": "Rule Severity",
"name": "Rule severity",
"options": Array [
Object {
"color": "#cc5642",
Expand Down Expand Up @@ -563,7 +563,7 @@ exports[`<DetectorRulesView /> spec renders the component 1`] = `
Object {
"field": "category",
"multiSelect": "or",
"name": "Rule Type",
"name": "Log type",
"options": Array [
Object {
"name": "Network",
Expand Down Expand Up @@ -623,7 +623,7 @@ exports[`<DetectorRulesView /> spec renders the component 1`] = `
Object {
"field": "level",
"multiSelect": "or",
"name": "Rule Severity",
"name": "Rule severity",
"options": Array [
Object {
"color": "#cc5642",
Expand Down Expand Up @@ -782,7 +782,7 @@ exports[`<DetectorRulesView /> spec renders the component 1`] = `
Object {
"field": "category",
"multiSelect": "or",
"name": "Rule Type",
"name": "Log type",
"options": Array [
Object {
"name": "Network",
Expand Down Expand Up @@ -842,7 +842,7 @@ exports[`<DetectorRulesView /> spec renders the component 1`] = `
Object {
"field": "level",
"multiSelect": "or",
"name": "Rule Severity",
"name": "Rule severity",
"options": Array [
Object {
"color": "#cc5642",
Expand Down Expand Up @@ -923,7 +923,7 @@ exports[`<DetectorRulesView /> spec renders the component 1`] = `
Object {
"field": "category",
"multiSelect": "or",
"name": "Rule Type",
"name": "Log type",
"options": Array [
Object {
"name": "Network",
Expand Down Expand Up @@ -1013,7 +1013,7 @@ exports[`<DetectorRulesView /> spec renders the component 1`] = `
iconType="arrowDown"
onClick={[Function]}
>
Rule Type
Log type
</EuiFilterButton>
}
closePopover={[Function]}
Expand Down Expand Up @@ -1085,10 +1085,10 @@ exports[`<DetectorRulesView /> spec renders the component 1`] = `
>
<span
className="euiFilterButton__textShift"
data-text="Rule Type"
title="Rule Type"
data-text="Log type"
title="Log type"
>
Rule Type
Log type
</span>
</span>
</span>
Expand All @@ -1105,7 +1105,7 @@ exports[`<DetectorRulesView /> spec renders the component 1`] = `
Object {
"field": "level",
"multiSelect": "or",
"name": "Rule Severity",
"name": "Rule severity",
"options": Array [
Object {
"color": "#cc5642",
Expand Down Expand Up @@ -1173,7 +1173,7 @@ exports[`<DetectorRulesView /> spec renders the component 1`] = `
iconType="arrowDown"
onClick={[Function]}
>
Rule Severity
Rule severity
</EuiFilterButton>
}
closePopover={[Function]}
Expand Down Expand Up @@ -1245,10 +1245,10 @@ exports[`<DetectorRulesView /> spec renders the component 1`] = `
>
<span
className="euiFilterButton__textShift"
data-text="Rule Severity"
title="Rule Severity"
data-text="Rule severity"
title="Rule severity"
>
Rule Severity
Rule severity
</span>
</span>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2971,7 +2971,7 @@ exports[`<DetectorDetails /> spec renders the component 1`] = `
Object {
"field": "category",
"multiSelect": "or",
"name": "Rule Type",
"name": "Log type",
"options": Array [
Object {
"name": "Network",
Expand Down Expand Up @@ -3031,7 +3031,7 @@ exports[`<DetectorDetails /> spec renders the component 1`] = `
Object {
"field": "level",
"multiSelect": "or",
"name": "Rule Severity",
"name": "Rule severity",
"options": Array [
Object {
"color": "#cc5642",
Expand Down Expand Up @@ -3118,7 +3118,7 @@ exports[`<DetectorDetails /> spec renders the component 1`] = `
Object {
"field": "category",
"multiSelect": "or",
"name": "Rule Type",
"name": "Log type",
"options": Array [
Object {
"name": "Network",
Expand Down Expand Up @@ -3178,7 +3178,7 @@ exports[`<DetectorDetails /> spec renders the component 1`] = `
Object {
"field": "level",
"multiSelect": "or",
"name": "Rule Severity",
"name": "Rule severity",
"options": Array [
Object {
"color": "#cc5642",
Expand Down Expand Up @@ -3337,7 +3337,7 @@ exports[`<DetectorDetails /> spec renders the component 1`] = `
Object {
"field": "category",
"multiSelect": "or",
"name": "Rule Type",
"name": "Log type",
"options": Array [
Object {
"name": "Network",
Expand Down Expand Up @@ -3397,7 +3397,7 @@ exports[`<DetectorDetails /> spec renders the component 1`] = `
Object {
"field": "level",
"multiSelect": "or",
"name": "Rule Severity",
"name": "Rule severity",
"options": Array [
Object {
"color": "#cc5642",
Expand Down Expand Up @@ -3478,7 +3478,7 @@ exports[`<DetectorDetails /> spec renders the component 1`] = `
Object {
"field": "category",
"multiSelect": "or",
"name": "Rule Type",
"name": "Log type",
"options": Array [
Object {
"name": "Network",
Expand Down Expand Up @@ -3568,7 +3568,7 @@ exports[`<DetectorDetails /> spec renders the component 1`] = `
iconType="arrowDown"
onClick={[Function]}
>
Rule Type
Log type
</EuiFilterButton>
}
closePopover={[Function]}
Expand Down Expand Up @@ -3640,10 +3640,10 @@ exports[`<DetectorDetails /> spec renders the component 1`] = `
>
<span
className="euiFilterButton__textShift"
data-text="Rule Type"
title="Rule Type"
data-text="Log type"
title="Log type"
>
Rule Type
Log type
</span>
</span>
</span>
Expand All @@ -3660,7 +3660,7 @@ exports[`<DetectorDetails /> spec renders the component 1`] = `
Object {
"field": "level",
"multiSelect": "or",
"name": "Rule Severity",
"name": "Rule severity",
"options": Array [
Object {
"color": "#cc5642",
Expand Down Expand Up @@ -3728,7 +3728,7 @@ exports[`<DetectorDetails /> spec renders the component 1`] = `
iconType="arrowDown"
onClick={[Function]}
>
Rule Severity
Rule severity
</EuiFilterButton>
}
closePopover={[Function]}
Expand Down Expand Up @@ -3800,10 +3800,10 @@ exports[`<DetectorDetails /> spec renders the component 1`] = `
>
<span
className="euiFilterButton__textShift"
data-text="Rule Severity"
title="Rule Severity"
data-text="Rule severity"
title="Rule severity"
>
Rule Severity
Rule severity
</span>
</span>
</span>
Expand Down
Loading

0 comments on commit 4ae39d9

Please sign in to comment.