Reuse StateTag for Paused state

pull/85557/head
Tom Ratcliffe 1 year ago committed by Tom Ratcliffe
parent 0e87adbc97
commit 20a1955026
  1. 6
      public/app/features/alerting/unified/components/rules/AlertStateTag.tsx

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { AlertState } from '@grafana/data'; import { AlertState } from '@grafana/data';
import { Tag, Tooltip } from '@grafana/ui'; import { Icon, Tooltip } from '@grafana/ui';
import { GrafanaAlertState, GrafanaAlertStateWithReason, PromAlertingRuleState } from 'app/types/unified-alerting-dto'; import { GrafanaAlertState, GrafanaAlertStateWithReason, PromAlertingRuleState } from 'app/types/unified-alerting-dto';
import { alertStateToReadable, alertStateToState } from '../../utils/rules'; import { alertStateToReadable, alertStateToState } from '../../utils/rules';
@ -17,7 +17,9 @@ export const AlertStateTag = React.memo(({ state, isPaused = false, size = 'md',
if (isPaused) { if (isPaused) {
return ( return (
<Tooltip content={'Alert evaluation is currently paused'} placement="top"> <Tooltip content={'Alert evaluation is currently paused'} placement="top">
<Tag icon="pause" name="Paused" colorIndex={1} /> <StateTag state="warning" size={size} muted={muted}>
<Icon name="pause" size="xs" /> Paused
</StateTag>
</Tooltip> </Tooltip>
); );
} }

Loading…
Cancel
Save