Skip to content

Commit

Permalink
[BUG] Fixes few minor UX bugs (opensearch-project#525)
Browse files Browse the repository at this point in the history
* [BUG] No space between the detector details and the rule panel opensearch-project#522
[BUG] A rule flyout without references have an empty link opensearch-project#521
[FEATURE] Update header size to use euiTitle--small opensearch-project#520

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [BUG] No space between the detector details and the rule panel opensearch-project#522
[BUG] A rule flyout without references have an empty link opensearch-project#521
[FEATURE] Update header size to use euiTitle--small opensearch-project#520

Signed-off-by: Jovan Cvetkovic <[email protected]>

---------

Signed-off-by: Jovan Cvetkovic <[email protected]>
  • Loading branch information
jovancvetkovic3006 authored Apr 18, 2023
1 parent 88bed3e commit f1be08e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions cypress/integration/2_rules.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ describe('Rules', () => {
);

// Enter the reference
cy.contains('Add another URL').click();
cy.get('[data-test-subj="rule_references_field_0"]').type(SAMPLE_RULE.references);

// Enter the false positive cases
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export default class ConfigureFieldMapping extends Component<
<EuiAccordion
buttonContent={
<div data-test-subj="mapped-fields-btn">
<EuiTitle>
<EuiTitle size={'s'}>
<h6>{`Automatically mapped fields (${mappedRuleFields.length})`}</h6>
</EuiTitle>
</div>
Expand Down Expand Up @@ -303,7 +303,7 @@ export default class ConfigureFieldMapping extends Component<

<EuiSpacer size={'m'} />

<EuiTitle>
<EuiTitle size={'s'}>
<h6>Pending field mappings</h6>
</EuiTitle>
<FieldMappingsTable<MappingViewType.Edit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const DetectionRules: React.FC<DetectionRulesProps> = ({
<EuiAccordion
buttonContent={
<div data-test-subj="detection-rules-btn">
<EuiTitle>
<EuiTitle size={'s'}>
<h4>{`Detection rules (${enabledRulesCount} selected)`}</h4>
</EuiTitle>
<EuiText size="s" color="subdued">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

import React from 'react';
import { EuiSpacer } from '@elastic/eui';
import { DetectorBasicDetailsView } from '../../components/DetectorBasicDetailsView/DetectorBasicDetailsView';
import { DetectorRulesView } from '../../components/DetectorRulesView/DetectorRulesView';
import { RuleItem } from '../../../CreateDetector/components/DefineDetector/components/DetectionRules/types/interfaces';
Expand Down Expand Up @@ -68,7 +69,12 @@ export class DetectorDetailsView extends React.Component<
{rulesCanFold ? detectorRules : null}
</DetectorBasicDetailsView>

{rulesCanFold ? null : detectorRules}
{rulesCanFold ? null : (
<>
<EuiSpacer size={'m'} />
{detectorRules}
</>
)}
</>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const ruleEditorStateDefaultValue: RuleEditorFormModel = {
description: '',
status: '',
author: '',
references: [''],
references: [],
tags: [],
detection: '',
level: '',
Expand Down

0 comments on commit f1be08e

Please sign in to comment.