Skip to content

Commit

Permalink
Add a details button to open the findings flyout from the correlation…
Browse files Browse the repository at this point in the history
…s page. opensearch-project#564

Signed-off-by: Jovan Cvetkovic <[email protected]>
  • Loading branch information
jovancvetkovic3006 committed May 3, 2023
1 parent eeb6b52 commit 18b6a54
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
4 changes: 3 additions & 1 deletion public/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ $euiTextColor: $euiColorDarkestShade !default;
@import "./pages/Overview/components/Widgets/WidgetContainer.scss";
@import "./pages/Main/components/Callout.scss";
@import "./pages/Detectors/components/ReviewFieldMappings/ReviewFieldMappings.scss";
@import "./pages/Correlations//Correlations.scss";
@import "./pages/Correlations/Correlations.scss";
@import "./pages/Correlations/components/FindingCard.scss";


.selected-radio-panel {
background-color: tintOrShade($euiColorPrimary, 90%, 70%);
Expand Down
9 changes: 9 additions & 0 deletions public/pages/Correlations/components/FindingCard.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.finding-card-header {
.euiFlexItem:nth-child(2) {
margin-right: 6px;
}

.euiFlexItem:nth-child(3) {
margin-left: 6px;
}
}
15 changes: 13 additions & 2 deletions public/pages/Correlations/components/FindingCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
EuiSpacer,
EuiBadge,
EuiHorizontalRule,
EuiToolTip,
} from '@elastic/eui';
import { rulePriorityBySeverity } from '../../CreateDetector/components/DefineDetector/components/DetectionRules/DetectionRulesTable';
import {
Expand Down Expand Up @@ -43,10 +44,20 @@ export const FindingCard: React.FC<FindingCardProps> = ({
}) => {
const correlationHeader = correlationData ? (
<>
<EuiFlexGroup justifyContent="spaceBetween">
<EuiFlexItem grow={false}>
<EuiFlexGroup className={'finding-card-header'}>
<EuiFlexItem grow={true}>
<EuiText style={{ fontSize: 22, fontWeight: 300 }}>{correlationData.score}</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiToolTip content={'View finding details'}>
<EuiButtonIcon
aria-label={'View finding details'}
data-test-subj={`view-details-icon`}
iconType={'expand'}
onClick={() => {}}
/>
</EuiToolTip>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButtonIcon
iconType={'inspect'}
Expand Down

0 comments on commit 18b6a54

Please sign in to comment.