Skip to content

Commit

Permalink
problems: fix acknowledged event color, closes #676, #681
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderzobnin committed Mar 4, 2019
1 parent c415e82 commit e4947b6
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/panel-triggers/components/AlertList/AlertCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,23 @@ export default class AlertCard extends PureComponent<AlertCardProps, AlertCardSt
}
const blink = panelOptions.highlightNewEvents && newProblem;

let problemColor: string;
if (problem.value === '0') {
problemColor = panelOptions.okEventColor;
} else if (panelOptions.markAckEvents && problem.acknowledges && problem.acknowledges.length) {
problemColor = panelOptions.ackEventColor;
} else {
problemColor = severityDesc.color;
}

const cardStyle: CSSProperties = {};
if (panelOptions.highlightBackground) {
cardStyle.backgroundColor = severityDesc.color;
cardStyle.backgroundColor = problemColor;
}

return (
<li className={cardClass} style={cardStyle}>
<AlertIcon problem={problem} color={severityDesc.color} highlightBackground={panelOptions.highlightBackground} blink={blink} />
<AlertIcon problem={problem} color={problemColor} highlightBackground={panelOptions.highlightBackground} blink={blink} />

<div className="alert-rule-item__body">
<div className="alert-rule-item__header">
Expand Down

0 comments on commit e4947b6

Please sign in to comment.