Skip to content

Commit

Permalink
do not hide rule snooze settings upon rule status refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
maximpn committed Apr 21, 2023
1 parent f09f722 commit caf95b9
Showing 1 changed file with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -540,22 +540,24 @@ const RuleDetailsPageComponent: React.FC<DetectionEngineComponentProps> = ({
const lastExecutionMessage = lastExecution?.message ?? '';

const ruleStatusInfo = useMemo(() => {
return ruleLoading ? (
<EuiFlexItem>
<EuiLoadingSpinner size="m" data-test-subj="rule-status-loader" />
</EuiFlexItem>
) : (
return (
<>
<RuleStatus status={lastExecutionStatus} date={lastExecutionDate}>
<EuiButtonIcon
data-test-subj="refreshButton"
color="primary"
onClick={refreshRule}
iconType="refresh"
aria-label={ruleI18n.REFRESH}
isDisabled={!isExistingRule}
/>
</RuleStatus>
{ruleLoading ? (
<EuiFlexItem>
<EuiLoadingSpinner size="m" data-test-subj="rule-status-loader" />
</EuiFlexItem>
) : (
<RuleStatus status={lastExecutionStatus} date={lastExecutionDate}>
<EuiButtonIcon
data-test-subj="refreshButton"
color="primary"
onClick={refreshRule}
iconType="refresh"
aria-label={ruleI18n.REFRESH}
isDisabled={!isExistingRule}
/>
</RuleStatus>
)}
<EuiFlexItem grow={false}>
<RuleDetailsSnoozeSettings id={ruleId} />
</EuiFlexItem>
Expand Down

0 comments on commit caf95b9

Please sign in to comment.