Commit 18d8185e by Alex Khomenko Committed by GitHub

AlertRuleList: Add keys to alert rule items (#28735)

parent 9742f63a
...@@ -46,10 +46,15 @@ const AlertRuleItem = ({ rule, search, onTogglePause }: Props) => { ...@@ -46,10 +46,15 @@ const AlertRuleItem = ({ rule, search, onTogglePause }: Props) => {
rule.info ? renderText(rule.info) : null, rule.info ? renderText(rule.info) : null,
]} ]}
actions={[ actions={[
<Button variant="secondary" icon={rule.state === 'paused' ? 'play' : 'pause'} onClick={onTogglePause}> <Button
key="play"
variant="secondary"
icon={rule.state === 'paused' ? 'play' : 'pause'}
onClick={onTogglePause}
>
{rule.state === 'paused' ? 'Resume' : 'Pause'} {rule.state === 'paused' ? 'Resume' : 'Pause'}
</Button>, </Button>,
<LinkButton variant="secondary" href={ruleUrl} icon="cog"> <LinkButton key="edit" variant="secondary" href={ruleUrl} icon="cog">
Edit alert Edit alert
</LinkButton>, </LinkButton>,
]} ]}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment